Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Authorize.NET


optimus_prime

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?

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

Link to comment
Share on other sites

Hey, I was able to get past the redirection to login page error by setting up the SSL. Now, when I press confirm order button, it redirects me to:

 

https://secure.authorize.net/gateway/transact.dll

 

And in the window it says "This Page Cannot be Found"

 

Does anyone know what this means? I'm pulling my hair out! :(

Link to comment
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? <_<

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

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

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

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...
  • 3 weeks later...

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

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

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

Link to comment
Share on other sites

  • 1 month later...
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

Link to comment
Share on other sites

  • 3 months later...

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

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

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

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

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

Link to comment
Share on other sites

  • 6 months later...

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

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

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