Jump to content
Sign in to follow this  
optimus_prime

Authorize.NET

Recommended Posts

Hello, I have setup my store with Authorize.net. I entered in all of the information and it looks like the whole process of checking out works, but on the final order confirmation page, it takes me back to the login screen instead of showing the last page of the checkout process.

 

Also - the confirmation email does not get sent

 

Does anyone know what is going on? This isn't normal is it?

Share this post


Link to post
Share on other sites

I also have the same problem just like you had. I tried to search all the article in this forum but find nothing.

 

I also call authorize.net and they told me they can't help me because this is the programming problem.

 

I just try to use SIM to connect to my authorize.net account but it keep to bring me back to the login page with no any error.

 

I do think a lot of people using oscommerce and authorize SIM mode. Can any one help us to result this problem if you know how!

 

Thanks!

Share this post


Link to post
Share on other sites

Crap! At least I'm not the only one...

 

I've been banging my head against the wall ALL DAY trying to figure this one out. Spoke to Authorize.net and they said I might have the wrong Terminal ID so I got in touch with Global and they gave me the right one. Now, when I click confirm order or whatever, the order is posting to my Authorize.net account fine - the credit card works great and the order shows up as confirmed/awaiting fulfillment or whatever in the Authorize.net unsettled transactions page. But the OSCommerce app is kicking me to my checkout_payment page - with https://secure.authorize.net/gateway/transact.dll in the URL field. I'm super confused but looking at the code in the authorize.net module (includes > modules > payment > authorizenet.php) I found this:

 

    function before_process() {
     global $HTTP_POST_VARS;

     if ($HTTP_POST_VARS['x_response_code'] == '1') return;
     if ($HTTP_POST_VARS['x_response_code'] == '2') {
       tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(MODULE_PAYMENT_AUTHORIZENET_TEXT_DECLINED_MESSAGE), 'SSL', true, false));
     }
     // Code 3 is an error - but anything else is an error too (IMHO)
     tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(MODULE_PAYMENT_AUTHORIZENET_TEXT_ERROR_MESSAGE), 'SSL', true, false));
   }

 

Which looks like if the response code from Authorize.net is anything but 1 then it is considered an error and is sending user to checkout_payment.php instead of checkout_success.php which is what you want it to do.

 

Sucks. Anyone got ANY ideas? <_<

Share this post


Link to post
Share on other sites

Oh, and Authorize.net insists that they're returning 1 for response code on the successful orders I submitted.

Share this post


Link to post
Share on other sites

Also - though the transactions/orders are posting successfully to Authorize.net - they're not being written to the order table in the OSCommerce DB.

 

Did I mention that I was confused?

Share this post


Link to post
Share on other sites

Sorry: 'Captured/Pending Settlement' not confirmed/awaiting fulfillment as I had suggested earlier.

Share this post


Link to post
Share on other sites

You have to make sure you Authorize.net return receipt is pointing to the correct path. If you are using a secure server, it should read something like this:

 

https://domain.xxx.com/catalog/checkout_success.php

 

This is the path that OS needs Authorize.net to bounce back to. From there, the customer will be able to see what they've just ordered.

 

Hope this helps.

Share this post


Link to post
Share on other sites

