Jump to content

authorize aim redirect to order history page instead to confirmation page


Recommended Posts

I am working on:


- prestashop

- Authorize.net AIM (Advanced Integration Method) 1.4.4


I can purchase with this module and all works good BUT after a purchase it redirect me to order history page instead the confirmation page...




What I can do to authorize redirect me to confirmation page after a purchase? I want to display a thank you message in the confirmation page, and I want to add google adwords code....


Please help me...

Share this post

Link to post
Share on other sites

  • 4 weeks later...
  • 6 months later...

We just posted on this issue as well on the Forge: http://forge.prestashop.com/browse/PNM-1987


Hopefully, since we're a certified partner, this will get  fixed relatively quickly... In the meantime, here is the explanation / fix:


In the OrderConfirmationController, init() function there is this code at the end of the function:


if ($order->payment != $module->displayName)



And in the Authorize.net module (version 1.4.4, which I believe is the latest) we have:


authorizeaim.php, line 42:


$this->displayName = 'Authorize.net AIM (Advanced Integration Method)';


And in validation.php, line 119 we have:


$payment_method = 'Authorize.net AIM';


And, obviously, they don’t match, so the customer then gets redirected to order history. So, we changed the displayName in the main module file to “Authorize.net AIM” and now it’s working fine.

Share this post

Link to post
Share on other sites

  • 1 year later...

Hello Guys,


I'm using PS and PayUmoney payment getway.. I post my problem many times and asked for solution.. but no one reply..  :(


Please go through the link below..


please check out with any product by using the credentials below..


Test Credit Card Name: Use your name

Test Card Number: 5123456789012346 

Test C.V.V: 123 

Test Expiry: May 2017 


Issue : After completion of  transaction (Payment accepted) it's redirected without any order ID and with out any success message.. it showing only the header part.. if you press the ENTER in the URL bar (https://www.freshwan...ayu/success.php) then it's showing order details page.. url will look like this example https://www.freshwan...ail?id_order=38


******************************************* success.php *******************************************







$context = Context::getContext();

$fc=new Frontcontroller();




$payu = new payu();








$baseUrl=Tools::getShopDomain(true, true).__PS_BASE_URI__;

$order_id= $response['txnid']-354572829452247;

$transactionId= $response['mihpayid'];






$amount        = $response['amount'];

$productinfo   = $response['productinfo'];

$firstname     = $response['firstname'];;

$email         = $response['email'];



if($response['status'] == 'success' || $response['status'] == 'in progress')




$Udf1 = $response['udf1'];

$Udf2 = $response['udf2'];

$Udf3 = $response['udf3'];

$Udf4 = $response['udf4'];

$Udf5 = $response['udf5'];

$Udf6 = $response['udf6'];

$Udf7 = $response['udf7'];

$Udf8 = $response['udf8'];

$Udf9 = $response['udf9'];

$Udf10 = $response['udf10'];



 $keyString =  $key.'|'.$txnid.'|'.$amount.'|'.$productinfo.'|'.$firstname.'|'.$email.'|'.$Udf1.'|'.$Udf2.'|'.$Udf3.'|'.$Udf4.'|'.$Udf5.'|'.$Udf6.'|'.$Udf7.'|'.$Udf8.'|'.$Udf9.'|'.$Udf10;


 $keyArray = explode("|",$keyString);

 $reverseKeyArray = array_reverse($keyArray);




if($log==1 )


  $responseValue= str_replace( "'"," ",implode(",",$response));

  $successQuery="update ps_payu_order set payment_response='$responseValue' where id_order= ".$order_id;;






$saltString     = $salt.'|'.$status.'|'.$reverseKeyString;

$sentHashString = strtolower(hash('sha512', $saltString));






if($sentHashString != $responseHashString)




$history = new OrderHistory();

$history->id_order = (int)($order_id);

$history->changeIdOrderState(Configuration::get('PS_OS_ERROR'), $history->id_order);










global $cart,$cookie;

$total = $amount;

$currency = new Currency(Tools::getValue('currency_payement', false) ? Tools::getValue('currency_payement') : $cookie->id_currency);

$customer = new Customer((int)$cart->id_customer);

if($response['status'] == 'success')

$payu->validateOrder((int)$cart->id, Configuration::get('PS_OS_PAYMENT'), $total, $payu->displayName, NULL, NULL, (int)$currency->id, false, $customer->secure_key);                


  $payu->validateOrder((int)$cart->id, Configuration::get('PS_OS_PREPARATION'), $total, $payu->displayName, NULL, NULL, (int)$currency->id, false, $customer->secure_key);



$result = Db::getInstance()->getRow('SELECT * FROM ' . _DB_PREFIX_ . 'orders WHERE id_cart = ' . (int)$cart->id);



                Tools::redirectLink(__PS_BASE_URI__ . 'order-detail.php?id_order=' . $result['id_order']);











******************************* success.tpl *******************************


<br />

<strong>You have successfully paid your order.</strong>

<br />

<strong>Your order-id is {$orderId} </strong>

<br /> <br />

<p >

<a href="{$baseUrl}" title="Continue Shopping">

Continue Shopping

<link href="{$baseUrl}themes/default/css/product_list.css" rel="stylesheet" type="text/css" media="all" />

<link href="{$baseUrl}themes/default/css/grid_prestashop.css" rel="stylesheet" type="text/css" media="all" />

<link href="{$baseUrl}themes/default/css/global.css" rel="stylesheet" type="text/css" media="all" />







Guys! please can any solve this issue..that will really help.. I can't live the site regarding this issue.. please help me.. plese help somebody..


Thanks a lot..

Share this post

Link to post
Share on other sites

This topic is now closed to further replies.

  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More