Jump to content

[Solved] How does Authorize.net test mode work?


Recommended Posts

Hi,
We have installed PrestaShop 1.4.0.17 Link Here, have our SSL cert installed and working and we are now testing the site. We are using Authorize.net module that came with this Prestashop version.

We have set it in test mode, also logged into Authorize.net and set it in test mode. Prestashop is set for one page checkout. When we test an order nothing happens, we are still on the one page checkout and no message is generated. I know that the transaction with Authorize.net is supposed to be "silent", but what is supposed to happen? How can I tell if it is working? What can I do to troubleshoot it?

Thank You!

Link to comment
Share on other sites

Thank you for your quick reply, but it doesn't answer my questions as I am in test mode. I have both Authorize.net and Prestashop Module for Authorize.net set to test mode, so it is my understanding that nothing will be recorded at Authorize.net.

I am trying to test the Cart, but I am not seeing any indication that things are working, after submitting payment I am still on the Cart page. I am not getting any error messages, but I am not getting any type of success message either.

To rephrase my questions:
After I click the "Validate Order" button in the shopping cart to submit the test purchase, what should happen? What should I see?
Right now, nothing happens, I am still in the cart, the products are still in the cart. I cannot tell whether or not there has been any communication from Authorize.net. I have used test credit card numbers 4222222222222 and 4007000000027.
I'm assuming there must be some type of message that the credit card has been processed or succeeded (whether a Test or Live). If it was a real purchase what would the customer see? Where would they be redirected to? Are the test orders recorded in Prestashop (nothing there yet)?

I know that's a lot of questions, so thanks in advance!
KM

Link to comment
Share on other sites

I had my client switch Authorize.net to Live mode and kept Prestashop module in test mode. No change, same problem.

Then I switched from one-page checkout to the five page checkout and now I see an error message:
Error, please verify the card informations

Does that shed any additional light on what might be happening? I read on the forum that one person upgraded to 1.4.0.17 to solve the problem, but I'm already on that version.

Thank You!

45343_wT9pZBSiuoFd3UH62mdD_t

Link to comment
Share on other sites

The year drop down doesn't go up that high, so couldn't try your exp. date.

Just to be clear, I'm not using an Authorize.net Test Account, The client's Authorize.net account is set up and in Prestashop I have the Authorize.net module set to Test (not Production). In Authorize.net we've tried both ways(test and live). Can someone tell me the correct way to set this up to test the cart before we go live?

That message ('Error, please verify the card informations') is being generated in Prestashop. But based on a variable from Authorize.net, which seems to be response error 3 (card declined). Not sure, but that's what I think from looking at the code below:

Here is the trail I see. First in modules\authorizeaim\validation.php:

$request = curl_init(
Tools::getValue('x_test_request') ? 'https://test.authorize.net/gateway/transact.dll' : 'https://secure.authorize.net/gateway/transact.dll');
    ...snip ...
$response = explode('|', $postResponse);
if (!isset($response[7]) OR !isset($response[3]) OR !isset($response[9]))
{
       Logger::addLog('Authorize.net returned a malformed response for cart '.$response[7], 4);
       die('Authorize.net returned a malformed response, aborted.');
}

if ($response[0] == 3)
   Tools::redirect('order.php?step=3&aimerror=1');




Then in modules\authorizeaim\authorizeaim.php:

$isFailed = Tools::getValue('aimerror');



Then in modules\authorizeaim\authorizeaim.tpl

{if $isFailed == 1}

{l s='Error, please verify the card informations' mod='authorizeaim'}
   {/if}



