Prestashop aim module redirect to order history page instead to confirmation page

PrestaShop AIM module


What issue I have faced is, client has the site in “PrestaShop” Open Source for e-commerce and he have installed so many modules in that.
One of them is “Post Affiliate Pro“, that is used for tracking the pages.


Client has a setup of commission amount for all of the affiliates.
But if the buyer used as a payment gateway for payment then instead of Payment Confirmation Page, the buyer was redirecting to Payment History page and this obviously not tracked by the Affiliate program plug-in and that’s why the affiliate will not received any commission, even if his client have bought product.


So, this was not a small bug and I have gone through the full module, Client have installed 2 other modules for payment and these were working fine. The modules names are

1) Bank wire
2) Payment by check


Both of these were working fine and track all the pages and as the client required after payment it will go to payment confirmation page.
I have looked on these 2 modules files and have compared these module with the AIM and found that all the functions and files are same as required.

I have checked the hooks in admin and in database and these are also fine, so no luck was there for me 🙁


Finally I have started debugging in the “authorizeaim” files using “echo”, “die”, “if” and “else” as we PHP developer have to use these weapons very often & I stuck whenever I see the bug it was very silly mistake by the developer.


We have a main file in module with the same name as module folder, here in my case it is


In this file under the constructor, he has a statement as
$this->displayName = ‘ AIM (Advanced Integration Method)’;


This should be
$this->displayName = ‘ AIM’;


Because in the below statement you can see that if the module name is not same then it will return the control automatically before “orderconfirmation” hook.


if ($params[‘objOrder’]->module != $this->name)


I hope this will help you.
Happy Coding 🙂


4 thoughts on “Prestashop aim module redirect to order history page instead to confirmation page”

  1. Thank you for taking the time to post your process on how to fix the module bug. It was exactly as you said, just changing the module display name solved the order confirmation redirect issue. Thanks again.

    1. Bryan..the above change will not make the site down..Can you explain more what you have done?

Comments are closed.