programguru Posted October 20, 2006 Share Posted October 20, 2006 Ok simple breakdown: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 eaProduct C Qty 1 @ 1.00 eaTotal 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? Link to comment https://forums.phpfreaks.com/topic/24517-in-interesting-issue-when-passing-amounts-anyone-seen-this-before/ Share on other sites More sharing options...
btherl Posted October 20, 2006 Share Posted October 20, 2006 I would try printing out the values you send to the gateway right before you send them. You can display them in the browser or you can write them to a file. If the gateway is receiving the wrong values, then printing out the values right before they are sent should show incorrect values too.Then, if they are incorrect, you can work backwards until you find where they become incorrect. Link to comment https://forums.phpfreaks.com/topic/24517-in-interesting-issue-when-passing-amounts-anyone-seen-this-before/#findComment-111715 Share on other sites More sharing options...
programguru Posted October 20, 2006 Author Share Posted October 20, 2006 btherl, Thanks for the good point, but we attempted this already, and all numbers are being passed properly... It just does not make sense! Link to comment https://forums.phpfreaks.com/topic/24517-in-interesting-issue-when-passing-amounts-anyone-seen-this-before/#findComment-111879 Share on other sites More sharing options...
Psycho Posted October 20, 2006 Share Posted October 20, 2006 When you send data to the payment gateway are you sending quantities and per item prices or are you sending the total amount?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. Link to comment https://forums.phpfreaks.com/topic/24517-in-interesting-issue-when-passing-amounts-anyone-seen-this-before/#findComment-111920 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.