After PayPal payment processed custom code

  • Posts: 1
  • Thank you received: 0
13 years 6 months ago #15762

Hello,

I am trying to add some custom code for our site to do some processing after a payment has been confirmed by PayPal and the user comes back to the site. In the documentation it says that the function onAfterOrderConfirm is where it says this should be done. In my case, this function is being executed when the user is transfered to the PayPal site before the payment is approved. Does anyone know which function would be executed after a user's payment is confirmed in PayPal?

Thanks

Please Log in or Create an account to join the conversation.

  • Posts: 82867
  • Thank you received: 13373
  • MODERATOR
13 years 6 months ago #15765

The onAfterOrderConfirm function is indeed called at the end of the checkout process and that's where the paypal plugin redirects to paypal.

What you're looking for is the onAfterOrderUpdate function which is called each time an order information is updated.
There, you can check the $order->order_status and do your processing based on its value.

Please Log in or Create an account to join the conversation.

Time to create page: 0.058 seconds
Powered by Kunena Forum