symfonypaypalpayum

Process after IPN is received


I need to activate a user if a transaction is successful. What event should I listen after an IPN is received using Payum Bundle?

Payum\Bundle\PayumBundle\Controller\NotifyController::doAction doesn't seem to dispatch any event. How is this controller useful?


Solution

  • After some experiments and reading more source code, I found out that we could implement desired behaviours (send email, update database) as actions and tag it with payum.action or simply add it to the targeted Payum context.

    Configuration per action
    services:
        acme.sample_action:
            class: Acme\PaymemtBundle\Payum\Action\SampleAction
            tags:
                - { name: payum.action, factory: paypal_express_checkout_nvp }