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.
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.
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.
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.