How to customize the notification controller in Payum

351 views Asked by At

I'm trying to implement/update PayPal express checkout on a Symfony, application.

While I have successfully integrated it on the "normal" way, we have some issues regarding the capture: not all users come back to the website after the payment, so the code at the "doneAction" is not executed, the order is not set as completed, nor the email sent, etc. Every month up to 10 payment captures are lost because of this.

PayPal has the IPN notification system, and if I'm not mistaken Payum takes use of it via "Notification Url". How can I extend or override the notification controller? Can I attach an event to the notification? I want to place here the "Order completed" logic.

The only events I have found are:

  • payum.gateway.pre_execute

  • payum.gateway.execute

  • payum.gateway.post_execute
1

There are 1 answers

0
Maksim Kotlyar On BEST ANSWER

You do not have to overwrite Symfony's controller. What you need is an extension that does some extra stuff after the notification is processed. Here's the doc: https://github.com/Payum/Payum/blob/master/docs/instant-payment-notification.md

Also, you can completely overwrite the default notify action with a custom one, though I would recommend looking at extensions first.