Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[CONTRIBUTION] Authorize Net AIM module


Vger

Recommended Posts

Then use that module if you are happy with it. This module is for the Advanced Integration Method (AIM) and not the Simple Integration Method (SIM).

 

It's my understanding that Authorise Net will discontinue SIM in the not too distant future.

 

Vger

 

Well i would love to use your contrib. the osc a.net module is as u wrote in sim and i want to go with AIM with CVV but, i can't make your contrib. work on my site i try that with all the setting with or without Delimited Respone or comma, it's working i'm getting a email with the purchase but i can't reach the last step to checkout_success

 

i have curl with linux and ssl config

Link to comment
Share on other sites

The problem has to lay in your website files somewhere - either in the way your site address is entered in includes/configure.php or else in modifications made to any of the checkout files.

 

What you can try is to edit includes/modules/payment/authorizenet_aim.php and where it says:

 

$this->form_action_url = tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL', true);

 

change this to:

 

$this->form_action_url = tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL', false);

 

and see if this helps.

 

Vger

Edited by Vger
Link to comment
Share on other sites

The problem has to lay in your website files somewhere - either in the way your site address is entered in includes/configure.php or else in modifications made to any of the checkout files.

 

What you can try is to edit includes/modules/payment/authorizenet_aim.php and where it says:

 

$this->form_action_url = tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL', true);

 

change this to:

 

$this->form_action_url = tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL', false);

 

and see if this helps.

 

Vger

 

 

thanx man it's working now finally i got the the checkout success

Link to comment
Share on other sites

i am still having some issues with this...

 

i have tried all the recommendations in this topic... Direct Response Delimiter field seperator and field encapsulation character... Receipt / Relay URLs... $this->form_action_url = tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL', false); ... but still having problems with it...

 

instead of continuing to the checkout_success.php after confirming the order i get sent back to the checkout_payment.php with the error message "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"

 

the merchant account gets a confirmation email and i can see the transaction in the authorize.net Unsettled Transactions, but the order does not show up in oscommerce administration...

 

it is encouraging that someone has gotten this to work, but i am still having issues with it myself for some reason...

Link to comment
Share on other sites

On the Developer Test Account I used to set this module up I entered nothing on the "Response/Receipt URL's" page, because the Return URL is already defined in the module as checkout_process.php

 

Don't forget that with this module - people stay on your website, they don't go to an Authorize Net page at all. Many of the settings in the Authorize Net interface are there to cover other connection methods.

 

Under Direct Response Delimiter - try setting it to 'No'. I have just rechecked the settings and I initially had it set to 'Yes' with a comma delimiter and nothing for Field Encapsulation Character, but then reset it to 'No'. Sorry if my earlier post caused confusion.

 

I hope that this earlier post contains the solution. Also, please remember (if you are using an established Authorize Net account) to switch it from SIM to AIM and set it to version 3.1

 

Vger

Link to comment
Share on other sites

ive tried all that... i still get the same error... it says that i am using transaction Current Version: 3.1 .. i dont even know how i would change that...

 

i am trying this from a clean install of 2.2 MS2 (051113).. stock products even...

 

I can use the included authorize.net module with no problems... i am wondering what exactly is the difference between the standard module and this module other than the ccv?

 

thank you for your help...

Link to comment
Share on other sites

With this module people stay on your website, it's only the data that goes to Authorize Net to be checked and returned to your site if it's okay. This module does require an https connection and that cURL is compiled into PHP. You can check this by going to your osCommerce admin panel --> Tools --> Server Info and look for cURL or just CURL

 

If your site is hosted on a Windows server then you may have problems with the path to cURL. There are several posts on this with possible solutions - but you'd need to Search the forums for them.

 

If it's not cURL, or the lack of an https connection, then I'm sure that it will turn out to be just a mismatch between the module and the settings you have in your Authroize Net control panel.

 

Vger

Link to comment
Share on other sites

osCommerce admin panel --> Tools --> Server Info

 

Server OS: FreeBSD 4.11-RELEASE-p7

 

HTTP Server: Apache/1.3.34 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 PHP/4.4.1 FrontPage/5.0.2.2635 mod_ssl/2.8.25 OpenSSL/0.9.7d

 

PHP Version: 4.4.1 (Zend: 1.3.0)

 

