Knowledgebase: Payment Modules
CRESecure Gift Voucher order total $0.00 fix
Posted by on 14 November 2013 05:15 PM

Version: Loaded 6.5.xx

Reported Issue:

Using CRESecure, if you apply a gift voucher to make your total $0.00, the cart is still sending you to CRESecure to checkout when it should not since the total is $0.00

Resolution:

templates/content/checkout_confirmation.tpl.php 

CODE:

 if (isset($_POST['payment']) && $_POST['payment'] == 'paypal_wpp_dp') {            $process_button_string = process_dp_button();            if (defined('MODULE_PAYMENT_CRESECURE_TEST_MODE') && MODULE_PAYMENT_CRESECURE_TEST_MODE == 'True') {                //$this->form_action_url = 'https://dev-cresecure.net/securepayments/a1/cc_collection.php';  // cre only internal test url              $form_action_url = 'https://sandbox-cresecure.net/securepayments/a1/cc_collection.php';  // sandbox url            } else {                 $form_action_url = 'https://cresecure.net/securepayments/a1/cc_collection.php';  // production url            }           } else if (isset($$payment->form_action_url)) {            $form_action_url = $$payment->form_action_url;          } else {              $form_action_url = tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL');          }                   

REPLACE WITH:


if (isset($_POST['payment']) && $_POST['payment'] == 'paypal_wpp_dp') {            $process_button_string = process_dp_button();            if (defined('MODULE_PAYMENT_CRESECURE_TEST_MODE') && MODULE_PAYMENT_CRESECURE_TEST_MODE == 'True') {                //$this->form_action_url = 'https://dev-cresecure.net/securepayments/a1/cc_collection.php';  // cre only internal test url              $form_action_url = 'https://sandbox-cresecure.net/securepayments/a1/cc_collection.php';  // sandbox url            } else {                 $form_action_url = 'https://cresecure.net/securepayments/a1/cc_collection.php';  // production url            }           } else if (isset($$payment->form_action_url)) {            $form_action_url = $$payment->form_action_url;          } else {              $form_action_url = tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL');          }                    // added for CRESECURE $0.00 orders          if (defined('MODULE_PAYMENT_CRESECURE_STATUS') && MODULE_PAYMENT_CRESECURE_STATUS == 'True') {            if ($order->info['total'] <= 0) {              $form_action_url = tep_href_link(FILENAME_CHECKOUT_PROCESS, 'order_id=' . end(explode("-", $_SESSION['cart_cresecure_ID'])) . '&code=000', 'SSL');            }          } 

(0 vote(s))
This article was helpful
This article was not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
Help Desk Software by Kayako Fusion