I have the same problem here. When I confirm the order, I'm taken to https://secure.authorize.net/gateway/transact.dll which asks me to login. I login, and I'm taken to the front page. The order does not get processed. I have my Authorize.net reciept pointing to the correct path (https://domain.xxx.com/catalog/checkout_success.php) But it's the page on the authorize.net page that's screwing up.

Share this post


Link to post
Share on other sites

I never had this problem until I turned on the option to force cookie usage (in the Admin panel, under Sessions). If that's turned to "false", no problem. I turn it to "true", it happens every time. I really want to force cookie usage because our site has had problems with people posting links that have the osCsid attached to them. When multiple people start clicking on that link and browsing and logging in, you end up with some people being logged into others' accounts, which is Bad. osCsid only ever shows up if the user has cookies turned off, so I figured the best solution was to simply require cookies. Then I ran into this problem.

 

Our site does over a thousand dollars in sales per day, so I'd REALLY like to find some way to force cookie usage, and not get this problem. If anybody can come up with a solution, it would be very appreciated, and I'll even give you a gift certificate to the store! http://www.DriveThruRPG.com

Share this post


Link to post
Share on other sites

Love your store site!!! I cant get anyone to answer my post, was wondering if you could help me since it looks like you succeeded in your venture...

How the frick did you login to the admin for the first time??? was there a default username and password that came with the install that i missed???

any help is much appreciated.

thanks in advance.

 

joey :ph34r:

Share this post


Link to post
Share on other sites

You shouldn't actually be required to login to the admin section, unless you installed some module which does this. I would highly suggest locking down the admin directory somehow once you've got everythign up and running though -- I did it with by having Apache look at a .htpasswd file for the admin directory.

Share this post


Link to post
Share on other sites
I never had this problem until I turned on the option to force cookie usage (in the Admin panel, under Sessions).  If that's turned to "false", no problem.  I turn it to "true", it happens every time.  I really want to force cookie usage because our site has had problems with people posting links that have the osCsid attached to them.  When multiple people start clicking on that link and browsing and logging in, you end up with some people being logged into others' accounts, which is Bad.  osCsid only ever shows up if the user has cookies turned off, so I figured the best solution was to simply require cookies.  Then I ran into this problem.

 

Our site does over a thousand dollars in sales per day, so I'd REALLY like to find some way to force cookie usage, and not get this problem.  If anybody can come up with a solution, it would be very appreciated, and I'll even give you a gift certificate to the store!  http://www.DriveThruRPG.com

 

Did you ever get this to work with "Force Cookie Usage" set to ture? I am haveing the same problem. I may just switch to the AIM contrib but was hoping for a faster fix without turning "Force Cookie Usage" set to false.

 

Thanks

Share this post


Link to post
Share on other sites

I think this issue is caused by the session being lost because the cookie can not be read by your site because the domain name is authorize.net an the cookie was set as your domain name. We have to find a way to either send the session to authorize.net in the querystring on just that page, or have authorize.net forward the request as a post back to our site instead of a server side redirect.

 

Please help if you can!

 

Thanks in advance.

 

Todd

Share this post


Link to post
Share on other sites
Did you ever get this to work with "Force Cookie Usage" set to ture?  I am haveing the same problem. I may just switch to the AIM contrib but was hoping for a faster fix without turning "Force Cookie Usage" set to false.

 

Thanks

 

Well, sort of. I edited the code in application_top to not check for cookies on certain pages of the checkout process -- namely, checkout_process.php and checkout_success.php. Just add a bit in there checking to see if $PHP_SELF is either of those.

 

Good luck,

Mike Todd

Share this post


Link to post
Share on other sites
Well, sort of.  I edited the code in application_top to not check for cookies on certain pages of the checkout process -- namely, checkout_process.php and checkout_success.php.  Just add a bit in there checking to see if $PHP_SELF is either of those.

 

Good luck,

Mike Todd

I think if you set Force Cookie Use to false it will solve this problem.

Share this post


Link to post
Share on other sites

Thanks,

 

Thanks for your help, I was able to fix it. I made that change in application_top to only accept the the sid parameter if it is one of three pages: checking_process checking_payment and checking_success.

 

I was thinking that maybe it could be done where only query parameters are used on a post? Is the response back from Authorize.net a post? It must be because it has sensitive info on it.

 

I set the force cookies to true and then I wrote added a condition to the if statement that if the sid is set from one of the above pages, then it should skip looking the sid up from the cookie.

 

Should I have set force cookie to false? WIll it look for the cookie if it does not find the sid in the query string under that setting? This change really should be written by a php expert and included as an option in the config.

 

I also changed the url rewritter to NEVER ad the sid onto the end of a link.

Share this post


Link to post
Share on other sites
Thanks,

 

Thanks for your help, I was able to fix it.  I made that change in application_top to only accept the the sid parameter if it is one of three pages: checking_process checking_payment and checking_success.

 

I was thinking that maybe it could be done where only query parameters are used on a post?  Is the response back from Authorize.net a post?  It must be because it has sensitive info on it.

 

I set the force cookies to true and then I wrote added a condition to the if statement that if the sid is set from one of the above pages, then it should skip looking the sid up from the cookie.

 

Should I have set force cookie to false?  WIll it look for the cookie if it does not find the sid in the query string under that setting?  This change really should be written by a php expert and included as an option in the config.

 

I also changed the url rewritter to NEVER ad the sid onto the end of a link.

 

 

Hello, tlynch! Congratulations on your success with this Authorize.net connection problem. :thumbsup:

 

I'm new to this and am although I've got 35 years in the computer biz, I'm not much of a PHP hacker. However, I will definitely be needing to connect my store to Authroize.net as soon as I get everything else working. If you believe you've solved this problem, would you please post detailed before and after snapshots of the code changes you've made or at least a step-by-step guide to on the order of "open this file", "find this text", "make this change" hack instruction?

 

Frankly, some of us will never be able to do what you've done without such guidance.

 

Thanks! And again, congrats... :)

Share this post


Link to post
Share on other sites

Seems every one has problem with authorize.net and oscommerce..

 

i am not very good in technical issues..

 

i have the cookie set true as you but i do not know what to do exactly at following pages:

 

checking_process.php

checking_payment.php

checking_success.php

 

can you please tell me what i have to edit at them for ($PHP_SELF)

 

so i can copy and past in my shopping cart

 

thanks inadvance

Share this post


Link to post
Share on other sites
Seems every one has problem with authorize.net and oscommerce..

 

i am not very good in technical issues..

 

i have the cookie set true as you but i do not know what to do exactly at following pages:

 

application_top.php

 

checking_process.php

checking_payment.php

checking_success.php

 

can you please tell me what i have to edit at them for ($PHP_SELF)

 

what is the code exactly that we should add and to which pages...!

 

:'(

 

so i can copy and past in my shopping cart

 

thanks inadvance

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
Sign in to follow this  

×