Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[CONTRIBUTION] Authorize Net AIM module


Vger

Recommended Posts

Anyone notice this module does not work with zones? I have tried to only display the authorize.net module for zone "usa" and it appears no matter what country is in the customers account.

Link to comment
Share on other sites

  • 2 weeks later...

Sorry to cross-post, but I wasn't sure where my question would get more exposure.

 

The Authorize.net AIM module on a client's OSC-based site just suddenly stopped processing credit cards recently (after doing it successfully for years). Here's the full topic, with many more details: http://www.oscommerce.com/forums/index.php?showtopic=309532

 

Thanks!

Edited by madinchina
Link to comment
Share on other sites

Is there a way to tweak this module so that my store never stores the credit card information? I look at the order page and it's right there plain as day and I don't like it. I don't want to see or store this information at all.

Edited by cdi-buy.com
Link to comment
Share on other sites

Hi, I just installed this module and I believe I have everything configured correctly. When I use the test credit card numbers, on the OSC side everything appears to work normally (transaction is rejected when using the "fail" number), but nothing shows up on the authorize.net side under reports. Shouldn't the transaction be immediate? What could be the problem? Do transactions not show up in the authorize.net reports when you're in test mode? Do I need to disable "Password required" mode?

 

Thanks!

Link to comment
Share on other sites

I had an issue with this module getting it to correctly interpret the response properly back from authorize.net. Authorize.net basically gave a shared account to me for testing purposes and could not modify any settings on their end. I ended up echo'ing the response from them back and it turned out that I was getting responses delimited using "|" and not ","

 

The card was being authorized, but this module was not interpretting the response correctly.

 

If you find this and change the line in authorizenet_aim.php, I got everything working correctly (ALL Test CCs passed, and the Test CC FAILED). I'm set to test Mode in the configuration, pointing to certification.authorize.net for "TEST".

 

This is around line 330 or so in the latest Aug 3, 08 release

// change this line to split using correct delimiter

// $response = split('\,', $authorize);

$response = split('\|', $authorize);

Link to comment
Share on other sites

The module works fine for me,....except for the fact that the expiration date for credit cards no longer shows in my cart. If I have to give the customer a partial refund or anything I have to them ask them for their expiration date. It used to show fine when I was entering my credit card transactions manually. Is this happening for anyone else and how do I fix it? Thanks a bunch!

Always grateful for any help received!!

Link to comment
Share on other sites

There has been an error processing your credit card

 

Please try again and if problems persist, please try another payment method.

 

 

This is the error I keep getting using Authorizenet AIM The card actually gets processed but I keep getting this message. Can anyone please help me?

 

Troy

Link to comment
Share on other sites

There has been an error processing your credit card

 

Please try again and if problems persist, please try another payment method.

 

 

This is the error I keep getting using Authorizenet AIM The card actually gets processed but I keep getting this message. Can anyone please help me?

 

Troy

 

I'm getting the same thing after installing the 14 Aug 2008 version. Also, transaction details are not be written to the database.

Link to comment
Share on other sites

I'm getting the same thing after installing the 14 Aug 2008 version. Also, transaction details are not be written to the database.

 

I got it to work by changing:

 

'x_delim_char' => '|',

to

'x_delim_char' => '\,',

 

and

$this->response = explode('|', $response);

to

$this->response = explode('\,', $response);

 

Cards are processed correctly and transaction details are in the database.

Link to comment
Share on other sites

For anyone who is not receiving an error reason from authorize.net when they are returned to their payment page, I noticed that the response coming from authorize.net in curl was a comma-separated string, but the line of code that (attempts to) break that string into separate array elements, one of which would be used to provide the error, is looking for '|' not ','

 

Go into the authorizenet_aim.php file, and look for the line:

 

$this->response = explode('|', $response);

 

and change it to

 

$this->response = explode(',', $response);

 

the difference being a comma between the single quotes instead of the vertical bar.

Link to comment
Share on other sites

Vger - the error is:

 

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

 

Yes SSL is installed. I can connect to my site by typing https://9fishsurf.com so I know it is working. I also made the changes to the OSCommerce configure.php script that this thread told me to:

 

http://www.oscommerce.info/kb/osCommerce/G...mon_Problems/75

 

Wes

 

 

FOR THOSE OF YOU HAVING THIS SAME PROBLEM HERE IS A QUICK FIX:

In a.net make sure your direct response for Delimited is set to YES and | (pipe).

 

