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

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

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

            return;
        }

        if ($model['invoice_number']) {
            $request->markCaptured();

            return;
        }

        if ($model['reservation']) {
            $request->markAuthorized();

            return;
        }

        if (false == $model['status'] || Constants::STATUS_CHECKOUT_INCOMPLETE == $model['status']) {
            $request->markNew();

            return;
        }

        if (Constants::STATUS_CHECKOUT_COMPLETE == $model['status']) {
            $request->markPending();

            return;
        }

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

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

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

            return;
        }

        if ($model['invoice_number']) {
            $request->markCaptured();

            return;
        }

        if ($model['reservation']) {
            $request->markAuthorized();

            return;
        }

        if (false == $model['status'] || Constants::STATUS_CHECKOUT_INCOMPLETE == $model['status']) {
            $request->markNew();

            return;
        }

        if (Constants::STATUS_CHECKOUT_COMPLETE == $model['status']) {
            $request->markPending();

            return;
        }

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

@param GetStatusInterface $request