Skip to content

Commit 871a812

Browse files
committed
MC-18194: Saved Credit Card Feature with Vault is not displaying proper information of card in order information page
1 parent 8ba8ef1 commit 871a812

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

app/code/Magento/Vault/Model/Method/Vault.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -544,8 +544,10 @@ private function attachCreditCardInfo(OrderPaymentInterface $payment): void
544544
{
545545
$paymentToken = $payment->getExtensionAttributes()
546546
->getVaultPaymentToken();
547-
$tokenDetails = $this->jsonSerializer->unserialize($paymentToken->getTokenDetails());
548-
$payment->addData($tokenDetails);
547+
if ($paymentToken) {
548+
$tokenDetails = $this->jsonSerializer->unserialize($paymentToken->getTokenDetails());
549+
$payment->addData($tokenDetails);
550+
}
549551
}
550552

551553
/**

0 commit comments

Comments
 (0)