Sisow_Gateway_ideal

The Woocommerce Sisow Payment Methods Sisow Gateway ideal class.

Defined (1)

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

/includes/classes/Sisow/Gateway/Ideal.php  
  1. class Sisow_Gateway_ideal extends Sisow_Gateway_Abstract 
  2. public static function getCode() 
  3. return "ideal"; 
  4.  
  5. public static function getName() 
  6. return "iDEAL"; 
  7.  
  8. public function payment_fields() 
  9. $sisow = new Sisow_Helper_Sisow(get_option('sisow_merchantid'), get_option('sisow_merchantkey'), get_option('sisow_shopid')); 
  10. $banks = array(); 
  11.  
  12. $sisow->DirectoryRequest($banks, false, $this->get_option('testmode') == 'yes'); 
  13.  
  14. $description = ''; 
  15.  
  16. $description_text = $this->get_option('description'); 
  17. if(!empty($description_text)) 
  18. $description .= '<p>' . $description_text . '</p>'; 
  19.  
  20. $description .= __('Choose your bank', 'woocommerce-sisow') . '<br/>'; 
  21. $description .= '<select id="ideal_issuer" name="ideal_issuer" class="required-entry">'; 
  22. $description .= '<option value="">' . __('Please choose...', 'woocommerce-sisow') . '</option>'; 
  23. foreach($banks as $k => $v) 
  24. $description .= '<option value="'.$k.'">' . $v . '</option>'; 
  25. $description .= '</select>'; 
  26. $description .= '</p>';  
  27.  
  28. echo $description; 
  29.  
  30. public function validate_fields()  
  31. {  
  32. if(empty($_POST['ideal_issuer'])) 
  33. wc_add_notice( __('Please select your bank', 'woocommerce-sisow'), 'error' ); 
  34. return false;  
  35. return true;