From afd004f37505a3df04cdbb0dec82e20ea09d7883 Mon Sep 17 00:00:00 2001 From: Antoine Bagnaud Date: Mon, 14 Oct 2024 11:20:19 +0200 Subject: [PATCH] fix: Edenred null safety check --- src/Edenred/Client.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Edenred/Client.php b/src/Edenred/Client.php index e4a1c2edec..d6581e8caa 100644 --- a/src/Edenred/Client.php +++ b/src/Edenred/Client.php @@ -278,6 +278,10 @@ public function refund(PaymentInterface $payment, $amount = null) public function hasValidCredentials(Customer $customer): bool { + if (is_null($customer->getEdenredCredentials())) { + return false; + } + try { $this->authentication->userInfo($customer);