Example #1
0
 function pre_confirmation_check()
 {
     global $messageStack;
     if (PHP_VERSION < 4.1) {
         global $_POST;
     }
     if (!tep_validate_credit_card($_POST['cc_number'])) {
         $messageStack->add_session('checkout_payment', TEXT_CCVAL_ERROR_INVALID_NUMBER, 'error');
         $payment_error_return = 'cc_owner=' . urlencode($_POST['cc_owner']) . '&cc_expires_month=' . urlencode($_POST['cc_expires_month']) . '&cc_expires_year=' . urlencode($_POST['cc_expires_year']);
         tep_redirect(tep_href_link(FILENAME_CHECKOUT, 'payment&' . $payment_error_return, 'SSL'));
     }
     $this->cc_card_type = $_POST['cc_type'];
     $this->cc_card_number = $_POST['cc_number'];
 }
 function pre_confirmation_check()
 {
     global $messageStack;
     if (PHP_VERSION < 4.1) {
         global $_POST;
     }
     if (MODULE_PAYMENT_AUTHORIZENET_METHOD == 'Credit Card') {
         if (!tep_validate_credit_card($_POST['ipayment_cc_number'])) {
             $messageStack->add_session('checkout_payment', TEXT_CCVAL_ERROR_INVALID_NUMBER, 'error');
             $payment_error_return = 'payment_error=' . $this->code . '&error=' . urlencode($error) . '&authorizenet_cc_owner=' . urlencode($_POST['authorizenet_cc_owner']) . '&authorizenet_cc_expires_month=' . $_POST['authorizenet_cc_expires_month'] . '&authorizenet_cc_expires_year=' . $_POST['authorizenet_cc_expires_year'];
             tep_redirect(tep_href_link(FILENAME_CHECKOUT, 'payment&' . $payment_error_return, 'SSL'));
         }
         $this->cc_card_owner = $_POST['ipayment_cc_owner'];
         $this->cc_card_type = $_POST['authorizenet_cc_type'];
         $this->cc_card_number = $_POST['authorizenet_cc_number'];
         $this->cc_expiry_month = $_POST['authorizenet_cc_expires_month'];
         $this->cc_expiry_year = $_POST['authorizenet_cc_expires_year'];
     }
 }