AbanteCart Community

Shopping Cart Operations => Support => General Support => Topic started by: Sam_78 on August 17, 2022, 11:11:39 PM

Title: payPal standard success page redirect
Post by: Sam_78 on August 17, 2022, 11:11:39 PM
Hi I am working on writing orders on third party site and I have implemented a function which works on Cheque / Money Order payment extension but it is not working on default_pp_standart extension.  My function is in storefront\controller\pages\checkout\success.php 

inside 
class ControllerPagesCheckoutSuccess extends AController
{
    public $data = array();
    public $errors = array();

    public function main()
    {

/*my custom function */

Can someone please tell me why it is not working after payPal redirects to success page??

is there someplace else where I can call that function??
Title: Re: payPal standard success page redirect
Post by: abolabo on August 19, 2022, 02:21:11 AM
I think you should to create a hook on _UpdateData() call of success page controller. Not a new controller.

You can look into other extensions for example.

Note. Paypal_standart now is deprecated since version 1.3.3.
Title: Re: payPal standard success page redirect
Post by: Sam_78 on August 19, 2022, 09:35:12 AM
Hi,

I have my function right above this line  https://github.com/abantecart/abantecart-src/blob/master/public_html/storefront/controller/pages/checkout/success.php#L172  it does work for other payment method but paypal standard redirects to success page and it doesn't work. If you think I need to use it inside this function $this->extensions->hk_UpdateData($this, __FUNCTION__); it won't be called anyways.