Skip to content

Commit af5db93

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

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

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

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -543,13 +543,16 @@ private function getPaymentExtensionAttributes(OrderPaymentInterface $payment)
543543
*/
544544
private function attachCreditCardInfo(OrderPaymentInterface $payment): void
545545
{
546-
$paymentToken = $payment->getExtensionAttributes()
547-
->getVaultPaymentToken();
548-
if ($paymentToken) {
549-
$tokenDetails = $this->jsonSerializer->unserialize($paymentToken->getTokenDetails());
550-
if ($tokenDetails && is_array($tokenDetails)) {
551-
$payment->addData($tokenDetails);
546+
try {
547+
$paymentToken = $payment->getExtensionAttributes()
548+
->getVaultPaymentToken();
549+
if ($paymentToken) {
550+
$tokenDetails = $this->jsonSerializer->unserialize($paymentToken->getTokenDetails());
551+
if ($tokenDetails && is_array($tokenDetails)) {
552+
$payment->addData($tokenDetails);
553+
}
552554
}
555+
} catch (Exception $e) {
553556
}
554557
}
555558

0 commit comments

Comments
 (0)