Jump to content
Vger

[CONTRIBUTION] Authorize Net AIM module

Recommended Posts

Vger,

 

I'm sorry to say it, but after de-installing mauriziomagnino's version of CCGV and reinstalling CCGV(trad) (which was an all day affair!), I am still getting the same problem. If I create a discount voucher for $20, then cash it in on an order and pay for the rest with a MasterCard, Authorize.net shows a charge that equals the total amount, not the total amount minus $20. This is despite the fact that the total amount displays correctly on checkout_payment.php, as well as in admin/orders.php, and in the order confirmation email.

 

Could this possibly have something to do with the sort orders I have setup in the order totals module? Those are as follow:

 

Discount Coupons 9

Easy Discount 2 (A contribution available at http://www.oscommerce.com/community/contributions,3945)

Gift Vouchers 740

Low Order Fee (Not installed)

Shipping 4

Sub-Total 3

Tax 5

Total 10

 

I would really appreciate any ideas you might have. Thanks!

 

 

 

The last post in that thread for CCGV by mauriziomagnino (deleted at my request) was to tell people to use CCGV(trad) instead, because it works, and directing people to the CCGV(trad) support thread. This was after he had been responsible for 6 out of the last 7 updates to CCGV himself - not exactly inspiring.

 

The reason I had his post deleted, flattering though it was, was because of all of the people who were coming to my support thread for CCGV(trad) for help with CCGV - which is in a mess.

 

This is my roundabout way of saying "uninstall CCGV and install CCGV(trad) in its place".

 

Vger

Share this post


Link to post
Share on other sites

If you are only using Authorize Net for payment and are not using any other payment method then you can try this. In checkout_process.php where you see this:

// load the before_process function from the payment modules
 $payment_modules->before_process();

 require(DIR_WS_CLASSES . 'order_total.php');
 $order_total_modules = new order_total;

 $order_totals = $order_total_modules->process();

 

change it to this:

 

require(DIR_WS_CLASSES . 'order_total.php');
 $order_total_modules = new order_total;

// load the before_process function from the payment modules
 $payment_modules->before_process();

 $order_totals = $order_total_modules->process();

 

If you make this change when you also use other payment methods you will receive a class error.

 

Vger

Share this post


Link to post
Share on other sites

I have CCGV installed and looks to be working great, however, when I do a test purchase of a GIFT_01 ($0.01 Gift Card) and go to send it, I get this error along the bottom of the page:

 

Error!

 

Unable to determine the page link!

 

I have my search friendly URLS set to false, my gift voucher model number starts with GIFT_, the only other contrib. I installed is the Auth.net.

 

Help please, thanks!

 

site: www.fliton.com/catalog/

Share this post


Link to post
Share on other sites

I made this change, and am not using any other payment module, so no class error, but unfortunatley the amount transmitted to Authorize.net is still the original total, not including the CCGV voucher or coupon.

 

Any further suggestions? Thanks -- I *do* really appreciate the help!!

 

 

If you are only using Authorize Net for payment and are not using any other payment method then you can try this. In checkout_process.php where you see this:

// load the before_process function from the payment modules
 $payment_modules->before_process();

 require(DIR_WS_CLASSES . 'order_total.php');
 $order_total_modules = new order_total;

 $order_totals = $order_total_modules->process();

 

change it to this:

 

require(DIR_WS_CLASSES . 'order_total.php');
 $order_total_modules = new order_total;

// load the before_process function from the payment modules
 $payment_modules->before_process();

 $order_totals = $order_total_modules->process();

 

If you make this change when you also use other payment methods you will receive a class error.

 

Vger

Share this post


Link to post
Share on other sites
I have CCGV installed and looks to be working great, however, when I do a test purchase of a GIFT_01 ($0.01 Gift Card) and go to send it, I get this error along the bottom of the page:

 

Error!

 

Unable to determine the page link!

 

I have my search friendly URLS set to false, my gift voucher model number starts with GIFT_, the only other contrib. I installed is the Auth.net.

 

Help please, thanks!

 

site: www.fliton.com/catalog/

 

Ok, so I was playing around with this and noticed that my session was probably timed out. When I tried it again after a fresh login, I got the successful message.

 

HOWEVER, the recipient never got the email.

 

Rhea, do you know why the recipient didn't get any email?

Share this post


Link to post
Share on other sites

If the recipient didn't get any email then it's usually because the order didn't finalise through checkout_process and checkout_success.

 

Vger

Share this post


Link to post
Share on other sites

What does this mean???

 

The credit card type you've chosen does not match the credit card number entered. Please check the number and credit card type and try again.

 

I am using my credit card to check an account of mine and there is nothing wrong with it. It is a mastercard.

 

Register globals is on also.

Edited by modom

Share this post


Link to post
Share on other sites

The card validation works by checking against includes/classes/cc_validation.php - which unfortunately is years out of date now, given that it hasn't been updated since osCommerce was first launched.

 

There are whole new card issue numbers which aren't covered by that file, and MasterCard new issues are a particular problem.

 

You need to look in contributions to see if there is a newer cc_validation.php file or see if you can update with info from other payment modules which do the validation within the file itself.

 

Vger

Share this post


Link to post
Share on other sites

only thing about this is that I have several other clients using the same system and there are no problems. The orders are going through so why this one account?

 

I tested another account and it works perfectly. Also, I have compared files with this other account but will do so again to make sure I didn't miss anything.

Share this post


Link to post
Share on other sites

This validation does rely on javscript, so make sure that you have it enabled in your browser - that's the only other thing I can think of.

 

Vger

Share this post


Link to post
Share on other sites

I tried with both IE and Mozilla so no luck. I have a feeling now that it has something to do with this client's account so am waiting on them to respond.

Share this post


Link to post
Share on other sites

ok here's the latest...

 

My client tested this with her visa and works great.

 

She also tested with amex and gets the same error as I do with my mastercard.

 

I just got a later version of the cc_validation.php file and changed it over and now mastercard is working.

Edited by modom

Share this post


Link to post
Share on other sites

Vger it works on another client's site on the old code so it really doesn't make sense that one would work with the old and one with the newer changed code.

 

It seems the only difference between the 2 is the cvv code on the cc_validation.php page.

 

I tested the old coded site and there were 2 contributions added, one for cvv only and one for authorize.net called authorize1.7 by austin renfroe which has a different cc_validation.php page that includes the cvv info. Although I have this one I cannot find it in the contributions section.

 

I took austin renfroe's one and changed the cc_validation.php page to the 1.8 version and it started working.

Edited by modom

Share this post


Link to post
Share on other sites

This is a change that should be included in the next version.

 

 

catalog/includes/modules/payment/authorizenet_aim.php

AT LINE 338 CHANGE

 

 

tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . $x_response_text . ' - ' . urlencode(MODULE_PAYMENT_AUTHORIZENET_AIM_TEXT_DECLINED_MESSAGE), 'SSL', true, false));

 

 

 

