Bridge/Payum/OutstandingBalance/Action/StatusAction.php
public function execute($request)
    {
        /** @var GetStatusInterface $request  */
        RequestNotSupportedException::assertSupports($this, $request);

        $model = ArrayObject::ensureArrayObject($request->getModel());

        if (!isset($model[Constants::FIELD_STATUS])) {
            $request->markNew();

            return;
        }

        if (Constants::STATUS_AUTHORIZED == $model[Constants::FIELD_STATUS]) {
            $request->markAuthorized();

            return;
        }

        if (Constants::STATUS_CAPTURED == $model[Constants::FIELD_STATUS]) {
            $request->markCaptured();

            return;
        }

        if (Constants::STATUS_FAILED == $model[Constants::FIELD_STATUS]) {
            $request->markFailed();

            return;
        }

        if (Constants::STATUS_EXPIRED == $model[Constants::FIELD_STATUS]) {
            $request->markExpired();

            return;
        }

        if (Constants::STATUS_CANCELED == $model[Constants::FIELD_STATUS]) {
            $request->markCanceled();

            return;
        }

        $request->markUnknown();
    }
public function execute($request)
    {
        /** @var GetStatusInterface $request  */
        RequestNotSupportedException::assertSupports($this, $request);

        $model = ArrayObject::ensureArrayObject($request->getModel());

        if (!isset($model[Constants::FIELD_STATUS])) {
            $request->markNew();

            return;
        }

        if (Constants::STATUS_AUTHORIZED == $model[Constants::FIELD_STATUS]) {
            $request->markAuthorized();

            return;
        }

        if (Constants::STATUS_CAPTURED == $model[Constants::FIELD_STATUS]) {
            $request->markCaptured();

            return;
        }

        if (Constants::STATUS_FAILED == $model[Constants::FIELD_STATUS]) {
            $request->markFailed();

            return;
        }

        if (Constants::STATUS_EXPIRED == $model[Constants::FIELD_STATUS]) {
            $request->markExpired();

            return;
        }

        if (Constants::STATUS_CANCELED == $model[Constants::FIELD_STATUS]) {
            $request->markCanceled();

            return;
        }

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