Configure Command: './configure' '--with-apxs=/usr/local/apache/bin/apxs' '--prefix=/usr' '--with-xml' '--enable-bcmath' '--enable-calendar' '--with-curl' '--with-dom' '--with-dom-xslt' '--with-dom-exslt' '--enable-exif' '--enable-ftp' '--with-gd' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr' '--with-gettext' '--with-imap' '--with-imap-ssl' '--enable-mbstring' '--enable-mbstr-enc-trans' '--enable-mbregex' '--with-mcrypt' '--with-mhash' '--enable-magic-quotes' '--with-mysql=/usr/local' '--with-openssl' '--enable-discard-path' '--with-pear' '--with-pspell' '--enable-sockets' '--enable-track-vars' '--with-ttf' '--with-freetype-dir=/usr/local' '--enable-gd-native-ttf' '--enable-versioning' '--with-xmlrpc' '--with-zip' '--with-zlib'

 

CURL support: enabled

CURL Information: libcurl/7.12.0 OpenSSL/0.9.7d zlib/1.1.4

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

 

What kind mismatch between the module and the Authroize Net control panel settings could there be? ive looked thru everything and i dont see what else could affect this...

 

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

 

I have processed payments with the standard authorize.net module and i never saw any forms to fill in off of my own site... i am wondering if there is a way to just insert the ccv field into the standard module?

Link to comment
Share on other sites

I have curl and https ssl from godaddy.com

 

I know that in live mode it successfully orders from authorize.net and everyone gets receipts.

 

OScommerce on the other hand does *NOT*

(1) send them to checkout_success.php

(2) see the order

(3) remove the items from the cart

 

I tried setting the line of code to false and it did not help.

 

It seems me and thrasha(erik) and in the same boat. damn.

Link to comment
Share on other sites

i am currently comparing line by line authorizenet.php and the new authorizenet_aim.php to see if i can find any major differences... i would really like to be able to get this to work...

 

i wonder if using a shared SSL has something to do with the problems?

Link to comment
Share on other sites

This may be an https_cookie_domain problem (includes/configure.php) in your case (full ssl).

 

Many people enter down the information incorrectly and this causes the basket not to be emptied when a transaction is completed. If your ssl cert is made out just to yourdomain.com then that's what your entry for https_cookie_domain should be, but if your ssl cert is made out to www.yourdomain.com then that's what should be entered for https_cookie_domain - either way there's no https:// in the https_cookie_domain setting.

 

It's also advisable that the http_cookie_domain should match (for full ssl).

 

Vger

I have curl and https ssl from godaddy.com

 

I know that in live mode it successfully orders from authorize.net and everyone gets receipts.

 

OScommerce on the other hand does *NOT*

(1) send them to checkout_success.php

(2) see the order

(3) remove the items from the cart

 

I tried setting the line of code to false and it did not help.

 

It seems me and thrasha(erik) and in the same boat. damn.

Link to comment
Share on other sites

You will find plenty of differences between the two modules. Using shared ssl would only be a problem if it is not entered correctly in includes/configure.php - and people do often have this set up incorrectly.

 

For instance, if your install is in the root of your web and if your https_server address is set to:

define('HTTPS_SERVER', 'https://servername.yourhosts.com');

 

and your DIR_WS_HTTPS_CATALOG is set to:

define('DIR_WS_HTTPS_CATALOG', '/yourdomain.com/');

 

Then your https base href is not your website but your hosting companies shared ssl address - so your settings should be:

 

define('HTTPS_SERVER', 'https://servername.yourhosts.com/yourdomain.com');

define('DIR_WS_HTTPS_CATALOG', '/');

 

and your https_cookie_domain should be:

define('HTTP_COOKIE_PATH', 'servername.yourhosts.com/yourdomain.com');

 

You would need to adapt this to your own shared ssl set up.

 

Other people have this running fine, so it has to be something to do with your set up.

 

One thing you can try is to hardcode the checkout_process address in includes/modules/payment/authorizenet_aim.php as follows. Change this:

$this->form_action_url = tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL', true);

 

to this:

$this->form_action_url = tep_href_link('https://servername.yourhosts.com/yourdomain.com/checkout_process.php', '', 'SSL', true);

 

Vger

i am currently comparing line by line authorizenet.php and the new authorizenet_aim.php to see if i can find any major differences... i would really like to be able to get this to work...

 

i wonder if using a shared SSL has something to do with the problems?

Link to comment
Share on other sites

Looks like the ADC Contribution got hijacked by someone else placing an AIM contribution in their thread. When I get a chance I'll take a look at it. Won't be today though.

 

Vger

Link to comment
Share on other sites

I have checked my cookie domain and they match. Im currently trying to hard code the url in the code. will let you know if I get it working...I know that my oscommerce setup is messed up somewhere....and thats why im having those 3 problems...will keep trying.

Link to comment
Share on other sites

I have checked my cookie domain and they match. Im currently trying to hard code the url in the code. will let you know if I get it working...I know that my oscommerce setup is messed up somewhere....and thats why im having those 3 problems...will keep trying.

 

