Zen Cart Logo
Forums / Addon Payment Modules / Transaction Amount Missing

Transaction Amount Missing

Views: 911

Results 1 to 2 of 2
10 Oct 2011, 1:25 PM
#1
lazar avatar

lazar

Zen Follower

Join Date:
Feb 2011
Location:
Between London and Cetinje
Posts:
109
Plugin Contributions:
0

Transaction Amount Missing

Hi,

I installed very simple payment module donwloaded from Zen Cart free modules page. I amended and adapted the module to my needs by changing an action URL which leads me to payment gateway of its provider.

But the process can't be completed beacuse I've got an error message "Transaction Amount Missing".
Everything is fine during checkout process in Zen Cart. This problem occurs after I confirm order (during a redirection to the payment page on my provider site).

Does anyone have an idea what the problem should be?

Many thanks.

11 Oct 2011, 1:35 PM
#2
lazar avatar

lazar

Zen Follower

Join Date:
Feb 2011
Location:
Between London and Cetinje
Posts:
109
Plugin Contributions:
0

Re: Transaction Amount Missing

Here more details that might be useful regarding my question above.
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.

Many thanks.