Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Authorize.net and Coupons Not working


thekingfisher

Recommended Posts

Hello All,

For some reason I can't get A.net to work with coupons. On all of the checkout pages the order total is being calculated correctly, the customer email has the correct discounted total, the order record as viewed in the admin area has the correct total, but A.net charges the full "undiscounted" amount. I've seen a few people ask about something similar but have never seen any answers or solutions. Any ideas?

Link to comment
Share on other sites

OK. I did fix this and I'm posting the fix for anyone else who runs into this problem. First let me say that this is not the way I normally fix something like this but after countless hours of voiding sales on Authorize.net and jacking the code around I got sick of it and fixed it this way.

 

First on checkout_confirmation.php around line 288(I have some contributions installed so yours may be different):

 

After:

  if (MODULE_ORDER_TOTAL_INSTALLED) {
   $order_total_modules->process();
   echo $order_total_modules->output();

 

Add:

$_SESSION['mytotal']= $order->info['total'];

 

 

Then on authorizenet_aim.php around line 244:

 

Change:

x_amount => number_format($order->info['total'], 2),

 

To:

x_amount => $_SESSION['mytotal'],

 

If anybody sees an issue with this fix I'd like to hear it but we've tested it and it seems to work fine.

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.

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...