So, I understand the sequence of what is happening (assuming I'm looking at this correctly), but, I have no idea if my test settings are correct or what needs to be done to get things working. I had my client double check the login ID and key and she said they are correct.

I need help as my client wants to launch this immediately.

Thank you!

Link to comment
Share on other sites

This has not been solved and my client is desperate to get their site up. Everything seems to be set up correctly but we are getting an error message when we try to test Authorize.net. that says:
Error, please verify the card informations

We have Authorize.net module set in test mode
At Authorize.net we have tried both test and live mode.
Tested credit card number 4007000000027 and 4012888818888 with various future exp. dates (these numbers should return a success)
Double checked the login id and key
Double checked file permissions

What else can I do? Please help, I am at my wits end.

Thank You!

Link to comment
Share on other sites

Double checked the login id and key

Please note that log in id is not the one that you log in to AuthorizeNet website to manage your data.
It must be API log in ID and transaction Key, something like

log in id: 9J4nn6xCA2B
key:490F58y8K9X4jpT5
Link to comment
Share on other sites

Yes, we are using the correct Login ID.

However I have SOLVED this :-)

Authorize.net should work properly for testing if any of the following conditions are met:
Authorize.net: Test
Prestashop: Test

Authorize.net: Live
Prestashop: Test

Authorize.net: Test
Prestashop: Production

However, only this last combination worked, so it seems as if there might be a bug in the code for the Prestashop test mode (I'm using PS 1.4.0.17). When I put the Authorize.net module in Production mode (with Authorize.net settings in Test Mode) everything works!

Link to comment
Share on other sites

  • 2 months later...

Yes, we are using the correct Login ID.<br/><br/>However I have SOLVED this :-)<br/><br/>Authorize.net should work properly for testing if any of the following conditions are met:<br/>Authorize.net: Test <br/>Prestashop: Test<br/><br/>Authorize.net: Live<br/>Prestashop: Test<br/><br/>Authorize.net: Test <br/>Prestashop: Production<br/><br/>However, only this last combination worked, so it seems as if there might be a bug in the code for the Prestashop test mode (I'm using PS 1.4.0.17). When I put the Authorize.net module in Production mode (with Authorize.net settings in Test Mode) everything works!

 

Hey Kallym... this issue is driving me NUTZ too! I configured the module to work that same way you did and am also having success, however with prestashop in "production mode" and authorize.net in "test" mode, doesn't that mean that even though transactions get pushed through to authorize.net, wont they only be "Test" transactions?

 

Have you figured out a way to get this thing working so that real live transactions are good to go?!

 

I realize this post was from May, but any info you can share would be GREAT!!

 

Joe Cap

Link to comment
Share on other sites

  • 11 months later...

I have had the same problems. I am working through this to find a solution.

It is a shame that authorize module is not fool proof. Here is my investigation, it is not for the programming purist ;-)

It is for someone who wants to know what is going on.

Nothing is silent. The silence is that this module makes an ajax call. ie an http protocol call

However, the first thing that happens is that on clicking validate it runs some javascript:

js/jquery/jquery.validate.creditcard2-1.0.1.js

( This helped me to I realise that I had to configure some cards in the module admin :-s )

I have modified mine, my 1st statement is:

return true;

I will fix the validation after I can make a transaction.

Now we can investigate the http call :)

The magic is in modules/authorizeaim/validation.php

We can see that the code is going to make cURL call.

Right now I am printing out $url, and $poststring, so I can see what happens. I am crude, so I use: die($url);

That's all for now.

Link to comment
Share on other sites

Authorize TEST mode logic seems problematic.

It say if you're in test mode, append x_test_request=true to poststring, but x_test_request=0 has already been set.

Who knows what will be processed first?

BTW Test mode does 2 things, 1 sets that parameter in the poststring, and it changes the url to which you're going post.

 

( Either use production mode, or fix the code. I'm going to fix that code )

Here is my code snippet:

 

 

$url = 'https://secure.internetsecure.com/process.cgi';
if (Configuration::get('AUTHORIZE_AIM_DEMO'))
{
 $_POST['x_test_request']= 'TRUE';
//$url = 'https://test.authorize.net/gateway/transact.dll';
}
$postString = '';
foreach ($_POST as $key => $value)
$postString .= $key.'='.urlencode($value).'&';
$postString = trim($postString, '&');

Link to comment
Share on other sites

  • 3 years later...

Hi, I am having the same issue I tried everything that you guys posted and I keep getting the same message "Please verify credit card information" I also have a one page checkout and I have not been able to solve the issue. Have you guys found a solution to this??

 

Please help!!!
 

Link to comment
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
×
×
  • Create New...