In interesting issue when passing amounts.. Anyone seen this before?
Posted 20 October 2006 - 07:36 AM
All calculations and totals are generated on server-side, and being logged correctly, but incorrect amount is being passed to payment gateway.
here is a sample of what's happening:
Product A Qty 2 @ 1.00 ea
Product C Qty 1 @ 1.00 ea
Total amount being captured and sent in our var ordertotal in our reciept emails and admin sales table is $3.00, BUT when we send to process at the payment gateway, ONLY $2.00 is sent .. which clearly leads to the conclusion that the multiplication is not correct on QTY, but it store fine on our side.. It does not happen in all cases! Could this be a browser issue? It's my last resort as it's just not making sense!
SOS.. any ideas?
Posted 20 October 2006 - 07:51 AM
Then, if they are incorrect, you can work backwards until you find where they become incorrect.
Posted 20 October 2006 - 03:32 PM
Thanks for the good point, but we attempted this already, and all numbers are being passed properly... It just does not make sense!
Posted 20 October 2006 - 04:25 PM
If you are sending quantities and per item amounts and you have verified that you are sending the correct numbers, check the documentation for the payment gateway. Perhaps you are not sending it in the correct format.
However, if you are sending just the order total, then the error must lie within your code. I ran into a similar issue on an application for my last company. The amount displayed to the users and in the administration was the same number, but there were some instances where the amount charged to the user's CC was off by 1-3 cents. It turned out that there were two different sets of processes to calculate the order total. One for calculating the amount for display purposes, then another process was done to calculate the amount to send to the bank. And there was a rounding error in one. Double check your code to be sure you are using the same function to determine the amount total.
I do not always test the code I provide, so there may be some syntax errors. In 99% of all cases I found the solution to your problem here: http://www.php.net
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users