Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[CONTRIBUTION] Authorize Net AIM module


Vger

Recommended Posts

Each time I've ran a test purchase on my site, I get to checkout_confirmation.php, click on "Confirm Order" and then I get redirected to login.php. Not only that, I notice it logs me out too. No errors...nothing.

 

A few quick facts:

- On my Authorize.net Test account

-- the Current Version is 3.1

-- the Account is in TEST MODE

 

- Admin Section -> Payment Modules -> Authorize.net AIM -> Transaction Mode: Live

And I've tried "Test" as well.

 

 

It's prolly your cookies in your config, make sure http and https cookies are correct, I've seen this problem before.

Link to comment
Share on other sites

The http_cookie_domain (and https) are domains and not url's - so neither have http:// or https:// in them. The https_cookie_domain should match with your ssl cert. So if your ssl cert was made out to www.yourdomain.com then that's your setting, and if it was made out just to yourdomain.com then that's your setting.

 

Vger

Link to comment
Share on other sites

wondering id your configure.php file (customer side) is Ok. could you post your cookies paths, domains and https paths?

 

  define('HTTP_SERVER', 'http://localtest');
 define('HTTPS_SERVER', 'https://localtest');
 define('HTTP_COOKIE_DOMAIN', 'localtest');
 define('HTTPS_COOKIE_DOMAIN', 'localtest');
 define('HTTP_COOKIE_PATH', '/');
 define('HTTPS_COOKIE_PATH', '/');

 

The SSL Cert is issued to and issued by localtest

Link to comment
Share on other sites

  define('HTTP_SERVER', 'http://localtest');
 define('HTTPS_SERVER', 'https://localtest');
 define('HTTP_COOKIE_DOMAIN', 'localtest');
 define('HTTPS_COOKIE_DOMAIN', 'localtest');
 define('HTTP_COOKIE_PATH', '/');
 define('HTTPS_COOKIE_PATH', '/');

 

The SSL Cert is issued to and issued by localtest

 

define('HTTP_SERVER', 'http://www.localtest');

define('HTTPS_SERVER', 'https://www.localtest');

define('HTTP_COOKIE_DOMAIN', 'localtest');

define('HTTPS_COOKIE_DOMAIN', 'localtest');

define('HTTP_COOKIE_PATH', '/');

define('HTTPS_COOKIE_PATH', '/');

Edited by pixclinic
Link to comment
Share on other sites

define('HTTP_SERVER', 'http://www.localtest');

define('HTTPS_SERVER', 'https://www.localtest');

define('HTTP_COOKIE_DOMAIN', 'localtest');

define('HTTPS_COOKIE_DOMAIN', 'localtest');

define('HTTP_COOKIE_PATH', '/');

define('HTTPS_COOKIE_PATH', '/');

 

Hugh

 

Thanks for the suggestion.

This is on my local computer; www.localtest doesn't work.

localtest is the name of my computer.

 

Just so you know my configuration isn't totally messed up, I have another payment module working on localtest: PayPal Direct Payment and Express Checkout.

Link to comment
Share on other sites

Hugh

 

Thanks for the suggestion.

This is on my local computer; www.localtest doesn't work.

localtest is the name of my computer.

 

Just so you know my configuration isn't totally messed up, I have another payment module working on localtest: PayPal Direct Payment and Express Checkout.

 

did you try on a server? maybe AN doesn't like local work...

Link to comment
Share on other sites

Your connection with Authorise Net is a two-way process. So how are they supposed to be able to connect back to you at your computer?

 

Vger

 

Good Point.

 

On my public server I at least didn't get the same error (being redirected to login.php).

Though I did get redirected to checkout_payment.php with this error: 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.

 

I'm checking through old posts and trying things that worked for others to fix this problem. Still haven't figured it out.

Link to comment
Share on other sites

Figured out the main problem.

 

Indeed the error I was getting: The merchant login ID or password is invalid or the account is inactive.... was quite correct.

I was running a transaction up against their real server.

I have an account set up through their test server at: https://test.authorize.net and my login information is for their test server.

 

So, in /catalog/includes/modules/payment/authorizenet_aim.php I changed line:

$url = 'https://secure.authorize.net/gateway/transact.dll'; // If this does not work then change 'secure' to 'certification' on this line

to:

$url = 'https://test.authorize.net/gateway/transact.dll'; // If this does not work then change 'secure' to 'certification' on this line

 

so I could temporarily run a test transaction.

 

I haven't seen the transaction show up in Authorize.net yet I did recall Vger saying something not so great about Authorize.net's test accounts.

I imagine it will show up once I set up a real account with Authorize.net

Link to comment
Share on other sites

Hey Vger,

 

 

first up awesome contribution! Not sure why so many people seem to have issues getting it up and running.

 

I have it up and running on our site which is going live in a week!

 

