How to Integrate Hosted Checkout with Zen Cart version 1.5.x

Created by Richard Moore, Modified on Wed, 12 Apr 2023 at 12:02 PM by Richard Moore

ZenCart can be integrated using the Authorize.net SIM method.


First, create a new Payment Page within the Real-time Payment Manager's Payment Page wizard or navigate to an existing Payment Page. On the Receipt Page tab you will need to enter the following information:



  • On the Receipt Page Settings, choose the second option for Link using HTTP POST

  • Set the Receipt Link Text to “Click here to complete your order” (or whatever you want it to say).

  • Set the Receipt Link URL to “http://[ZENCART FOLDER]/index.php?main_page=checkout_process&action=confirm”

  • Check both the boxes for “Allow Relay Response” and “Allow HTTP Redirect to Merchant Website

  • Set the Relay Response URL to: “http://[ZENCART FOLDER]/index.php?main_page=checkout_process&action=confirm”


*Note:  The above URLs may vary based on where you save the ZenCart File but should always start with the folder where ZenCart is installed. 


 


Screen_Shot_2013-12-18_at_9.11.06_AM.png


 


 


Log into ZenCart


Once you have ZenCart installed, go to Modules->Payment click on “Authorize.net (SIM)” and then “Install” to enable the module on your cart. Once you have it installed, click on the module.


Module Settings


ZenCart_Configuration.png


The Transaction Mode will need to be set to whichever server you are using. Demo accounts will need to use Test and Production will use Production.


Enter your Payment Page ID into the Login ID Field.  You can find your Payment Page ID by clicking on the Payment Pages tab in the Real-time Payment Manager (RPM).  If you have already created a payment page you will see the ID in the first column of the grey table. 


Enter your Transaction Key in the Transaction Key field. You can find your Transaction Key by clicking on your Payment Page and selecting #7: Security.  From the Security Tab under Response Key, click on Generate New Response Key. Copy that value and paste it into the MD5 Hash Field.


Save Settings 


Once these settings are saved, you will need to modify the code of the Authorize.net module.  Locate the file “authorizenet.php” in the “zencart/includes/modules/payment” directory.


Search in the file for the following lines and replace them as indicated with the Hosted Checkout URLs.


Replace: https://secure.authorize.net/gateway/transact.dll’ with: https://checkout.e-xact.com/payment’


Replace:  https://test.authorize.net/gateway/transact.dll’ with: 'https://rpm.demo.e-xact.com/payment


The code should look like this:


$this->form_action_url = ‘https://checkout.e-xact.com/payment’;
if (AUTHORIZENET_DEVELOPER_MODE == ‘on’) $this->form_action_url = 'https://rpm.demo.e-xact.com/payment’;


Next go to Search for the following code and replace as indicated.


Replace return strtoupper($validating); with return strtolower($validating); 


Now save and upload this file back into your site. Your ZenCart shopping cart is now connected to Hosted Checkout.


 

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article