These are chat archives for Payum/Payum

Apr 2018
Khairi Husseini
Apr 11 2018 17:25

Hello everyone. I'm tinkering with the payum integration in symfony and added a new factory and a capture action. When I trigger the payment, I get the Exception

Type error: Argument 1 passed to Payum\Core\Gateway::addAction() must implement interface Payum\Core\Action\ActionInterface, string given, called in /var/www/app/vendor/payum/core/Payum/Core/CoreGatewayFactory.php on line 219

The stack trace shows the following call Gateway->addAction('@app.payum_action.payone.capture_order', false)

This is how I registered the factory and the action. What am I doing wrong?

      class: Payum\Core\Bridge\Symfony\Builder\GatewayFactoryBuilder
      arguments: [Valiton\Payum\Payone\PayoneGatewayFactory]
      - name: payum.gateway_factory_builder
        factory: payone

    # Overrides \Valiton\Payum\Payone\Action\CaptureAction
      class: AppBundle\Action\Payone\CaptureOrderAction
      - '@coreshop.repository.order'
      - '@coreshop.state_machine_applier'
      - name: payum.action
        factory: payone
Khairi Husseini
Apr 11 2018 20:18
Ah oki, the symfony service entry needs to be public because the ContainerAwareCoreGatewayFactory uses the symfony container directly to add the action