Skip to content

Commit

Permalink
Fix Gift cards still can be redeemed even though payment method is in…
Browse files Browse the repository at this point in the history
…active

CS-6530
  • Loading branch information
MarijaIv committed Feb 12, 2025
1 parent 09110ae commit 357d190
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Subscriber/PaymentSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ public function onShoppingCartLoaded(PageLoadedEvent $event)
));
$paymentMethod = $this->paymentMethodRepository->search($criteria, $salesChannelContext->getContext())->first();
$giftcards = [];
if ($paymentMethod && $paymentMethod->getActive()) {
if ($paymentMethod && $paymentMethod->getActive() && !empty($shopwarePaymentMethods->getElements()[$paymentMethodId])) {
$giftcards = $this->paymentMethodsFilterService->filterAdyenPaymentMethodsByType(
$paymentMethods->getPaymentMethods() ?? [],
'giftcard'
Expand Down

0 comments on commit 357d190

Please # to comment.