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

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

        $klarna = $this->getKlarna();

        try {
            $klarna->returnAmount(
                $details['invoice_number'],
                $details['amount'],
                $details['vat'],
                $details['flags'] ?: \KlarnaFlags::NO_FLAG,
                $details['description']
            );
        } catch (\KlarnaException $e) {
            $this->populateDetailsWithError($details, $e, $request);
        }
    }
public function execute($request)
    {
        RequestNotSupportedException::assertSupports($this, $request);

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

        $klarna = $this->getKlarna();

        try {
            $klarna->returnAmount(
                $details['invoice_number'],
                $details['amount'],
                $details['vat'],
                $details['flags'] ?: \KlarnaFlags::NO_FLAG,
                $details['description']
            );
        } catch (\KlarnaException $e) {
            $this->populateDetailsWithError($details, $e, $request);
        }
    }
{@inheritDoc}

@param ReturnAmount $request