Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Protx Direct V2.0


Mary-at-Milton

Recommended Posts

I have installed the above payment module and am testing it on my test server. Thanks to Jason LeBaron and Mark keith Evans for their work on this module.

 

I have one problem that I can't fix as I'm no expert on PHP and MySQL. A field asking for the Card Type has been left off - this should appear on the screen where it asks for card details when you checkout. They seem to ask for this information in their installation notes.

 

The field name is called

 

MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_TYPE

 

located on line 29 of the source file called 'languages/english/modules/payment/protx_direct.php'

 

I presume this needs to be inserted into the code in the file called 'includes/modules/payment/protx_direct.php.

 

Can anyone show me where to fix this?

Mary-Ann

Chief Cook and Bottlewasher

Jack-of-All-Trades

Running 2.2MS2

Link to comment
Share on other sites

Here are the files I mentioned: languages/english/modules/payment/protx_direct.php

 

<?php
//
// +----------------------------------------------------------------------+
//  osCommerce, Open Source E-Commerce Solutions                          +
// +----------------------------------------------------------------------+
// | Copyright (c) 2004 Jason LeBaron                                     |
// |                                                                      |
// | Portions Copyright (c) 2003 osCommerce                               |
// +----------------------------------------------------------------------+
// | This source file is subject to version 2.0 of the GPL license,       |
// | that is bundled with this package in the file LICENSE, and is        |
// | available through the world-wide-web at the following url:           |
// | http://www.gnu.org/copyleft/gpl.html.                                |
// +----------------------------------------------------------------------+
// | includes/modules/payment/protx_direct.php                            |
// | Released under GPL                                                   |
// | Created by Jason LeBaron - [email protected]                      |
// +----------------------------------------------------------------------+
// $Id: protx_direct.php 1 2004-10-30 16:00:00Z networkdad $


 // Admin Configuration Items
 define('MODULE_PAYMENT_PROTX_DIRECT_TEXT_ADMIN_TITLE', 'Protx Direct'); // Payment option title as displayed in the admin
 define('MODULE_PAYMENT_PROTX_DIRECT_TEXT_DESCRIPTION', '<strong>Test Credit Card Numbers:</strong><br /><br />Visa#: 4929000000006<br />MC#: 5404000000000001<br />Delta#: 4462000000000003<br />Solo#: 6334900000000005 - Issue #: 1<br />Switch#: 5641820000000005 - Issue #: 01<br />AMEX#: 374200000000004 <br /><br />Any future date can be used for the expiration date and any 3 or 4 (AMEX) digit number can be used for the CVV Code.<br /><br /><a target="_blank" href="https://ukvps.protx.com/vspadmin">VSP Admin</a>');

 // Catalog Items
 define('MODULE_PAYMENT_PROTX_DIRECT_TEXT_CATALOG_TITLE', 'Credit Card');  // Payment option title as displayed to the customer
 define('MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_TYPE', 'Credit Card Type:');
 define('MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_OWNER', 'Credit Card Owner:');
 define('MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_NUMBER', 'Credit Card Number:');
 define('MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_START_DATE', 'Credit Card Start Date (Switch Only):');
 define('MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_EXPIRES', 'Credit Card Expiry Date:');
 define('MODULE_PAYMENT_PROTX_DIRECT_TEXT_CVV', 'The 3 or 4 security digits on card strip');
 define('MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_ISSUE_NUMBER', 'Issue Number:');
 define('MODULE_PAYMENT_PROTX_DIRECT_TEXT_JS_CC_OWNER', '* The owner\'s name of the credit card must be at least ' . CC_OWNER_MIN_LENGTH . ' characters.\n');
 define('MODULE_PAYMENT_PROTX_DIRECT_TEXT_JS_CC_NUMBER', '* The credit card number must be at least ' . CC_NUMBER_MIN_LENGTH . ' characters.\n');
 define('MODULE_PAYMENT_PROTX_DIRECT_TEXT_JS_CC_CVV', '* The 3 or 4 digit CVV number must be entered from the back of the credit card.\n');
 define('MODULE_PAYMENT_PROTX_DIRECT_TEXT_DECLINED_MESSAGE', 'Your credit card could not be authorized. Please correct any information and try again or contact Customer Care on 0800 298 0682. We will be happy to assist you.');
 define('MODULE_PAYMENT_PROTX_DIRECT_TEXT_ERROR', 'Credit Card Error!');