One unfortunate hickup is that anytime I get an error back from authorize.net (be it bad address, etc.) it comes back as part of the URL (...billing%address%did%not%math... etc). So a user would sees the checkout_payment.php with no values and no error messages, just some extra text tagged onto the end of the url indicating what error occured? Obviously something is going wrong here.

 

Any idea what would cause this?

Link to comment
Share on other sites

As an added clarification. I am presuming that via CURl it should autopopulate the fields and pop up an javascript message box with the relevant authorize.net error?

 

My form fields are also empty. I double checked with dreamhost and CURL was compiled and no proxy is needed.

 

Anybody?

Link to comment
Share on other sites

I haven't seen too many posts about Dreamhosts on this forum - but I've seen plenty of posts about them on other forums and none of them positive. Maybe they're your problem?

 

Vger

 

any idea what i need to be talking to dreamhost about? At this point I don't have the luxery of switching hosts. Is this ia curl issue?

 

Really appreciate the help!

Link to comment
Share on other sites

As a further clarification I am running oscommerce on Php 4.4.2 with register globals ON and CURL installed (see details below)

 

CURL support enabled

CURL Information libcurl/7.13.2 OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13

 

would love anybody's ideas.

 

Thanks

Link to comment
Share on other sites

As a further clarification I am running oscommerce on Php 4.4.2 with register globals ON and CURL installed (see details below)

 

CURL support enabled

CURL Information libcurl/7.13.2 OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13

 

would love anybody's ideas.

 

Thanks

 

 

Hey Man, sounds like your having a similar problem I had.

 

My hosting company has all the supported features this script requires but it still it didn't work, I tested it again and again and found nothing to claim why it wasn't working, so either it could be a version or build that it doesn't like. There is not real specifics, most people prolly don't know what versions of CURL, and PHP their hosting provider runs, but all that information would be important then people wouldn't be waisting their time.

 

Although I ended up getting it working but not on the same servers. So I believe your going to be at standstill with them until you change hosting. I've got my hosting provider working on this issue but can't say how long it's going to take. They are going to cross reference two servers. The one that works with the script verse the one I was originally on that supportively is the same but not working.

 

If anything important comes out of that I'll post and let everybody know what the problem was.

 

Good luck.

Link to comment
Share on other sites

Hey Man, sounds like your having a similar problem I had.

 

My hosting company has all the supported features this script requires but it still it didn't work, I tested it again and again and found nothing to claim why it wasn't working, so either it could be a version or build that it doesn't like. There is not real specifics, most people prolly don't know what versions of CURL, and PHP their hosting provider runs, but all that information would be important then people wouldn't be waisting their time.

 

Although I ended up getting it working but not on the same servers. So I believe your going to be at standstill with them until you change hosting. I've got my hosting provider working on this issue but can't say how long it's going to take. They are going to cross reference two servers. The one that works with the script verse the one I was originally on that supportively is the same but not working.

 

If anything important comes out of that I'll post and let everybody know what the problem was.

 

Good luck.

 

I posted yesterday asking who people were using in terms of hosting that we know work. Somebody replied with prohosting but the messages disappeared last night. Any further recommendations?

 

Thanks!

Link to comment
Share on other sites

It's against forum rules to post links to hosting companies etc. so I suspect that's why the message disappeared.

 

Vger

 

Thank you for pointing this out: I thought I was getting tired and did not click on the correct button. At least I would have expected a warning, but nothing in my PMs :-?

Edited by pixclinic
Link to comment
Share on other sites

If someone asks for recommendations then it is okay to PM an address to them, but not to post it on the forum.

 

Vger

 

so we can post in the forum that Dreamhost has bad press, but not give a good name ? strange....

Link to comment
Share on other sites

Not strange really. This project's Corporate Sponsors pay money to have their advertising on this site. So naturally they don't want other companies getting adverts for free. I'm sure they wouldn't object to companies (other than themselves) getting bad press.

 

Vger

Link to comment
Share on other sites

Not strange really. This project's Corporate Sponsors pay money to have their advertising on this site. So naturally they don't want other companies getting adverts for free. I'm sure they wouldn't object to companies (other than themselves) getting bad press.

 

Vger

 

Now, it makes perfect sense ;)

Link to comment
Share on other sites

Now, it makes perfect sense ;)

 

K - solved the problem. Figured I would share the knowledge since somebody else is bound to run into this.

 

If you run oscommerce through dreamhost run it on php 4.4 and turn OFF the High Security option in the manage domains. For some reason this interfears with the CURL functionality.

 

Now if I can only figure out why the catagory discount doesn't work... I would be set :)

Link to comment
Share on other sites

K - solved the problem. Figured I would share the knowledge since somebody else is bound to run into this.

 

If you run oscommerce through dreamhost run it on php 4.4 and turn OFF the High Security option in the manage domains. For some reason this interfears with the CURL functionality.

 

Now if I can only figure out why the catagory discount doesn't work... I would be set :)

 

Hey thats good info to post, do you have any ideas what flags they are enable or disabling when you do that?

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