Skip to content

Commit f77ce35

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

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*/
66
namespace Magento\Vault\Model\Method;
77

8+
use Exception;
89
use Magento\Framework\Event\ManagerInterface;
910
use Magento\Framework\ObjectManagerInterface;
1011
use Magento\Payment\Gateway\Command;
@@ -546,7 +547,9 @@ private function attachCreditCardInfo(OrderPaymentInterface $payment): void
546547
->getVaultPaymentToken();
547548
if ($paymentToken) {
548549
$tokenDetails = $this->jsonSerializer->unserialize($paymentToken->getTokenDetails());
549-
$payment->addData($tokenDetails);
550+
if ($tokenDetails && is_array($tokenDetails)) {
551+
$payment->addData($tokenDetails);
552+
}
550553
}
551554
}
552555

0 commit comments

Comments
 (0)