Ask about general coding issues or problems here.
Moderators: macek, egami, gesf
- New php-forum User
- Posts: 1
- Joined: Tue Oct 11, 2011 4:50 am
I've encountered difficulties how to integrate a payment gateway for the credit cards with my Zen Cart e-commerce website.
My shopping cart works fine. Demo shopping cart at the remote server of the payment gateway provider also works with no problems. But the problem occurs after I confirm an order in Zen Cart and should be pointed to a hosted payment page. After I am redirected I don't reach the hosted payment page but see the error page which says that transaction amount missing!
<?xml version="1.0" encoding="UTF-8"?>
<transaction name="PaymentInit" version="1"><response type="error"><error_code_tag>CGW000260</error_code_tag><error_text>ERROR - CGW000260-Transaction Amount Missing</error_text></response></transaction>
I've spoken with my provider customer support and been told to amend one php file by putting a line which would load info from my Zen shopping cart about the price!? Here is how that section of php file looks like (just to mention, this file is at provider server and has a function to connect my shopping cart and the hosted payment page):
// Get and Store the quantity and price per unit and total price in session for the reciept page.
$quantity = $_REQUEST['quantity'];
$pricePerUnit = 12.34;
$price = $quantity * $pricePerUnit;
$_SESSION['quantity'] = $quantity;
$_SESSION['unitPrice'] = $pricePerUnit;
$_SESSION['totalPrice'] = $price;
The line which should be changed is in red colour (12.34 is the amount that has remained as an example at the demo shop and should be replaced with the code that reffers to the price).
I have tried to put this but with no effect:
$pricePerUnit = $_REQUEST['unitPrice'];
If you need more info to figure out what goes wrong let me know.
- New php-forum User
- Posts: 11
- Joined: Thu Oct 11, 2012 9:21 pm
Building e commerce website is not an easy task because the main thing is payment gateway integration with the site. I am not using Zencart gateway but my favorite gateway is merchantinc.com which is best secure and merchant friendly, with this gateway you are part of protected network that is PCI certified.
Return to “PHP coding => General”
Who is online
Users browsing this forum: No registered users and 1 guest