itwebsolution Posted February 22, 2005 Share Posted February 22, 2005 There has been an error processing your credit card, please try again : CC-4019: Total charge amount did not match sum of the subtotal, shipping, tax and vattax amounts. This error is occuring on selected products. I have updated with the latest version of the LinkPoint contribution and set the sub-total to come after any discounts. The error occurs regardless if a user is using a discount voucher or not. How do I verify that the Order Total calculations are not being rounded incorrectly? Quote Link to comment Share on other sites More sharing options...
Guest Posted August 2, 2005 Share Posted August 2, 2005 try this (taken from LinkpointMS1 V1.5 contribution--which isn't available anymore in contribution listing... don't know why): credit_voucher_gift_card_hack.txt: Simple really, just had to figure out the "PHP" way to do it. Just a couple of edits so I won't include full files. In /catalog/includes/modules/ot_coupon.php: Find lines: if ($od_amount > 0) { $order->info['total'] = $order->info['total'] - $od_amount; Add this line right after: $_SESSION['od_amount'] = $od_amount; In /catalog/includes/modules/ot_subtotal.php: Find lines: function process() { global $order, $currencies; Add right after: $od_amount = $_SESSION['od_amount']; $subtotal = $order->info['subtotal'] - $od_amount; $order->info['subtotal'] = $order->info['subtotal'] - $od_amount; Then, make sure the sort order of the payment lines (via OSCommerce admin site) puts discount before subtotal. Essentially, I just used the global PHP session to make the discount amount available in the standard subtotal routine. There may be more correct ways to do it but it works. This error is occuring on selected products. I have updated with the latest version of the LinkPoint contribution and set the sub-total to come after any discounts. The error occurs regardless if a user is using a discount voucher or not. How do I verify that the Order Total calculations are not being rounded incorrectly? <{POST_SNAPBACK}> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.