diff --git a/src/Service/PaymentMethodsFilterService.php b/src/Service/PaymentMethodsFilterService.php index 561f1587..46f44016 100644 --- a/src/Service/PaymentMethodsFilterService.php +++ b/src/Service/PaymentMethodsFilterService.php @@ -211,7 +211,7 @@ public function getAvailableGiftcards( public function filterAdyenPaymentMethodsByType(array $paymentMethodsResponse, string $type): array { - return array_filter($paymentMethodsResponse['paymentMethods'], function ($item) use ($type) { + return array_filter($paymentMethodsResponse['paymentMethods'] ?? [], function ($item) use ($type) { return $item['type'] === $type; }); }