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

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

        $details = ArrayObject::ensureArrayObject($payment->getDetails());
        $details["amount"] = $payment->getTotalAmount();
        $details["currency"] = $payment->getCurrencyCode();
        $details["description"] = $payment->getDescription();

        if ($card = $payment->getCreditCard()) {
            if ($card->getToken()) {
                $details["customer"] = $card->getToken();
            } else {
                $details["card"] = SensitiveValue::ensureSensitive([
                    'number' => $card->getNumber(),
                    'exp_month' => $card->getExpireAt()->format('m'),
                    'exp_year' => $card->getExpireAt()->format('Y'),
                    'cvc' => $card->getSecurityCode(),
                ]);
            }
        }

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

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

        $details = ArrayObject::ensureArrayObject($payment->getDetails());
        $details["amount"] = $payment->getTotalAmount();
        $details["currency"] = $payment->getCurrencyCode();
        $details["description"] = $payment->getDescription();

        if ($card = $payment->getCreditCard()) {
            if ($card->getToken()) {
                $details["customer"] = $card->getToken();
            } else {
                $details["card"] = SensitiveValue::ensureSensitive([
                    'number' => $card->getNumber(),
                    'exp_month' => $card->getExpireAt()->format('m'),
                    'exp_year' => $card->getExpireAt()->format('Y'),
                    'cvc' => $card->getSecurityCode(),
                ]);
            }
        }

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

@param Convert $request