WC_Payment_Gateway_eCheck

ECheck Payment Gateway.

Defined (1)

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

/includes/gateways/class-wc-payment-gateway-echeck.php  
  1. class WC_Payment_Gateway_eCheck extends WC_Payment_Gateway { 
  2.  
  3. /** 
  4. * Builds our payment fields area - including tokenization fields for logged 
  5. * in users, and the actual payment fields. 
  6. * @since 2.6.0 
  7. */ 
  8. public function payment_fields() { 
  9. if ( $this->supports( 'tokenization' ) && is_checkout() ) { 
  10. $this->tokenization_script(); 
  11. $this->saved_payment_methods(); 
  12. $this->form(); 
  13. $this->save_payment_method_checkbox(); 
  14. } else { 
  15. $this->form(); 
  16.  
  17. /** 
  18. * Outputs fields for entering eCheck information. 
  19. * @since 2.6.0 
  20. */ 
  21. public function form() { 
  22. $fields = array(); 
  23.  
  24. $default_fields = array( 
  25. 'routing-number' => '<p class="form-row form-row-first"> 
  26. <label for="' . esc_attr( $this->id ) . '-routing-number">' . esc_html__( 'Routing number', 'woocommerce' ) . ' <span class="required">*</span></label> 
  27. <input id="' . esc_attr( $this->id ) . '-routing-number" class="input-text wc-echeck-form-routing-number" type="text" maxlength="9" autocomplete="off" placeholder="•••••••••" name="' . esc_attr( $this->id ) . '-routing-number" /> 
  28. </p>',  
  29. 'account-number' => '<p class="form-row form-row-wide"> 
  30. <label for="' . esc_attr( $this->id ) . '-account-number">' . esc_html__( 'Account number', 'woocommerce' ) . ' <span class="required">*</span></label> 
  31. <input id="' . esc_attr( $this->id ) . '-account-number" class="input-text wc-echeck-form-account-number" type="text" autocomplete="off" name="' . esc_attr( $this->id ) . '-account-number" maxlength="17" /> 
  32. </p>',  
  33. ); 
  34.  
  35. $fields = wp_parse_args( $fields, apply_filters( 'woocommerce_echeck_form_fields', $default_fields, $this->id ) ); 
  36. ?> 
  37.  
  38. <fieldset id="<?php echo esc_attr( $this->id ); ?>-cc-form" class='wc-echeck-form wc-payment-form'> 
  39. <?php do_action( 'woocommerce_echeck_form_start', $this->id ); ?> 
  40. <?php 
  41. foreach ( $fields as $field ) { 
  42. echo $field; 
  43. ?> 
  44. <?php do_action( 'woocommerce_echeck_form_end', $this->id ); ?> 
  45. <div class="clear"></div> 
  46. </fieldset><?php