Action/StatusAction.php
public function execute($request)
    {
        RequestNotSupportedException::assertSupports($this, $request);

        $model = new ArrayObject($request->getModel());

        $state = $model['state'];

        if (null === $state ||
            StateInterface::STATE_WAITING === $state
        ) {
            $request->markNew();

            return;
        }

        if (StateInterface::STATE_REPLIED === $state ||
            StateInterface::STATE_NOTIFIED === $state
        ) {
            $request->markPending();

            return;
        }

        if (StateInterface::STATE_CONFIRMED === $state) {
            $request->markCaptured();

            return;
        }

        $request->markFailed();
    }
public function execute($request)
    {
        RequestNotSupportedException::assertSupports($this, $request);

        $model = new ArrayObject($request->getModel());

        $state = $model['state'];

        if (null === $state ||
            StateInterface::STATE_WAITING === $state
        ) {
            $request->markNew();

            return;
        }

        if (StateInterface::STATE_REPLIED === $state ||
            StateInterface::STATE_NOTIFIED === $state
        ) {
            $request->markPending();

            return;
        }

        if (StateInterface::STATE_CONFIRMED === $state) {
            $request->markCaptured();

            return;
        }

        $request->markFailed();
    }
public function execute ( $ request ) { RequestNotSupportedException :: assertSupports ( $ this , $ request ) ; $ model = new ArrayObject ( $ request -> getModel ( ) ) ; $ state = $ model [ 'state' ] ; if ( null === $ state || StateInterface :: STATE_WAITING === $ state ) { $ request -> markNew ( ) ; return ; } if ( StateInterface :: STATE_REPLIED === $ state || StateInterface :: STATE_NOTIFIED === $ state ) { $ request -> markPending ( ) ; return ; } if ( StateInterface :: STATE_CONFIRMED === $ state ) { $ request -> markCaptured ( ) ; return ; } $ request -> markFailed ( ) ; }
{@inheritDoc}

@param GetStatusInterface $request
{ @inheritDoc }