?> name="custom_gateway" class="custom_gateway"/><?php echo wpsc_gateway_name(); ?> </label> <?php } ?> <?php if (wpsc_gateway_form_fields()) { ?> <table class='<?php echo wpsc_gateway_form_field_style(); ?> '> <?php echo wpsc_gateway_form_fields(); ?> </table> <?php } ?> </div> <?php } ?>
/** * Display default credit card form. * * @param array $args * @param array $fields * @since */ public function default_credit_card_form($args = array(), $fields = array()) { if ($this->supports('tev1') && '1.0' == get_option('wpsc_get_active_theme_engine')) { // Show 2.0 gateway API table-based code ?> <table class="wpsc_checkout_table <?php echo wpsc_gateway_form_field_style(); ?> "> <tr> <td><?php _e('Card Number', 'wp-e-commerce'); ?> </td> <td> <input type='text' id='card_number' value='' autocomplete="off" /> </td> </tr> <tr> <td><?php _e('Expiration Date', 'wp-e-commerce'); ?> </td> <td> <input type='text' id='card_expiry_month' value='' autocomplete="off" maxlength='2' size='3' placeholder="<?php esc_attr_e('MM', 'wp-e-commerce'); ?> " /> <input type='text' id='card_expiry_year' value='' autocomplete="off" maxlength='2' size='3' placeholder="<?php esc_attr_e('YY', 'wp-e-commerce'); ?> " /> </td> </tr> <tr> <td><?php _e('Card Code', 'wp-e-commerce'); ?> </td> <td> <input type='text' id='card_code' value='' autocomplete="off" size='5' maxlength='4' placeholder="<?php esc_attr_e('CVC', 'wp-e-commerce'); ?> " /> </td> </tr> </table> <?php } else { $default_args = array('fields_have_names' => true); $args = wp_parse_args($args, apply_filters('wpsc_default_credit_card_form_args', $default_args, $this->setting->gateway_name)); $default_fields = array('card-number-field' => '<p class="form-row form-row-wide"> <label for="' . esc_attr($this->setting->gateway_name) . '-card-number">' . __('Card Number', 'wp-e-commerce') . ' <span class="required">*</span></label> <input id="' . esc_attr($this->setting->gateway_name) . '-card-number" class="input-text wpsc-credit-card-form-card-number" type="text" maxlength="20" autocomplete="off" placeholder="•••• •••• •••• ••••" /> </p>', 'card-expiry-field' => '<p class="form-row form-row-first"> <label for="' . esc_attr($this->setting->gateway_name) . '-card-expiry">' . __('Expiration Date (MM/YY)', 'wp-e-commerce') . ' <span class="required">*</span></label> <input id="' . esc_attr($this->setting->gateway_name) . '-card-expiry" class="input-text wpsc-credit-card-form-card-expiry" type="text" autocomplete="off" placeholder="' . esc_attr__('MM / YY', 'wp-e-commerce') . '" /> </p>', 'card-cvc-field' => '<p class="form-row form-row-last"> <label for="' . esc_attr($this->setting->gateway_name) . '-card-cvc">' . __('Card Code', 'wp-e-commerce') . ' <span class="required">*</span></label> <input id="' . esc_attr($this->setting->gateway_name) . '-card-cvc" class="input-text wpsc-credit-card-form-card-cvc" type="text" autocomplete="off" placeholder="' . esc_attr__('CVC', 'wp-e-commerce') . '" /> </p>'); $fields = wp_parse_args($fields, apply_filters('wpsc_default_credit_card_form_fields', $default_fields, $this->setting->gateway_name)); ?> <fieldset id="<?php echo $this->setting->gateway_name; ?> -cc-form"> <?php do_action('wpsc_default_credit_card_form_start', $this->setting->gateway_name); ?> <?php foreach ($fields as $field) { echo $field; } ?> <?php do_action('wpsc_default_credit_card_form_end', $this->setting->gateway_name); ?> <div class="clear"></div> </fieldset> <?php } }
<?php //this HTML displays activated payment gateways?> <?php if(wpsc_gateway_count() > 1): // if we have more than one gateway enabled, offer the user a choice ?> <h3><?php echo __('Select a payment gateway', 'wpsc');?></h3> <?php while (wpsc_have_gateways()) : wpsc_the_gateway(); ?> <div class="custom_gateway"> <?php if(wpsc_gateway_internal_name() == 'noca'){ ?> <label><input type="radio" id='noca_gateway' value="<?php echo wpsc_gateway_internal_name();?>" <?php echo wpsc_gateway_is_checked(); ?> name="custom_gateway" class="custom_gateway"/><?php echo wpsc_gateway_name();?></label> <?php }else{ ?> <label><input type="radio" value="<?php echo wpsc_gateway_internal_name();?>" <?php echo wpsc_gateway_is_checked(); ?> name="custom_gateway" class="custom_gateway"/><?php echo wpsc_gateway_name();?></label> <?php } ?> <?php if(wpsc_gateway_form_fields()): ?> <table class='<?php echo wpsc_gateway_form_field_style();?>'> <?php echo wpsc_gateway_form_fields();?> </table> <?php endif; ?> </div> <?php endwhile; ?> <?php else: // otherwise, there is no choice, stick in a hidden form ?> <?php while (wpsc_have_gateways()) : wpsc_the_gateway(); ?> <input name='custom_gateway' value='<?php echo wpsc_gateway_internal_name();?>' type='hidden' /> <?php if(wpsc_gateway_form_fields()): ?> <table> <?php echo wpsc_gateway_form_fields();?> </table> <?php endif; ?> <?php endwhile; ?>
function _wpsc_filter_merchant_v2_after_gateway_hidden_field() { if (wpsc_have_gateways()) { wpsc_the_gateway(); if (wpsc_gateway_form_fields()) { ?> <table class='wpsc_checkout_table <?php echo wpsc_gateway_form_field_style(); ?> '> <?php echo wpsc_gateway_form_fields(); ?> </table> <?php } } }