?>

 

 

includes/modules/payment/protx_direct.php

 

<?php

//

// +----------------------------------------------------------------------+

//  osCommerce, Open Source E-Commerce Solutions                          +

// +----------------------------------------------------------------------+

// | Copyright (c) 2004 Jason LeBaron                                     |

// |                                                                      |

// | Portions Copyright (c) 2003 osCommerce                               |

// +----------------------------------------------------------------------+

// | This source file is subject to version 2.0 of the GPL license,       |

// | that is bundled with this package in the file LICENSE, and is        |

// | available through the world-wide-web at the following url:           |

// | http://www.gnu.org/copyleft/gpl.html.                                |

// +----------------------------------------------------------------------+

// | includes/modules/payment/protx_direct.php                            |

// | Released under GPL                                                   |

// | Created by Jason LeBaron - [email protected]                      |

// +----------------------------------------------------------------------+

// $Id: protx_direct.php 1 2004-10-30 16:00:00Z networkdad $

 

 

 class protx_direct {

   var $code, $title, $description, $enabled, $response;

 

// class constructor

   function protx_direct() {

     global $order;

 

     $this->code = 'protx_direct';

    if ($HTTP_GET_VARS['main_page'] != '') {

      $this->title = MODULE_PAYMENT_PROTX_DIRECT_TEXT_CATALOG_TITLE; // Payment module title in Catalog

    } else {

      $this->title = MODULE_PAYMENT_PROTX_DIRECT_TEXT_ADMIN_TITLE; // Payment module title in Admin

    }

     $this->description = MODULE_PAYMENT_PROTX_DIRECT_TEXT_DESCRIPTION; // Descriptive Info about module in Admin

     $this->enabled = ((MODULE_PAYMENT_PROTX_DIRECT_STATUS == 'True') ? true : false); // Whether the module is installed or not

     $this->sort_order = MODULE_PAYMENT_PROTX_DIRECT_SORT_ORDER; // Sort Order of this payment option on the customer payment page

     $this->form_action_url = tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL', false); // Page to go to upon submitting page info

 

  if ((int)MODULE_PAYMENT_PROTX_DIRECT_ORDER_STATUS_ID > 0) {

       $this->order_status = MODULE_PAYMENT_PROTX_DIRECT_ORDER_STATUS_ID;

     }

 

     if (is_object($order)) $this->update_status();

 

}

 

// class methods

 

   function update_status() {

     global $order;

 

     if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_PROTX_DIRECT_ZONE > 0) ) {

       $check_flag = false;

       $check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_PAYMENT_PROTX_DIRECT_ZONE . "' and zone_country_id = '" . $order->billing['country']['id'] . "' order by zone_id");

       while ($check = tep_db_fetch_array($check_query)) {

         if ($check['zone_id'] < 1) {

           $check_flag = true;

           break;

         } elseif ($check['zone_id'] == $order->billing['zone_id']) {

           $check_flag = true;

           break;

         }

       }

 

       if ($check_flag == false) {

         $this->enabled = false;

       }

     }

   }

 

   // Validate the credit card information via javascript (Number, Owner, and CVV Lengths)

   function javascript_validation() {

     $js = '  if (payment_value == "' . $this->code . '") {' . "\n" .

           '    var cc_owner = document.checkout_payment.protx_direct_cc_owner.value;' . "\n" .

           '    var cc_number = document.checkout_payment.protx_direct_cc_number.value;' . "\n";

     if (MODULE_PAYMENT_PROTX_DIRECT_USE_CVV == 'True')  {

    $js .= '    var cc_cvv = document.checkout_payment.protx_direct_cc_cvv.value;' . "\n";

  }

     $js .= '    if (cc_owner == "" || cc_owner.length < ' . CC_OWNER_MIN_LENGTH . ') {' . "\n" .

            '      error_message = error_message + "' . MODULE_PAYMENT_PROTX_DIRECT_TEXT_JS_CC_OWNER . '";' . "\n" .

            '      error = 1;' . "\n" .

            '    }' . "\n" .

            '    if (cc_number == "" || cc_number.length < ' . CC_NUMBER_MIN_LENGTH . ') {' . "\n" .

            '      error_message = error_message + "' . MODULE_PAYMENT_PROTX_DIRECT_TEXT_JS_CC_NUMBER . '";' . "\n" .

            '      error = 1;' . "\n" .

            '    }' . "\n";

     if (MODULE_PAYMENT_PROTX_DIRECT_USE_CVV == 'True')  {

 $js .= '    if (cc_cvv == "" || cc_cvv.length < "3" || cc_cvv.length > "4") {' . "\n".

              '      error_message = error_message + "' . MODULE_PAYMENT_PROTX_DIRECT_TEXT_JS_CC_CVV . '";' . "\n" .

              '      error = 1;' . "\n" .

              '    }' . "\n" .

              '  }' . "\n";

     }

 

     return $js;

   }

 

   // Display Credit Card Information Submission Fields on the Checkout Payment Page

   function selection() {

     global $order;

 

     for ($i=1; $i<13; $i++) {

       $expires_month[] = array('id' => sprintf('%02d', $i), 'text' => strftime('%B',mktime(0,0,0,$i,1,2000)));

     }

 

     $today = getdate();

     for ($i=$today['year']; $i < $today['year']+10; $i++) {

       $expires_year[] = array('id' => strftime('%y',mktime(0,0,0,1,1,$i)), 'text' => strftime('%Y',mktime(0,0,0,1,1,$i)));

     }

// Start Date Add

     for ($i=1; $i <13; $i++) {

       $start_month[] = array('id' => sprintf('%02d', $i), 'text' => strftime('%B',mktime(0,0,0,$i,1,2000)));

     }

 

     $today = getdate();

     for ($i=$today['year']-4; $i <= $today['year']; $i++) {

       $start_year[] = array('id' => strftime('%y',mktime(0,0,0,1,1,$i)), 'text' => strftime('%Y',mktime(0,0,0,1,1,$i)));

     }

 if ((MODULE_PAYMENT_PROTX_DIRECT_USE_CVV == 'True' ) && (MODULE_PAYMENT_PROTX_DIRECT_USE_ISSUE == 'True' ) && (MODULE_PAYMENT_PROTX_DIRECT_USE_START == 'True' )) {

// ++ issue ++ cvv ++ start date

  $selection = array('id' => $this->code,

                        'module' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CATALOG_TITLE,

      'fields' => array(array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_OWNER,

                                                'field' => tep_draw_input_field('protx_direct_cc_owner', $order->billing['firstname'] . ' ' . $order->billing['lastname'])),

                                          array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_NUMBER,

                                                'field' => tep_draw_input_field('protx_direct_cc_number')),

                                          array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_START_DATE,

                           'field' => tep_draw_pull_down_menu('protx_direct_cc_start_month', $start_month) . ' ' . tep_draw_pull_down_menu('protx_direct_cc_start_year', $start_year)),

                                          array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_EXPIRES,

                                                'field' => tep_draw_pull_down_menu('protx_direct_cc_expires_month', $expires_month) . ' ' . tep_draw_pull_down_menu('protx_direct_cc_expires_year', $expires_year)),

                                          array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_ISSUE_NUMBER,

                                                'field' => tep_draw_input_field('protx_direct_cc_issue', '', "size=2, maxlength=2")),

                                          array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CVV,

                                                'field' => tep_draw_input_field('protx_direct_cc_cvv','',"size=4, maxlength=4"))));

  } elseif ((MODULE_PAYMENT_PROTX_DIRECT_USE_CVV != 'True' ) && (MODULE_PAYMENT_PROTX_DIRECT_USE_ISSUE == 'True' ) && (MODULE_PAYMENT_PROTX_DIRECT_USE_START == 'True' )) {

// -- cvv ++ issue ++ start date

  $selection = array('id' => $this->code,

                        'module' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CATALOG_TITLE,

      'fields' => array(array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_OWNER,

                                                'field' => tep_draw_input_field('protx_direct_cc_owner', $order->billing['firstname'] . ' ' . $order->billing['lastname'])),

                                          array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_NUMBER,

                                                'field' => tep_draw_input_field('protx_direct_cc_number')),

                                          array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_START_DATE,

                           'field' => tep_draw_pull_down_menu('protx_direct_cc_start_month', $start_month) . ' ' . tep_draw_pull_down_menu('protx_direct_cc_start_year', $start_year)),

                                          array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_EXPIRES,

                                                'field' => tep_draw_pull_down_menu('protx_direct_cc_expires_month', $expires_month) . ' ' . tep_draw_pull_down_menu('protx_direct_cc_expires_year', $expires_year)),

                                          array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_ISSUE_NUMBER,

                                                'field' => tep_draw_input_field('protx_direct_cc_issue', '', "size=2, maxlength=2"))));

  } elseif ((MODULE_PAYMENT_PROTX_DIRECT_USE_ISSUE != 'True' ) && (MODULE_PAYMENT_PROTX_DIRECT_USE_CVV == 'True' ) && (MODULE_PAYMENT_PROTX_DIRECT_USE_START == 'True' )) {

// ++ cvv -- issue ++ start date

  $selection = array('id' => $this->code,

                        'module' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CATALOG_TITLE,

      'fields' => array(array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_OWNER,

                                                'field' => tep_draw_input_field('protx_direct_cc_owner', $order->billing['firstname'] . ' ' . $order->billing['lastname'])),

                                          array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_NUMBER,

                                                'field' => tep_draw_input_field('protx_direct_cc_number')),

                                          array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_START_DATE,

                           'field' => tep_draw_pull_down_menu('protx_direct_cc_start_month', $start_month) . ' ' . tep_draw_pull_down_menu('protx_direct_cc_start_year', $start_year)),

                                          array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_EXPIRES,

                                                'field' => tep_draw_pull_down_menu('protx_direct_cc_expires_month', $expires_month) . ' ' . tep_draw_pull_down_menu('protx_direct_cc_expires_year', $expires_year)),

                                          array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CVV,

                                                'field' => tep_draw_input_field('protx_direct_cc_cvv','',"size=4, maxlength=4"))));

     } elseif ((MODULE_PAYMENT_PROTX_DIRECT_USE_CVV != 'True' ) && (MODULE_PAYMENT_PROTX_DIRECT_USE_ISSUE == 'True' ) && (MODULE_PAYMENT_PROTX_DIRECT_USE_START != 'True' )) {

// -- cvv ++ issue -- start date

  $selection = array('id' => $this->code,

                        'module' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CATALOG_TITLE,

      'fields' => array(array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_OWNER,

                                                'field' => tep_draw_input_field('protx_direct_cc_owner', $order->billing['firstname'] . ' ' . $order->billing['lastname'])),

                                          array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_NUMBER,

                                                'field' => tep_draw_input_field('protx_direct_cc_number')),

                                          array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_EXPIRES,

                                                'field' => tep_draw_pull_down_menu('protx_direct_cc_expires_month', $expires_month) . ' ' . tep_draw_pull_down_menu('protx_direct_cc_expires_year', $expires_year)),

                                          array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_ISSUE_NUMBER,

                                                'field' => tep_draw_input_field('protx_direct_cc_issue', '', "size=2, maxlength=2"))));

  } elseif ((MODULE_PAYMENT_PROTX_DIRECT_USE_CVV == 'True' ) && (MODULE_PAYMENT_PROTX_DIRECT_USE_ISSUE != 'True' ) && (MODULE_PAYMENT_PROTX_DIRECT_USE_START != 'True' )) {

// ++ cvv -- issue -- start date

  $selection = array('id' => $this->code,

                        'module' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CATALOG_TITLE,

      'fields' => array(array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_OWNER,

                                                'field' => tep_draw_input_field('protx_direct_cc_owner', $order->billing['firstname'] . ' ' . $order->billing['lastname'])),

                                          array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_NUMBER,

                                                'field' => tep_draw_input_field('protx_direct_cc_number')),

                                          array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_EXPIRES,

                                                'field' => tep_draw_pull_down_menu('protx_direct_cc_expires_month', $expires_month) . ' ' . tep_draw_pull_down_menu('protx_direct_cc_expires_year', $expires_year)),

                                          array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CVV,

                                                'field' => tep_draw_input_field('protx_direct_cc_cvv','',"size=4, maxlength=4"))));

  } elseif ((MODULE_PAYMENT_PROTX_DIRECT_USE_CVV == 'True' ) && (MODULE_PAYMENT_PROTX_DIRECT_USE_ISSUE == 'True' ) && (MODULE_PAYMENT_PROTX_DIRECT_USE_START != 'True' )) {

// ++ cvv ++ issue -- start date

  $selection = array('id' => $this->code,

                        'module' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CATALOG_TITLE,

      'fields' => array(array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_OWNER,

                                                'field' => tep_draw_input_field('protx_direct_cc_owner', $order->billing['firstname'] . ' ' . $order->billing['lastname'])),

                                          array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_NUMBER,

                                                'field' => tep_draw_input_field('protx_direct_cc_number')),

                                          array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_EXPIRES,

                                                'field' => tep_draw_pull_down_menu('protx_direct_cc_expires_month', $expires_month) . ' ' . tep_draw_pull_down_menu('protx_direct_cc_expires_year', $expires_year)),

                                          array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_ISSUE_NUMBER,

                                                'field' => tep_draw_input_field('protx_direct_cc_issue', '', "size=2, maxlength=2")),

                                          array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CVV,

                                                'field' => tep_draw_input_field('protx_direct_cc_cvv','',"size=4, maxlength=4"))));

  } else {

// -- cvv -- issue -- start date

  $selection = array('id' => $this->code,

                        'module' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CATALOG_TITLE,

      'fields' => array(array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_OWNER,

                                                'field' => tep_draw_input_field('protx_direct_cc_owner', $order->billing['firstname'] . ' ' . $order->billing['lastname'])),

                                          array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_NUMBER,

                                                'field' => tep_draw_input_field('protx_direct_cc_number')),

                                          array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_EXPIRES,

                                                'field' => tep_draw_pull_down_menu('protx_direct_cc_expires_month', $expires_month) . ' ' . tep_draw_pull_down_menu('protx_direct_cc_expires_year', $expires_year))));

        }

     return $selection;

   }

 

 

   // Evaluates the Credit Card Type for acceptance and the validity of the Credit Card Number & Expiration Date

   function pre_confirmation_check() {

     global $HTTP_POST_VARS;

 

     include(DIR_WS_CLASSES . 'cc_validation.php');

 

     $cc_validation = new cc_validation();

     $result = $cc_validation->validate($HTTP_POST_VARS['protx_direct_cc_number'], $HTTP_POST_VARS['protx_direct_cc_expires_month'], $HTTP_POST_VARS['protx_direct_cc_expires_year'], $HTTP_POST_VARS['protx_direct_cc_cvv']);

     $error = '';

     switch ($result) {

       case -1:

         $error = sprintf(TEXT_CCVAL_ERROR_UNKNOWN_CARD, substr($cc_validation->cc_number, 0, 4));

         break;

       case -2:

       case -3:

       case -4:

         $error = TEXT_CCVAL_ERROR_INVALID_DATE;

         break;

       case false:

         $error = TEXT_CCVAL_ERROR_INVALID_NUMBER;

         break;

     }

 

     if ( ($result == false) || ($result < 1) ) {

       $payment_error_return = 'payment_error=' . $this->code . '&error=' . urlencode($error) . '&protx_direct_cc_owner=' . urlencode($HTTP_POST_VARS['protx_direct_cc_owner']) . '&protx_direct_cc_expires_month=' . $HTTP_POST_VARS['protx_direct_cc_expires_month'] . '&protx_direct_cc_expires_year=' . $HTTP_POST_VARS['protx_direct_cc_expires_year'];

 

       tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, $payment_error_return, 'SSL', true, false));

     }