In the new AIM code given by Vger it is listed as the following at line 226ish:

        'x_relay_response'      => 'FALSE', // AIM uses direct response, not relay response
       'x_delim_char'          => '|',
       'x_delim_data'          => 'TRUE', // The default delimiter is a comma
       'x_version'             => '3.1',  // 3.1 is required to use CVV codes

I HAVE CHANGED IT TO:

        'x_relay_response'      => 'FALSE', // AIM uses direct response, not relay response
       'x_delim_data'          => 'TRUE', // The default delimiter is a comma
       'x_delim_char'          => '|',
       'x_encap_char' 			=> '"',
       'x_version'             => '3.1',  // 3.1 is required to use CVV codes

 

 

That got rid of the error: "- Your credit card could not be authorized for this reason. Please correct any information and try again or contact us for further assistance."

and now I have:

""(TESTMODE) This transaction has been approved." - Your credit card could not be authorized for this reason. Please correct any information and try again or contact us for further assistance."

 

Which I can now fix because I'm connecting properly to a.net

 

Hope this helps someone.

Link to comment
Share on other sites

New Problem and Fix!

 

Line 312 Needs to be fixed for my issue.

 

As my last post showed how to change the a.net issue of not connecting... to properly move onto the final page change the following line.

 

if ($this->response[0] != '1') {

tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode($this->response[3]) . ' - ' . urlencode(MODULE_PAYMENT_AUTHORIZENET_AIM_TEXT_DECLINED_MESSAGE), 'SSL', true, false));

 

WAS CHANGE TO THIS AND WORKS:

 

if ($this->response[0] != '"1"') {

tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . $this->response[3] . ' <br> ' . MODULE_PAYMENT_AUTHORIZENET_AIM_TEXT_DECLINED_MESSAGE, 'SSL', true, false));

Link to comment
Share on other sites

Hello,

 

I just installed the latest (14 Aug 2008) Authorize.net AIM contribution, used Authorize.net SIM contrib before. I entered my API Login ID for 'Login Username' and Transaction Key for 'Transaction Key' as they appear in my Authorize.net account. I also set the Transaction Mode to 'Test', so I'll be able to test the module. However, it gives me the following error on checkout_payment.php:

\"(TESTMODE) The merchant login ID or password is invalid or the account is inactive.\" - Your credit card could not be authorized for this reason. Please correct any information and try again or contact us for further assistance.

My Authorize.net account is active and login ID and Transaction Key are correct (even tried to create a new Transaction Key, same problem). I have no problems with the same Authorize.net account and login ID and Transaction Key if I use the Authorize.net SIM contribution for osc.

 

My configuration in Authorize.net account is:

Delimited response = NO

Default field separator = comma

Field encapsulation character = blank

Transaction version = 3.1

 

TEST mode for osCommerce Authorize.net AIM

SSL

 

Any help will be appreciated. Thanks.

Link to comment
Share on other sites

Hello,

 

I just installed the latest (14 Aug 2008) Authorize.net AIM contribution, used Authorize.net SIM contrib before. I entered my API Login ID for 'Login Username' and Transaction Key for 'Transaction Key' as they appear in my Authorize.net account. I also set the Transaction Mode to 'Test', so I'll be able to test the module. However, it gives me the following error on checkout_payment.php:

 

My Authorize.net account is active and login ID and Transaction Key are correct (even tried to create a new Transaction Key, same problem). I have no problems with the same Authorize.net account and login ID and Transaction Key if I use the Authorize.net SIM contribution for osc.

 

My configuration in Authorize.net account is:

Delimited response = NO

Default field separator = comma

Field encapsulation character = blank

Transaction version = 3.1

 

TEST mode for osCommerce Authorize.net AIM

SSL

 

Any help will be appreciated. Thanks.

 

Well, one problem is probably that in the code the explode is hardcoded as '|' which probably means you should either change the delimeter setting to | or change the explode statement to ',' (since your delimeter is set to comma). Also, I've seen where test mode just doesn't work properly, but switching to production seems to fix it.

Link to comment
Share on other sites

Well, one problem is probably that in the code the explode is hardcoded as '|' which probably means you should either change the delimeter setting to | or change the explode statement to ',' (since your delimeter is set to comma). Also, I've seen where test mode just doesn't work properly, but switching to production seems to fix it.

Hi, Jeff. Thanks for your reply. I have the following explode statement:

