From 714be1835142472ed9e072dcd583d1f3ed99687a Mon Sep 17 00:00:00 2001 From: David Bomba Date: Fri, 1 Apr 2022 17:25:48 +1100 Subject: [PATCH] Fixes for eWay descriptions --- app/PaymentDrivers/Eway/CreditCard.php | 2 ++ app/PaymentDrivers/Eway/Token.php | 3 +-- database/seeders/PaymentLibrariesSeeder.php | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/PaymentDrivers/Eway/CreditCard.php b/app/PaymentDrivers/Eway/CreditCard.php index 98982d534661..e1bc090ba3f6 100644 --- a/app/PaymentDrivers/Eway/CreditCard.php +++ b/app/PaymentDrivers/Eway/CreditCard.php @@ -160,6 +160,7 @@ class CreditCard 'TotalAmount' => $this->convertAmountForEway(), 'CurrencyCode' => $this->eway_driver->client->currency()->code, 'InvoiceNumber' => $invoice_numbers, + 'InvoiceDescription' => substr($invoice_numbers, 0, 63) ], 'TransactionType' => \Eway\Rapid\Enum\TransactionType::PURCHASE, 'SecuredCardData' => $request->input('securefieldcode'), @@ -249,6 +250,7 @@ class CreditCard 'TotalAmount' => $this->convertAmountForEway($amount), 'CurrencyCode' => $this->eway_driver->client->currency()->code, 'InvoiceNumber' => $invoice_numbers, + 'InvoiceDescription' => substr($invoice_numbers, 0, 63) ], 'TransactionType' => \Eway\Rapid\Enum\TransactionType::RECURRING, ]; diff --git a/app/PaymentDrivers/Eway/Token.php b/app/PaymentDrivers/Eway/Token.php index 1d40f7cc01f0..1d5ea2422ba3 100644 --- a/app/PaymentDrivers/Eway/Token.php +++ b/app/PaymentDrivers/Eway/Token.php @@ -61,8 +61,7 @@ class Token 'TotalAmount' => $this->eway_driver->convertAmount($amount), 'CurrencyCode' => $this->eway_driver->client->currency()->code, 'InvoiceNumber' => $invoice_numbers, - 'InvoiceDescription' => $description, - 'InvoiceReference' => $description, + 'InvoiceDescription' => substr($description, 0,63), ], 'TransactionType' => \Eway\Rapid\Enum\TransactionType::RECURRING, ]; diff --git a/database/seeders/PaymentLibrariesSeeder.php b/database/seeders/PaymentLibrariesSeeder.php index fac849bf7398..e602fab0f08f 100644 --- a/database/seeders/PaymentLibrariesSeeder.php +++ b/database/seeders/PaymentLibrariesSeeder.php @@ -98,7 +98,7 @@ class PaymentLibrariesSeeder extends Seeder Gateway::query()->update(['visible' => 0]); - Gateway::whereIn('id', [1,7,11,15,20,39,46,55,50,57,52,58])->update(['visible' => 1]); + Gateway::whereIn('id', [1,3,7,11,15,20,39,46,55,50,57,52,58])->update(['visible' => 1]); if (Ninja::isHosted()) { Gateway::whereIn('id', [20])->update(['visible' => 0]);