WITH

 

tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'payment_error=' . $this->code . '&error=' . $x_response_text . ' - ' . urlencode(MODULE_PAYMENT_AUTHORIZENET_AIM_TEXT_DECLINED_MESSAGE), 'SSL', true, false));

 

 

This will 'display' the error, if authorize.net does return error, if ID or TRANSKEY supplied was wrong.

 

One important info for newbees, a valid ID and TRANSKEY is required even for a test mode.

Share this post


Link to post
Share on other sites
This validation does rely on javscript, so make sure that you have it enabled in your browser - that's the only other thing I can think of.

 

Vger

Vger, what can i say except take my hat off to you...

 

I just added this mod to a heavily templated site and it works a treat. After all the fiddling around I had to do to get other contributions working, it was a doddle to replace the stock authorizenet with this one.

 

Thanks :thumbsup:

Edited by chooch

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Share this post


Link to post
Share on other sites

I am still having trouble getting the order total submitted to Authorize.net to actually match what the total should be after applying coupons and/or vouchers, in CCGV (trad). Even though the total shows correctly everywhere in osCommerce (on the checkout confirmation, the confirmation email sent to the customer, and in the order record that's created), the total submitted to Authorize.net always excludes any CCGV discounts.

 

Vger, I made the modification to checkout_process.php you suggested in your post on 12/12, using a clean version of checkout_process.php, as it comes in the most recent package of CCGV(trad). Still, the same thing happened.

 

I turned back on the original Authorize.net module to test whether the problem had since transported itself there, but the correct total was sent to Authorize.net with that module. So somewhere our new AIM module is getting confused.

 

Looking at the array to be transmitted to Authorize.net, in includes/modules/payment/authorizenet_aim.php, I isolated the line that populates the order total amount, to compare that to the same process that happens in the regular authorizenet.php module. But in both modules, that line is identical:

 

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

 

My thought there was obviously to check whether your AIM version was looking at a different field when populating the order total data. But that doesn't seem to be the case.

 

What would you suggest I try at this point? Thanks in advance.

 

-Marc

 

I made this change, and am not using any other payment module, so no class error, but unfortunatley the amount transmitted to Authorize.net is still the original total, not including the CCGV voucher or coupon.

 

Any further suggestions? Thanks -- I *do* really appreciate the help!!

Share this post


Link to post
Share on other sites
I am still having trouble getting the order total submitted to Authorize.net to actually match what the total should be after applying coupons and/or vouchers, in CCGV (trad).

 

I've just had the same problem with another payment module (saferpay). It also takes $order->info['total'] for the total account.

 

I put a echo $order->info['total']; at the end of checkout_confirmation.php and received the correct amount. So obviously the $order->info['total'] changes during the execution of checkout_confirmation.php and if the payment module is called too early it get's the wrong amount.

 

I had to move this one down a bit and then it worked:

if (is_array($payment_modules->modules))

$payment_modules->pre_confirmation_check();

 

 

Cheers,

Bumba

Share this post


Link to post
Share on other sites

Bumba,

 

I moved the three lines you reference down to just above the area where the html output begins, but still no difference. There are some additional calls below that, but I am reluctant to start messing with things that are nested in the formatting area. When you say you moved these three lines "down a bit," can you provide any more specifics about how far down? Or in what section? Or what lines they followed?

 

Also, I don't understand why these lines would be affecting this issue, since they don't touch info['total'], which is really where the problem seems to be. The authorizenet_aim.php file appears to be using the same '$order' object variable ('$order->info['total']') as the other areas. Can anyone explain why this is happening and how to fix it?

 

Thanks,

Marc

 

I've just had the same problem with another payment module (saferpay). It also takes $order->info['total'] for the total account.

 

I put a echo $order->info['total']; at the end of checkout_confirmation.php and received the correct amount. So obviously the $order->info['total'] changes during the execution of checkout_confirmation.php and if the payment module is called too early it get's the wrong amount.

 

I had to move this one down a bit and then it worked:

if (is_array($payment_modules->modules))

$payment_modules->pre_confirmation_check();

Cheers,

Bumba

Share this post


Link to post
Share on other sites

Thanks to all that helped with this mod, I had only a few bumps with installing this. I left this one till nearly last on my list because I figured the processing mod would be a nightmare to remember....not the case, something like 3 files to modify and a few new files.

 

****NOTE TO GODADDY USERS ********

 

Search the forum for the needed curopt settings in the includes/authorizenet_aim.php file, just drop them in as said and bingo!

 

***Note to self, next time don't use Godaddy <_<


Installed Modules:

Dynamenu, InfoBox Admin, Master Products v.1.2, Header Tags Controller, Multiple Products Manager, Quick Edit in Admin, Secure Admin, Ultimate SEO URL's, EZ Secure Order, Easy Populate v.2.76d MS2, AuthorizeNet_AIM, ChangeFinal Breadcrumb Title, FedEx Labels, Fedex Direct 2.06, How Did you Hear 1.5, Login a la Amazon, UPS XML 1.2.4, USPS Labels, USPS Methods API MS2

Share this post


Link to post
Share on other sites

I have a heavily customized and templated shopping cart that i'm nearing completion. Everything has been downloaded / installed within the last 2 months, so i presume i have the latest patches, versions, fixes, etc. I am having problems with this module.

 

I'm getting the big red bar, but it doesn't provide much info, this is directly copied/paste:

 

This transaction cannot be accepted. - Your credit card could not be authorized for this reason. Please correct any information and try again or contact us for further assistance.

A few things with my current setup:

I've tried different card variations recommended by the module config.

I've tried different Test/transaction variations

My client's authorize.net account is up and running, in live mode. He's already doing biz with it, so I can't put it in test, if that's what i need to do.

This site is in development, behind the scenes. Meaning, we're hitting the IP address of the site, not the full domain name. Once we throw the DNS switch, i'll update all config.php's with correct.

SSL is enabled, but only temporary, issued by my Host/Cpanel. We're awaiting our real cert to get approved at this time.

The pre-installed authorize.net module also doesn't work, and gives a similar, unclear message. With this, i'm guessing it's something with my server and/or install and/or config.

 

Here's the site: http://216.81.70.195/catalog/

 

I've spent time digging through this forum, and other oscommerce threads, but to no avail. It's been hours and hours over a few days of troubleshooting now, so it's time i come straight to the source ;)

 

Any advice would be greatly appreciated!

Thanks,

Blake

Share this post


Link to post
Share on other sites
heavily customized and templated

 

1. Is this heavily customised cart actually osCommerce or some 'loaded' version.

2. Are you using a template system e.g. Basic Template or Simple Template System.

 

Vger

Share this post


Link to post
Share on other sites
I have a heavily customized and templated shopping cart that i'm nearing completion. Everything has been downloaded / installed within the last 2 months, so i presume i have the latest patches, versions, fixes, etc. I am having problems with this module.

 

I'm getting the big red bar, but it doesn't provide much info, this is directly copied/paste:

 

This transaction cannot be accepted. - Your credit card could not be authorized for this reason. Please correct any information and try again or contact us for further assistance.

A few things with my current setup:

I've tried different card variations recommended by the module config.

I've tried different Test/transaction variations

My client's authorize.net account is up and running, in live mode. He's already doing biz with it, so I can't put it in test, if that's what i need to do.

This site is in development, behind the scenes. Meaning, we're hitting the IP address of the site, not the full domain name. Once we throw the DNS switch, i'll update all config.php's with correct.

SSL is enabled, but only temporary, issued by my Host/Cpanel. We're awaiting our real cert to get approved at this time.

The pre-installed authorize.net module also doesn't work, and gives a similar, unclear message. With this, i'm guessing it's something with my server and/or install and/or config.

 

Here's the site: http://216.81.70.195/catalog/

 

I've spent time digging through this forum, and other oscommerce threads, but to no avail. It's been hours and hours over a few days of troubleshooting now, so it's time i come straight to the source ;)

 

Any advice would be greatly appreciated!

Thanks,

Blake

 

I would look at 2 things:

 

1) the absence of domain name, and I had a warning message in my Safari brower reagrding an SSL issue by an unknown authority: you may loose a lot of sales because of this... if you make it work with Authnet ;-)

2) your server may be the cause of the problem. In fact, I offered another member to upload his entire oscom on one of my hosting space for testing purposes, and he had no errors anymore. You may contact him and ask if he solved the problem by moving to another host or if he found a fix.

 

His screename is negativerad

 

Good luck!

Share this post


Link to post
Share on other sites

Tiy may also take a look at how attributes work: in your massage items where you may order extra time, there is no way to order just the basic product, because you have no option in your drop down menu that says "no thanks" and adds zero. There is no way to order a $8.00 massage, because the first option is always selected. Just curious: what do you call "heavily customized and templated" ?

Share this post


Link to post
Share on other sites
1. Is this heavily customised cart actually osCommerce or some 'loaded' version.

2. Are you using a template system e.g. Basic Template or Simple Template System.

 

Vger

I'll go backwards ;)

 

2. Yes, it's the Basic Design Pack template, v1.9

1. I mean heavily customized meaning i have many modules installed, atop of the Basic Design Pack. Most of which are self standing, but a few had to overlap each other. Just the usual: Agree to Terms, New Attribute Manager, UPS Choice, PickUp / Will Call. (All of which, IMO, should be included in the base OSC . . but that's an entirely different thread . . or maybe forum all together ;) )

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×