if (MODULE_PAYMENT_PROTX_DIRECT_USE_CVV != 'True' ) {

$this->cc_cvv = '000';

}

     $this->cc_card_type = $cc_validation->cc_type;

     $this->cc_card_number = $cc_validation->cc_number;

     $this->cc_expiry_month = $cc_validation->cc_expiry_month;

     $this->cc_expiry_year = $cc_validation->cc_expiry_year;

   }

 

   // Display Credit Card Information on the Checkout Confirmation Page

function confirmation() {

     global $HTTP_POST_VARS;

if ((MODULE_PAYMENT_PROTX_DIRECT_USE_CVV == 'True' ) && (MODULE_PAYMENT_PROTX_DIRECT_USE_ISSUE == 'True' ) && (MODULE_PAYMENT_PROTX_DIRECT_USE_START == 'True' )) {

// ++ cvv ++ issue ++ start date

  $confirmation = array(//'title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CATALOG_TITLE, // Redundant

          'fields' => array(array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_TYPE,

                                                   'field' => $this->cc_card_type),

          array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_OWNER,

                                                   'field' => $HTTP_POST_VARS['protx_direct_cc_owner']),

                                             array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_NUMBER,

          'field' => substr($this->cc_card_number, 0, 4) . str_repeat('X', (strlen($this->cc_card_number) - 8)) . substr($this->cc_card_number, -4)),

                                             array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_START_DATE,

                                                   'field' => strftime('%B, %Y', mktime(0,0,0,$HTTP_POST_VARS['protx_direct_cc_start_month'], 1, $HTTP_POST_VARS['protx_direct_cc_start_year'])),

                                             array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_EXPIRES,

                                                   'field' => strftime('%B, %Y', mktime(0,0,0,$HTTP_POST_VARS['protx_direct_cc_expires_month'], 1, '20' . $HTTP_POST_VARS['protx_direct_cc_expires_year']))),

                                             array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_ISSUE,

                'field' => $HTTP_POST_VARS['protx_direct_cc_issue']),

                    array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CVV,

                                                   'field' => $HTTP_POST_VARS['protx_direct_cc_cvv']))));

 

     return $confirmation;

  } elseif ((MODULE_PAYMENT_PROTX_DIRECT_USE_CVV != 'True' ) && (MODULE_PAYMENT_PROTX_DIRECT_USE_ISSUE == 'True' ) && (MODULE_PAYMENT_PROTX_DIRECT_USE_START == 'True' )) {

// -- cvv ++ issue ++ start date

  $confirmation = array(//'title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CATALOG_TITLE, // Redundant

          'fields' => array(array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_TYPE,

                                                   'field' => $this->cc_card_type),

          array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_OWNER,

                                                   'field' => $HTTP_POST_VARS['protx_direct_cc_owner']),

                                             array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_NUMBER,

          'field' => substr($this->cc_card_number, 0, 4) . str_repeat('X', (strlen($this->cc_card_number) - 8)) . substr($this->cc_card_number, -4)),

                                             array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_START_DATE,

                                                   'field' => strftime('%B, %Y', mktime(0,0,0,$HTTP_POST_VARS['protx_direct_cc_start_month'], 1, '20' . $HTTP_POST_VARS['protx_direct_cc_start_year'])),

                                             array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_EXPIRES,

                                                   'field' => strftime('%B, %Y', mktime(0,0,0,$HTTP_POST_VARS['protx_direct_cc_expires_month'], 1, '20' . $HTTP_POST_VARS['protx_direct_cc_expires_year']))),

                                             array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_ISSUE,

                'field' => $HTTP_POST_VARS['protx_direct_cc_issue']))));

 

     return $confirmation;

  } elseif ((MODULE_PAYMENT_PROTX_DIRECT_USE_CVV == 'True' ) && (MODULE_PAYMENT_PROTX_DIRECT_USE_ISSUE != 'True' ) && (MODULE_PAYMENT_PROTX_DIRECT_USE_START == 'True' )) {

// ++ cvv -- issue ++ start date

  $confirmation = array(//'title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CATALOG_TITLE, // Redundant

          'fields' => array(array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_TYPE,

                                                   'field' => $this->cc_card_type),

          array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_OWNER,

                                                   'field' => $HTTP_POST_VARS['protx_direct_cc_owner']),

                                             array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_NUMBER,

          'field' => substr($this->cc_card_number, 0, 4) . str_repeat('X', (strlen($this->cc_card_number) - 8)) . substr($this->cc_card_number, -4)),

                                             array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_START_DATE,

                                                   'field' => strftime('%B, %Y', mktime(0,0,0,$HTTP_POST_VARS['protx_direct_cc_start_month'], 1, '20' . $HTTP_POST_VARS['protx_direct_cc_start_year'])),

                                             array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_EXPIRES,

                                                   'field' => strftime('%B, %Y', mktime(0,0,0,$HTTP_POST_VARS['protx_direct_cc_expires_month'], 1, '20' . $HTTP_POST_VARS['protx_direct_cc_expires_year']))),

                    array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CVV,

                                                   'field' => $HTTP_POST_VARS['protx_direct_cc_cvv'])),

));

     return $confirmation;

  } elseif ((MODULE_PAYMENT_PROTX_DIRECT_USE_CVV != 'True' ) && (MODULE_PAYMENT_PROTX_DIRECT_USE_ISSUE == 'True' ) && (MODULE_PAYMENT_PROTX_DIRECT_USE_START != 'True' )) {

// -- cvv ++ issue -- start date

  $confirmation = array(//'title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CATALOG_TITLE, // Redundant

          'fields' => array(array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_TYPE,

                                                   'field' => $this->cc_card_type),

          array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_OWNER,

                                                   'field' => $HTTP_POST_VARS['protx_direct_cc_owner']),

                                             array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_NUMBER,

          'field' => substr($this->cc_card_number, 0, 4) . str_repeat('X', (strlen($this->cc_card_number) - 8)) . substr($this->cc_card_number, -4)),

                                             array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_EXPIRES,

                                                   'field' => strftime('%B, %Y', mktime(0,0,0,$HTTP_POST_VARS['protx_direct_cc_expires_month'], 1, '20' . $HTTP_POST_VARS['protx_direct_cc_expires_year']))),

                                             array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_ISSUE,

                'field' => $HTTP_POST_VARS['protx_direct_cc_issue'])));

 

     return $confirmation;

  } elseif ((MODULE_PAYMENT_PROTX_DIRECT_USE_CVV == 'True' ) && (MODULE_PAYMENT_PROTX_DIRECT_USE_ISSUE != 'True' ) && (MODULE_PAYMENT_PROTX_DIRECT_USE_START != 'True' )) {

// ++ cvv -- issue -- start date

  $confirmation = array(//'title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CATALOG_TITLE, // Redundant

          'fields' => array(array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_TYPE,

                                                   'field' => $this->cc_card_type),

          array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_OWNER,

                                                   'field' => $HTTP_POST_VARS['protx_direct_cc_owner']),

                                             array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_NUMBER,

          'field' => substr($this->cc_card_number, 0, 4) . str_repeat('X', (strlen($this->cc_card_number) - 8)) . substr($this->cc_card_number, -4)),

                                             array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_EXPIRES,

                                                   'field' => strftime('%B, %Y', mktime(0,0,0,$HTTP_POST_VARS['protx_direct_cc_expires_month'], 1, '20' . $HTTP_POST_VARS['protx_direct_cc_expires_year']))),

                    array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CVV,

                                                   'field' => $HTTP_POST_VARS['protx_direct_cc_cvv']),

));

     return $confirmation;

  } elseif ((MODULE_PAYMENT_PROTX_DIRECT_USE_CVV != 'True' ) && (MODULE_PAYMENT_PROTX_DIRECT_USE_ISSUE != 'True' ) && (MODULE_PAYMENT_PROTX_DIRECT_USE_START == 'True' )) {

// -- cvv -- issue ++ start date

  $confirmation = array(//'title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CATALOG_TITLE, // Redundant

          'fields' => array(array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_TYPE,

                                                   'field' => $this->cc_card_type),

          array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_OWNER,

                                                   'field' => $HTTP_POST_VARS['protx_direct_cc_owner']),

                                             array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_NUMBER,

          'field' => substr($this->cc_card_number, 0, 4) . str_repeat('X', (strlen($this->cc_card_number) - 8)) . substr($this->cc_card_number, -4)),

                                             array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_START_DATE,

                                                   'field' => strftime('%B, %Y', mktime(0,0,0,$HTTP_POST_VARS['protx_direct_cc_start_month'], 1, '20' . $HTTP_POST_VARS['protx_direct_cc_start_year'])),

                                             array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_EXPIRES,

                                                   'field' => strftime('%B, %Y', mktime(0,0,0,$HTTP_POST_VARS['protx_direct_cc_expires_month'], 1, '20' . $HTTP_POST_VARS['protx_direct_cc_expires_year'])))),

));

     return $confirmation;

  } elseif ((MODULE_PAYMENT_PROTX_DIRECT_USE_CVV != 'True' ) && (MODULE_PAYMENT_PROTX_DIRECT_USE_ISSUE != 'True' ) && (MODULE_PAYMENT_PROTX_DIRECT_USE_START == 'True' )) {

// ++ cvv ++ issue -- start date

  $confirmation = array(//'title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CATALOG_TITLE, // Redundant

          'fields' => array(array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_TYPE,

                                                   'field' => $this->cc_card_type),

          array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_OWNER,

                                                   'field' => $HTTP_POST_VARS['protx_direct_cc_owner']),

                                             array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_NUMBER,

          'field' => substr($this->cc_card_number, 0, 4) . str_repeat('X', (strlen($this->cc_card_number) - 8)) . substr($this->cc_card_number, -4)),

                                             array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_EXPIRES,

                                                   'field' => strftime('%B, %Y', mktime(0,0,0,$HTTP_POST_VARS['protx_direct_cc_expires_month'], 1, '20' . $HTTP_POST_VARS['protx_direct_cc_expires_year']))),

                                             array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_ISSUE,

                'field' => $HTTP_POST_VARS['protx_direct_cc_issue']),

                    array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CVV,

                                                   'field' => $HTTP_POST_VARS['protx_direct_cc_cvv'])));

 

     return $confirmation;

  } else {

// -- cvv -- issue -- start date

  $confirmation = array(//'title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CATALOG_TITLE, // Redundant

          'fields' => array(array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_TYPE,

                                                   'field' => $this->cc_card_type),

          array('title' => MODULE_PAYMENT_PROTX_DIRECT_TEXT_CREDIT_CARD_OWNER,

                        &nb

Mary-Ann

Chief Cook and Bottlewasher

Jack-of-All-Trades

Running 2.2MS2

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...