Payum\Paypal\ProHosted\Nvp\Action\NotifyAction::execute PHP Method

execute() public method

{@inheritDoc}
public execute ( $request )
    public function execute($request)
    {
        /** @var $request Notify */
        RequestNotSupportedException::assertSupports($this, $request);
        $this->gateway->execute(new Sync($request->getModel()));
    }

Usage Example

Beispiel #1
0
 /**
  * @test
  */
 public function shouldSubExecuteSyncWithSameModel()
 {
     $expectedModel = array('foo' => 'fooVal');
     $gatewayMock = $this->createGatewayMock();
     $gatewayMock->expects($this->once())->method('execute')->with($this->isInstanceOf('Payum\\Core\\Request\\Sync'));
     $action = new NotifyAction();
     $action->setGateway($gatewayMock);
     $action->execute(new Notify($expectedModel));
 }