From 82eb344558e980e3bbbee25e85277ece9c4bb1be Mon Sep 17 00:00:00 2001 From: David Bomba Date: Wed, 21 May 2025 09:15:09 +1000 Subject: [PATCH] Fixes for rotessa --- .../ViewComposers/Components/Rotessa/ContactComponent.php | 2 +- app/PaymentDrivers/RotessaPaymentDriver.php | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/Http/ViewComposers/Components/Rotessa/ContactComponent.php b/app/Http/ViewComposers/Components/Rotessa/ContactComponent.php index d04d22ebc7..19a1e0ee77 100644 --- a/app/Http/ViewComposers/Components/Rotessa/ContactComponent.php +++ b/app/Http/ViewComposers/Components/Rotessa/ContactComponent.php @@ -27,7 +27,7 @@ class ContactComponent extends Component $contact = collect($contact->client->contacts->firstWhere('is_primary', 1)->toArray())->merge([ 'home_phone' => $contact->client->phone, - 'custom_identifier' => $contact->client->client_hash, + 'custom_identifier' => $contact->client->number . 'X' . rand(1000, 9999), 'name' => $contact->client->name, 'id' => null, ])->all(); diff --git a/app/PaymentDrivers/RotessaPaymentDriver.php b/app/PaymentDrivers/RotessaPaymentDriver.php index 709a79a4e0..9a0fc8d93f 100644 --- a/app/PaymentDrivers/RotessaPaymentDriver.php +++ b/app/PaymentDrivers/RotessaPaymentDriver.php @@ -205,8 +205,11 @@ class RotessaPaymentDriver extends BaseDriver public function findOrCreateCustomer(array $data) { - + nlog($data); + $result = null; + + try { $existing = ClientGatewayToken::query()