Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

I am trying to set up my site to work with "authorizenetaim" payment module to work. The site works fine with SIM module. However, when I try to use the Authorize.net AIM module, I constantly get error that the credit card could not be processed. The funny thing is, when I login to authorize.net site, I see that the order has been accepted. So the problems seems to be that the Authorize.net is not sending correct response back to AIM module.

 

There is a line in code that states:

 

$response_vars = explode(',', $response);

 

if ($response_vars[0] != '1') { show error blah blah blah .....

 

How do I find out what the $response_vars[0] value is being returned? I tried using print_r($response) and I got the following:

 

Array ( [0] => 1,1,1,(TESTMODE) This transaction has been approved.,000000,P,0,,Your Products Description,1.00,CC,auth_only .... etc....

 

So, it looks like the first value is 1! Why does it show error if the value is 1???

  • 5 months later...
  • 3 months later...
Posted
I am trying to set up my site to work with "authorizenetaim" payment module to work. The site works fine with SIM module. However, when I try to use the Authorize.net AIM module, I constantly get error that the credit card could not be processed. The funny thing is, when I login to authorize.net site, I see that the order has been accepted. So the problems seems to be that the Authorize.net is not sending correct response back to AIM module.

 

There is a line in code that states:

 

$response_vars = explode(',', $response);

 

if ($response_vars[0] != '1') { show error blah blah blah .....

 

How do I find out what the $response_vars[0] value is being returned? I tried using print_r($response) and I got the following:

 

Array ( [0] => 1,1,1,(TESTMODE) This transaction has been approved.,000000,P,0,,Your Products Description,1.00,CC,auth_only .... etc....

 

So, it looks like the first value is 1! Why does it show error if the value is 1???

 

I ran into the same problem.

 

The problem is in the following line:

 

$response_vars = explode(',', $response);

 

Update the line to this:

 

$response_vars = explode(',', $response[0]);

 

The response from Authorize.net is being saved as the first element in an array--not as a string. (It took me a while to figure this out. >_< )

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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