Skip to content

Commit

Permalink
fix: Edenred null safety check
Browse files Browse the repository at this point in the history
  • Loading branch information
r0xsh committed Oct 14, 2024
1 parent 79a4032 commit afd004f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Edenred/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit afd004f

Please sign in to comment.