Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

LinkPoint Error - Total Not Matching


itwebsolution

Recommended Posts

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?

Link to comment
Share on other sites

  • 5 months later...

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?

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...