src/Payum/Paypal/ProCheckout/Nvp/Action/StatusAction.php
public function execute($request)
    {
        RequestNotSupportedException::assertSupports($this, $request);

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

        if (null === $model['RESULT']) {
            $request->markNew();

            return;
        }

        if (false == is_numeric($model['RESULT'])) {
            $request->markUnknown();

            return;
        }

        if ($model['RESULT'] > 0) {
            $request->markFailed();

            return;
        }

        if ($model['ORIGID'] && Api::TRXTYPE_CREDIT == $model['TRXTYPE'] && Api::RESULT_SUCCESS == $model['RESULT']) {
            $request->markRefunded();

            return;
        }

        if (Api::TRXTYPE_SALE == $model['TRXTYPE'] && Api::RESULT_SUCCESS == $model['RESULT']) {
            $request->markCaptured();

            return;
        }

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

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

        if (null === $model['RESULT']) {
            $request->markNew();

            return;
        }

        if (false == is_numeric($model['RESULT'])) {
            $request->markUnknown();

            return;
        }

        if ($model['RESULT'] > 0) {
            $request->markFailed();

            return;
        }

        if ($model['ORIGID'] && Api::TRXTYPE_CREDIT == $model['TRXTYPE'] && Api::RESULT_SUCCESS == $model['RESULT']) {
            $request->markRefunded();

            return;
        }

        if (Api::TRXTYPE_SALE == $model['TRXTYPE'] && Api::RESULT_SUCCESS == $model['RESULT']) {
            $request->markCaptured();

            return;
        }

        $request->markUnknown();
    }
{@inheritDoc}

@param GetStatusInterface $request