From 08f9443c820e724995fceb5086fc10079eb6101e Mon Sep 17 00:00:00 2001 From: David Bomba Date: Mon, 5 Aug 2024 14:04:05 +1000 Subject: [PATCH] Static analysis --- app/PaymentDrivers/Rotessa/PaymentMethod.php | 2 +- app/PaymentDrivers/RotessaPaymentDriver.php | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/app/PaymentDrivers/Rotessa/PaymentMethod.php b/app/PaymentDrivers/Rotessa/PaymentMethod.php index 9ac26feae87d..3e617f76f963 100755 --- a/app/PaymentDrivers/Rotessa/PaymentMethod.php +++ b/app/PaymentDrivers/Rotessa/PaymentMethod.php @@ -163,7 +163,7 @@ class PaymentMethod implements MethodInterface return $this->processPendingPayment($response['id'], (float) $response['amount'], PaymentType::ACSS , $customer->token); } catch(\Throwable $e) { - $this->processUnsuccessfulPayment( new InvalidResponseException($e->getMessage(), (int) $e->getCode()) ); + $this->processUnsuccessfulPayment( new \Exception($e->getMessage(), (int) $e->getCode()) ); } } diff --git a/app/PaymentDrivers/RotessaPaymentDriver.php b/app/PaymentDrivers/RotessaPaymentDriver.php index 26df1ee36e7f..040a8c65e935 100644 --- a/app/PaymentDrivers/RotessaPaymentDriver.php +++ b/app/PaymentDrivers/RotessaPaymentDriver.php @@ -136,11 +136,9 @@ class RotessaPaymentDriver extends BaseDriver $result = $this->gatewayRequest("get","customers/{$contact->id}"); $result = $result->json(); - $this->client = Client::find($contact->client_id); + $this->client = Client::query()->find($contact->client_id); $customer = array_merge($result, ['id' => $contact->id, 'custom_identifier' => $contact->custom_identifier ]); - // $customer = (new Customer($result))->additional( ['id' => $contact->id, 'custom_identifier' => $contact->custom_identifier ]); //creates a new customer in rotessa - // $this->findOrCreateCustomer($customer->additional + $customer->jsonSerialize()); $this->findOrCreateCustomer($customer);