$this->response = explode(',', $response);

and

'x_delim_char'		  => '|',

If I switch the A.net AIM module to production, is there any other way to test it's working? Before I let people use the module on my live store, I want to make sure it's working properly.

 

Thanks.

Link to comment
Share on other sites

Hi, Jeff. Thanks for your reply. I have the following explode statement:

$this->response = explode(',', $response);

and

'x_delim_char'		  => '|',

If I switch the A.net AIM module to production, is there any other way to test it's working? Before I let people use the module on my live store, I want to make sure it's working properly.

 

Thanks.

 

I'm not certain, but here is how I did it when I was having the trouble. Search in the code for this:

 

$response = curl_exec($ch);

 

$this->response = explode(',', $response);

 

 

and then, between them, add

 

var_dump($response);

exit;

 

When you do a test order, it will print some info to the screen and then stop. You will be able to refresh that page without having to go through an entire order again, because it's stopping before where it does the cleanup and sends you back to the shipping page.

 

When it dumps the contents of $response, see if the long test string is filled with commas or | between the items. If it is |, then change the ',' in the explode line to |, if it is commas, then move the two lines you added to just Below the explode line, and change the first from

var_dump($response);

to

var_dump($this->response);

 

Then reload the page. If you get a dump this time showing a bunch of array subscripts ([0], [1], [2], etc.) each with -> after it and data, then you are getting a valid response from authorize.net. At that point, unless it's giving you an error because your account info is not valid, you can probably switch to production mode (don't forget to remove the two lines you added).

 

You can check a Failing transaction in production mode by putting in a '4' and fifteen 1's as the card number, any expiration and any CV2 code, and the transaction will fail...see if it gives you a failure reason at the top of the screen you're redirected to instead of just saying it failed. To test a live transaction, you can always create a $0.50 item or whatever and buy it from yourself.

Link to comment
Share on other sites

I'm having an odd issue with Authorize.net AIM. When a customer enters bad payment data (bad credit card or forgets to click the payment style box) then hits continue, and after being sent back to the payment option screen, enters good information, they get the following error:

 

"An error occurred while trying to report this transaction to the merchant.

An e-mail has been sent to the merchant informing them of the error. The following is the result of the attempt to charge your credit card."

 

Talking to authorize.net tech support this is a time out error. But it happens every time.

 

Anyone have any idea how to fix this?

I'm using the March 8th 2006 version.

I posted the above a while ago, but never found an answer. This is still happening. Also on occasion OScommerce is not receiving the order after Authorize charges the card. I have contacted Authorize and they say the error is a time out error, and that I need to print something, anything, to the screen right away.

I have tried placing empty <div> tags or   tags in various places, but the problem persists. Has anyone else had this problem? Or does anyone know how to fix it?

Link to comment
Share on other sites

I'm not certain, but here is how I did it when I was having the trouble. Search in the code for this:

 

$response = curl_exec($ch);

 

$this->response = explode(',', $response);

 

 

and then, between them, add

 

var_dump($response);

exit;

 

When you do a test order, it will print some info to the screen and then stop. You will be able to refresh that page without having to go through an entire order again, because it's stopping before where it does the cleanup and sends you back to the shipping page.

 

When it dumps the contents of $response, see if the long test string is filled with commas or | between the items. If it is |, then change the ',' in the explode line to |, if it is commas, then move the two lines you added to just Below the explode line, and change the first from

var_dump($response);

to

var_dump($this->response);

 

Then reload the page. If you get a dump this time showing a bunch of array subscripts ([0], [1], [2], etc.) each with -> after it and data, then you are getting a valid response from authorize.net. At that point, unless it's giving you an error because your account info is not valid, you can probably switch to production mode (don't forget to remove the two lines you added).

 

You can check a Failing transaction in production mode by putting in a '4' and fifteen 1's as the card number, any expiration and any CV2 code, and the transaction will fail...see if it gives you a failure reason at the top of the screen you're redirected to instead of just saying it failed. To test a live transaction, you can always create a $0.50 item or whatever and buy it from yourself.

I did as you said, Jeff and at first the string was filled with commas. When I moved the 2 lines below the explode line and changed the first line as you suggested, I got a bunch of array strings, just as you said, but there is still:

[3]=> string(85) ""(TESTMODE) The merchant login ID or password is invalid or the account is inactive.""

