Author Topic: payPal standard success page redirect  (Read 1944 times)

Offline Sam_78

  • Sr. Member
  • ****
  • Posts: 270
  • Karma: +42/-1
    • View Profile
payPal standard success page redirect
« 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??

Offline abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2048
  • Karma: +319/-13
  • web for all, all for web!
    • View Profile
    • AbanteCart
Re: payPal standard success page redirect
« Reply #1 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.
“No one is useless in this world who lightens the burdens of another.”
― Charles Dickens

Offline Sam_78

  • Sr. Member
  • ****
  • Posts: 270
  • Karma: +42/-1
    • View Profile
Re: payPal standard success page redirect
« Reply #2 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.

 

Powered by SMFPacks Social Login Mod