Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[CONTRIBUTION] Authorize Net AIM module


Vger

Recommended Posts

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!

1. I've thought that, which is why i noted it. I also get the SSL error, but it's to be expected right now. We're waiting for our real cert to get approved, so i installed the temporary, shared one that comes with our host. I figured i'd do something rather than nothing since it appears that the payment modules require an SSL connection. With this, how does one propose testing a cart that is under construction, on temporary servers . . before we throw the DNS switch.

 

2. Possibly . . but i have no way of troubleshooting as of now, hence my posting ;) I will say that i have a successful ZenCart system installed on the same servers.... (am i allowed to say that ? ) not that it matters. I'm hosting using my own reseller account with Vortech Hosting, Unix servers....

 

I was hoping that "some" error message would appear, but it's so vague, i'm at a loss.

Edited by blakemiller
Link to comment
Share on other sites

Try removing that, or else make sure you are using the very latest version of it .

 

Vger

Well, i was using the latest... just downloaded/installed on Monday. But, i did remove it and the exact same problem. If i try Test Mode, the simply puts "(TEST MODE) This transaction... " in front of the error message.

 

Got days/weeks of customizing a shopping cart . . all done . . .Stuck on the last thing . . literally :(

Link to comment
Share on other sites

It means that the session trail is getting lost. Look at the cookie_domain settings for http and https in your includes/configure.php file. Neither of the entries should have http:// or https:// in them e.g. 'www.yourdomain.com' and not 'http://www.yourdomain.com'

 

Also, Authorize Net doesn't work properly in Test Mode. You need to get them to put you Live before you can complete testing.

 

Vger

Edited by Vger
Link to comment
Share on other sites

Thanks. I am (temporarily) using shared SSL and my ISP appends a "~customer" which I just removed from the HTTPS_COOKIE_DOMAIN value and everything works well now. Thanks for a great contribution and for all of your help supporting it! Very much appreciated...

Link to comment
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.

 

 

I read through all 30 pages and you are the only one that mentions finding and having success with a new(er) cc_validation.php page to fix the error with valid card thing.

Can you copy it here (if allowed)- or pm me the cc_validation page you are using???

I searched all over and found a few things in the contributions that I could use but they are SOOOO different then the current page I have i'm afraid to try.. unless I have to...

 

please and thanks...

Link to comment
Share on other sites

Hi

I'm having some problems with this module.

 

Running in live mode but using the test credit card numbers Authorize.net rejects the payment (as it should).

 

However osC completes the order and the customer gets dumped into an empty shopping cart page - customer then gets confirmation email from osC.

 

I'm assuming that when Authorize.net blocks the payment then the order should not go through?

 

This also happens if I use the test card number that is meant to test for automatic decline i.e 42222222222222

 

Any suggestions?

 

Bob

Link to comment
Share on other sites

For those who may want to use a different payment module down the road, the following should work in /checkout_process.php

if ($payment == 'authorizenet_aim') {
// AIM Processing
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();
 } else {
//Normal Processing

// 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;
 }

 

 

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

Link to comment
Share on other sites

Actually, since I posted that I found out that this order works for other payment modules being used at the same time as A Net:

 

require(DIR_WS_CLASSES . 'order_total.php');

$order_total_modules = new order_total;

 

$order_totals = $order_total_modules->process();

 

// load the before_process function from the payment modules

$payment_modules->before_process();

 

To make A Net work with that setting in checkout_process and with CCGV(trad) and the osCommerce Pay Pal IPN make these few changes to the osCommerce Pay Pal IPN:

 

in includes/modules/payment/paypal_ipn.php

 

In the before_process function add these entries after $order,

 

$order_totals, $order_total_modules,

 

and then comment out or remove these lines (as shown), just a few lines below the above:

 

//include(DIR_WS_CLASSES . 'order_total.php');

//$order_total_modules = new order_total;

//$order_totals = $order_total_modules->process();

 

Now A Net works with other payment modules, including the osCommerce Pay Pal IPN, and CCGV(trad).

 

Vger

Edited by Vger
Link to comment
Share on other sites

You can X out the middle digits of the credit card and store that in the database instead of the whole card number by doing this:

 

In /includes/modules/payment/authorizenet_aim.php - inside the function before_process() {

 

after line:

$new_order_id = $new_order_id_result['Auto_increment'];

 

insert lines:

	  // Set cc field in database with middle 7 or 8 digits x'd out
  $cc_number = preg_replace('/[^0-9]/i', '', $order->info['cc_number']);
  $order->info['cc_number'] = substr($cc_number, 0, 4) . str_repeat('X', (strlen($cc_number) - 8)) . substr($cc_number, -4);

 

find line:

x_card_num => $_POST['cc_number'],

 

replace with:

x_card_num => $cc_number,

Link to comment
Share on other sites

There have been several additions to the thread and one to the contribution that XXXX the credit card number. I've been using a "mask credit card" contribution up to this point. Have any of the new methods been tested and work ok? The one listed in the contribution download seems so simple that it makes me wary...

 

Perhaps this thread should get moved to "Payment Contributions" :)

Link to comment
Share on other sites

The next release of Authorize Net AIM will end the storage of any credit card numbers in the database. It's against the PCI (Payment Card Industry) rules now.

 

As a point of information, encrypting card details in the database is not acceptable, because they are decrypted for delivery to your osCommerce admin panel - so if anyone gets into the admin panel they get all of the card numbers.

 

Vger

Link to comment
Share on other sites

There have been several additions to the thread and one to the contribution that XXXX the credit card number. I've been using a "mask credit card" contribution up to this point. Have any of the new methods been tested and work ok? The one listed in the contribution download seems so simple that it makes me wary...
I tried it and it works.

 

Regards,

EricK

Link to comment
Share on other sites

I tried it and it works.

 

Regards,

EricK

 

Zencart has an interesting feature: you can split the CC number during checkout: the first and last four digits are stored in the database, the eight middle digits are sent in an email to the admin. I like that :-"

Link to comment
Share on other sites

Zencart has an interesting feature: you can split the CC number during checkout: the first and last four digits are stored in the database, the eight middle digits are sent in an email to the admin. I like that

 

It's part of the osCommerce Credit Card module. And it still violates PCI rules. Hopefully when (if) MS3 is released the Credit Card module will be dropped from osCommerce completely.

 

Vger

Link to comment
Share on other sites

Hey Vger,

 

Is it possible to add in a value for x_duplicate_window? I realize this is an optional field, but according to the A.net AIM Guide, if a value is not sent for this parameter, the gateway defaults to 2 minutes. This means anyone submitting their details again inside that period (if they entered a wrong number etc) get kicked back with an error message saying "Declined - duplicate entry".

 

I've got the A.net AIM module installed on several stores and am getting complaints that customers who enter their details wrongly and go back and correct their details are still unable to check out due to this 2 minute waiting period where duplicate transactions are not allowed.

 

cheers

Link to comment
Share on other sites

Vger

 

Is there anything to add to the includes>modules>order_total>authorizenet_aim.php files to make it work with CCGV? A client just told me his customers are charged by authnet the full amount (even though the coupon discount appears in the order and in the coupon report)

 

Thanks

Link to comment
Share on other sites

Is there anything to add to the includes>modules>order_total>authorizenet_aim.php files to make it work with CCGV?

Check your install. CCGV (Vger's version at any rate) works just fine with the AIM module.

Link to comment
Share on other sites

Check your install. CCGV (Vger's version at any rate) works just fine with the AIM module.

I had to apply the v121 [bUG] patch posted 12 Dec 2006 here for AIM module to pass discount amount to Auth.net. Also, the same CCGV bug/bugfix is necessary for TrustCommerce Payment Module v2.01.

 

Regards,

EricK

Link to comment
Share on other sites

I had to apply the v121 [bUG] patch posted 12 Dec 2006 here for AIM module to pass discount amount to Auth.net. Also, the same CCGV bug/bugfix is necessary for TrustCommerce Payment Module v2.01.

 

Regards,

EricK

 

I just saw it, I was a before dec 12 fellow.

 

I wish I could check the bugs revisions more often. :-"

Link to comment
Share on other sites

There was no 'bug', and the fix to the 'bug' which someone posted in the Authorize Net contribution was a waste of time. The re-ordering of the functions to before the before-process in checkout_process has been posted here by myself - with the warning that it would screw up other payment modules and was best for use if you only used Authorize Net as a payment method..

 

You should be aware that if you use that 'bug' fix then it will break the osCommerce Pay Pal IPN and other payment modules.

 

If you use multiple payment providers and CCGV(trad) then this is the best solution and does not require any alterations to checkout_process or to any payment modules (including the osCommerce Pay Pal IPN).

 

In Modules --> Order Totals, change it to the following:

 

1. Sub Total

2. Shipping

3. Discount Coupons (set Recalculate Tax to 'Standard')

4. Tax

5. Gift Vouchers (leave Recalculate Tax set to 'None')

6. Total

 

Now CCGV(trad) will work with osCommerce Pay Pal IPN, Authorize Net, Protx etc.

 

Vger

Edited by Vger
Link to comment
Share on other sites

There was no 'bug', and the fix to the 'bug' which someone posted in the Authorize Net contribution was a waste of time. The re-ordering of the functions to before the before-process in checkout_process has been posted here by myself - with the warning that it would screw up other payment modules and was best for use if you only used Authorize Net as a payment method..

 

You should be aware that if you use that 'bug' fix then it will break the osCommerce Pay Pal IPN and other payment modules.

 

If you use multiple payment providers and CCGV(trad) then this is the best solution and does not require any alterations to checkout_process or to any payment modules (including the osCommerce Pay Pal IPN).

 

In Modules --> Order Totals, change it to the following:

 

1. Sub Total

2. Shipping

3. Discount Coupons (set Recalculate Tax to 'Standard')

4. Tax

5. Gift Vouchers (leave Recalculate Tax set to 'None')

6. Total

 

Now CCGV(trad) will work with osCommerce Pay Pal IPN, Authorize Net, Protx etc.

 

Vger

 

Thanks Vger. I buy this one. The bug 121 effectively made me wonder if paypal would like this one: the paypal charges were correct, only the authnet weren't.

Link to comment
Share on other sites

I have installed this contribution to a build of OsCommerce that approximates v1.1 (circa 2002). I would of course love to be installing with a more recent version, but as anyone would understand, it's been modified and hacked in so many ways that to start over would be very costly. Regardless, I'm getting these errors, and have been unable to find an answer for it anywhere. If anyone has one, I'd be forever grateful! ...

 

In the admin panel, when I change the status of this module to green, I get this error:

Warning: call_user_func(tep_get_zone_class_title): First argument is expected to be a valid callback in /home/sites/www.wendyculpepper.com/web/catalog/includes/functions/general.php on line 1236

Warning: call_user_func(tep_get_order_status_name): First argument is expected to be a valid callback in /home/sites/www.wendyculpepper.com/web/catalog/includes/functions/general.php on line 1236

 

If I continue, and click the "edit" button, I get the following error, and am unable see or alter the parameters:

 

Fatal error: Call to undefined function: tep_cfg_pull_down_zone_classes() in /home/sites/www.wendyculpepper.com/web/catalog/modules.php(204) : eval()'d code on line 1

Link to comment
Share on other sites

You're going to have to bite the bullet on this one and get the upgrade done.

 

If you are upgrading from MS1 (The Exchange Project) then the osCommerce install is able to do the database updates for you.

 

If you are upgrading from osCommerce 2.1 MS2 then there is an upgrade script for the db tables and certain files in the 'extras' folder.

 

Then, when you've done that you need to apply the last two security updates. As things stand the site is wide open to hacking and full of bugs.

 

Vger

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