Skip to content

Commit

Permalink
further typecast stored payment method objects
Browse files Browse the repository at this point in the history
  • Loading branch information
sushmita committed Dec 28, 2023
1 parent 46930ab commit 536ebe9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Subscriber/PaymentSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -365,10 +365,10 @@ public function onCheckoutConfirmLoaded(PageLoadedEvent $event)

$page->setPaymentMethods($filteredPaymentMethods);

$smethods = $paymentMethodsResponse->getStoredPaymentMethods();
if (!empty($smethods)){
foreach($smethods as $storedMethod){
$storedPaymentMethods[] = $storedMethod->jsonSerialize();
$storedMethods = $paymentMethodsResponse->getStoredPaymentMethods();
if (!empty($storedMethods)){
foreach($storedMethods as $paymentMethod){
$storedPaymentMethods[] = (array) $paymentMethod->jsonSerialize();
}
}

Expand Down

0 comments on commit 536ebe9

Please sign in to comment.