woocommerce_ebill_init

The WooCommerce Sisow Mastercard woocommerce ebill init function.

Description

woocommerce_ebill_init(); 

Usage

  1. if ( !function_exists( 'woocommerce_ebill_init' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce-sisow-mastercard/sisowebill.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = woocommerce_ebill_init(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/sisowebill.php  
  1. function woocommerce_ebill_init()  
  2. {  
  3. if ( ! class_exists( 'WC_Payment_Gateway' ) ) { return; } 
  4.  
  5. require_once(WP_PLUGIN_DIR . "/" . plugin_basename( dirname(__FILE__)) . '/sisow/sisow.cls5.php'); 
  6. require_once(WP_PLUGIN_DIR . "/" . plugin_basename( dirname(__FILE__)) . '/sisow/base.php'); 
  7.  
  8. class WC_Sisow_ebill extends SisowBase 
  9. function __construct()  
  10. $this->paymentcode = 'ebill'; 
  11. $this->paymentname = 'Sisow ebill'; 
  12. $this->redirect = false; 
  13. parent::__construct(); 
  14.  
  15. public function payment_fields()  
  16. global $woocommerce; 
  17. $paymentfee_total = $this->getFee(); 
  18.  
  19. $text = '<b>'.__('Betalen met', sisow) . ' ' . $this->title . '</b>'; 
  20. if($this->merchantId == '' || $this->merchantKey == '') 
  21. $text .= '</br><b>Let op MerchantID/MerchantKey niet ingevuld, controleer de instellingen!</b>'; 
  22.  
  23. if($this->testmode == 'yes') 
  24. $text .= '</br><b>Let op Testmodus ingeschakeld!</b>'; 
  25.  
  26. $text .= '</br>U heeft ervoor gekozen om uw bestelling per digitale acceptgiro over te maken. 
  27. De verwerking hiervan is uitbesteed aan Sisow B.V.<br/> 
  28. U ontvangt een e-mail met daarin informatie hoe u uw betaling kunt voltooien.'; 
  29.  
  30. if ($paymentfee_total > 0) { 
  31. $text .= '</br><b>' . $this->paymentfeelabel . woocommerce_price($paymentfee_total) . '</b></br>'; 
  32.  
  33. echo wpautop( wptexturize($text)); 
  34.  
  35. add_filter('woocommerce_payment_gateways', 'add_sisow_ebill_gateway' ); 
  36.  
  37. function add_sisow_ebill_gateway($methods) 
  38. $temp = 'WC_Sisow_ebill'; 
  39. $methods[] = $temp; 
  40. return $methods;