I fixed it.

This is what I did for mine.

I went into my a.net and Direct Response and changed..

Delimited Reponse to NO ( i orignally had YES because of a.net tech support )

Field Encapsulator Char to BLANK ( i originally had " because of a.net tech support )

 

Things I did that Im not sure if they helped before I did the above.

 

In my oscommerce panel

Forced Cookie Use to YES

Check SSL ID to YES

Check user-agent to YES

Check IP address to YES

 

Hell Yeah.

 

and btw test.authorize.net doesn't work for me in this module, i need to use certification.authorize.net although it doesnt matter because i will be using secure.authorize.net shortly

Link to comment
Share on other sites

I think it was the changes you made to Direct Response which made the difference. As I said in an earlier post, most of those settings apply to other (older) connection methods to Authorize Net. When I get the time I'll update the Install html file with that advice.

 

With regard to your other settings, the only one I'd leave set to 'True' would be Force Cookie Use. If you leave the others set to True you'll have problems with customers who use AOL not being able to buy off your site.

 

Vger

Link to comment
Share on other sites

For those having trouble using this contribution in Test mode, change line 301 in catalog\includes\modules\payment\authorizenet_aim.php

from

 

if (MODULE_PAYMENT_AUTHORIZENET_AIM_TESTMODE == 'Test') {

$url = 'https://test.authorize.net/gateway/transact.dll';

} else {

$url = 'https://secure.authorize.net/gateway/transact.dll';

}

 

to

 

if (MODULE_PAYMENT_AUTHORIZENET_AIM_TESTMODE == 'Test') {

$url = 'https://secure.authorize.net/gateway/transact.dll';

} else {

$url = 'https://secure.authorize.net/gateway/transact.dll';

}

 

 

I was instructed by Tom C. at customer support, Authorize.net to leave the url at secure.authorize and this works for me, while the original way with test.authorize did not (in test mode).

Link to comment
Share on other sites

I'll have to have a word with them myself about that - because obviously I was also working with Authorize Net on getting this new module working. It seems that you get different answers depending on who you talk to. It may be that 'test' is wrong, but that 'certification' is right after all ( as reported above).

 

Vger

Link to comment
Share on other sites

I tried https://certification.authorize.net/gateway/transact.dll and it also works in test mode. Appendix H of the AIM Implementation Guide devotes all of 7 lines to Certification and it reads like just another way to run test mode. A search through that Guide also failed to find any reference to test.authorize.net.

 

BTW, this contribution works well. I like the integration of CVV help with a popup window. I have not run it in production mode yet but I don't expect problems.

Link to comment
Share on other sites

Yes, the javascript cvv popup window was a problem. There are many payment modules released which place the call to the javascript link in the payment module itself, but this always results in errors - which is why it was placed in the checkout_payment.php page.

 

Glad you like the module. I have been in touch with Authorize Net and I'm waiting for them to get back to me about 'test' and 'certification'. If they confirm that 'certification' can be used in Test mode then I'll update the contribution.

 

Vger

Link to comment
Share on other sites

I can confirm that I just got it to work right now...

The only change I made was in Authorize.net Direct Response...

 

Delimited Response: No

Default Field Separator: ,(comma)

Field Encapsulation Character: (blank)

 

I GREATLY appreciate this fine piece of work Vger!

Thank you for your suggestion ekbjewelry!

 

now if only i could figure out how to convince people to fill their carts with my most expensive products....

:D

Link to comment
Share on other sites

everything seems to be working great, but i have 2 suggestions...

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

 

in includes/languages/english/cvv_help.php

change all instances of "Discovery" to "Discover Card"

 

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

 

eliminate the need to make any edits to the checkout_payment.php

 

line 114 of includes/modules/payment/authorize.net

 

change from

'field' => tep_draw_input_field('authorizenet_aim_cc_cvv','',"size=4, maxlength=4"))));

 

change to:

'field' => tep_draw_input_field('authorizenet_aim_cc_cvv','',"size=4, maxlength=4") . ' <a style="cursor: pointer; cursor: hand;" onClick="window.open(\'cvv_help.php\',\'jav\',\'width=500,height=550,resizable=no,toolbar=no,menubar=no,status=no\')"><u>Click for info on CVV</u></a>')));

Link to comment
Share on other sites

I have just uploaded a slightly modified file set. The Install instructions have been updated with the information gained in this thread, also the Test url has been reset to 'secure' but advice is also given in the Install instructions that if this does not work then it can be changed to 'certification'. I have also (in line with Erik's advice) changed references to Discovery to Discover Card.

 

I tested the javascript changes recommended but as they did not work as well as the original I have left that code as it is.

 

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