Failing transaction in TEST mode doesn't show any error except for the (TESTMODE) error above.

Edited by Irin
Link to comment
Share on other sites

Yeah, I received that under test mode, with a valid user id and password, and it went away in production mode. I guess you could talk to authorize.net and verify that the user id/pass are the same for test mode, and that the test server is the one listed in the code. At least now, with the data returned, you can give them the error data.

Link to comment
Share on other sites

Yeah, I received that under test mode, with a valid user id and password, and it went away in production mode. I guess you could talk to authorize.net and verify that the user id/pass are the same for test mode, and that the test server is the one listed in the code. At least now, with the data returned, you can give them the error data.

Thanks, Jeff. I'll give it a try.

Link to comment
Share on other sites

Will this contribution be affected by the Important System Notice emailed by Authorize.net to all US users today?

 

Authorize.net System Notice is as follows:

In early October, Authorize.Net will be expanding the range of Transaction IDs issued by the payment gateway. Please read this e-mail thoroughly as it contains important information on how to ensure that your account is not affected.

 

The Authorize.Net Transaction ID is the payment gateway-generated number used to uniquely identify each transaction you submit for processing. The Transaction ID can be found in the transaction response and in the Search and Reports features of the Merchant Interface.

 

The Transaction ID field was originally developed with a maximum numeric value of 2,147,483,647. As the number of merchants using the Authorize.Net Payment Gateway has grown, we have identified a time in which the Transaction ID count will surpass 2,147,483,647. For this reason, we are in the process of expanding the range of Transaction IDs that the payment gateway can issue. Accordingly, we are communicating to all merchants to verify that your systems can accommodate a 10-digit Transaction ID greater than 2,147,483,647.

 

In most cases your transaction processing will not be affected. However, if you have an internal business application or solution that relies upon the Transaction ID field, your system may fail if it cannot handle a Transaction ID larger than 2,147,483,647. For more information, please review the Transaction ID FAQs located at http://www.authorize.net/transid.

 

It is critical that you contact your developer to verify whether your integration will be impacted. Specifically, please provide your developer with the following information:

 

The Transaction ID, or x_trans_id, is specified as a 10-digit integer and will only be affected if that value is represented as an INT data type, which has a max value of 2,147,483,647. If you have specified the Transaction ID as a string value, then your system will not be affected. Failure to accommodate 10-digit values larger than 2,147,483,647 will result in your system's inability to accept Authorize.Net transactions.

 

Note: If you need to make updates to your Transaction ID architecture, you should do so prior to October 1, 2008, to ensure that you will not be affected.

If you have any questions, please contact Customer Support at [email protected].

 

Sincerely,

Authorize.Net

Most Valuable OsCommerce Contributions:

Also Purchased (AP) Preselection (cuts this resource hogging query down to nothing) -- Contribution 3294

FedEx Automated Labels -- Contribution 2244

RMA Returns system -- Contribution 1136

Sort Products By Dropdown -- Contribution 4312

Ultimate SEO URLs -- Contribution 2823

Credit Class & Gift Voucher -- Contribution 282

Cross-Sell -- Contribution 5347

Link to comment
Share on other sites

Will this contribution be affected by the Important System Notice emailed by Authorize.net to all US users today?

 

Authorize.net System Notice is as follows:

In early October, Authorize.Net will be expanding the range of Transaction IDs issued by the payment gateway. Please read this e-mail thoroughly as it contains important information on how to ensure that your account is not affected. ...

 

I am also trying to figure out if this change to the Transaction ID is going to effect this module before I wake up some morning to failing transactions.. Anybody?

 

Thanks,

 

J

Link to comment
Share on other sites

hello I installed the 08-14-00 version today. My store is http://store.360oregon.com when going into ssl mode using a shared SSL https://secure3.instantnetworks.net/~store36/ when the CCV more info is clicked it refers to https://secure3.instantnetworks.net/cvv_help.php instead of https://secure3.instantnetworks.net/~store36/cvv_help.php

 

Also I did not have to perform this function as it was completed in the latest version (or perhaps the google checkout modification already had it completed)

In catalog/checkout_process.php (line 49) CUT OUT the two lines:

---------------------------

// load the before_process function from the payment

modules

$payment_modules->before_process();

 

-------------------------------

 

and paste them BELOW (line 55)

--------------------------------

$order_totals = $order_total_modules->process();

 

---------------------------------

 

so it should look like:

---------------------------

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();

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