HomeCoding & Programming

Prestashop authorize.net aim module redirect to order history page instead to confirmation page

Prestashop authorize.net aim module redirect to order history page instead to confirmation page
Like Tweet Pin it Share Share Email

PrestaShop authorize.net AIM module

 

What issue I have faced is, client has the site in “PrestaShop 1.5.4.1” 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 Authorized.net 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 Authorized.net 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
/modules/authorizeaim/authorizeaim.php

 

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

 

This should be
$this->displayName = ‘Authorize.net 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)
return;

 

I hope this will help you.
Happy Coding ๐Ÿ™‚

 

Comments (4)

Comments are closed.