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

        /** @var PaymentInterface $payment */
        $payment = $request->getSource();

        $model = ArrayObject::ensureArrayObject($payment->getDetails());

        //$model['DESCRIPTION'] = $payment->getDescription();
        if (false == $model['amount']) {
            $this->gateway->execute($currency = new GetCurrency($payment->getCurrencyCode()));
            if (2 < $currency->exp) {
                throw new RuntimeException('Unexpected currency exp.');
            }
            $divisor = pow(10, 2 - $currency->exp);

            $model['currency_code'] = $currency->numeric;
            $model['amount'] = abs($payment->getTotalAmount() / $divisor);
        }

        if (false == $model['order_id']) {
            $model['order_id'] = $payment->getNumber();
        }

        if (false == $model['customer_id']) {
            $model['customer_id'] = $payment->getClientId();
        }
        if (false == $model['customer_email']) {
            $model['customer_email'] = $payment->getClientEmail();
        }

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

        /** @var PaymentInterface $payment */
        $payment = $request->getSource();

        $model = ArrayObject::ensureArrayObject($payment->getDetails());

        //$model['DESCRIPTION'] = $payment->getDescription();
        if (false == $model['amount']) {
            $this->gateway->execute($currency = new GetCurrency($payment->getCurrencyCode()));
            if (2 < $currency->exp) {
                throw new RuntimeException('Unexpected currency exp.');
            }
            $divisor = pow(10, 2 - $currency->exp);

            $model['currency_code'] = $currency->numeric;
            $model['amount'] = abs($payment->getTotalAmount() / $divisor);
        }

        if (false == $model['order_id']) {
            $model['order_id'] = $payment->getNumber();
        }

        if (false == $model['customer_id']) {
            $model['customer_id'] = $payment->getClientId();
        }
        if (false == $model['customer_email']) {
            $model['customer_email'] = $payment->getClientEmail();
        }

        $request->setResult((array) $model);
    }
{@inheritDoc}

@param Convert $request