From 7be910ea69d58b181cb446bd66d13aa55b822ce4 Mon Sep 17 00:00:00 2001 From: Kishan Patel Date: Tue, 19 Apr 2022 11:27:40 +0530 Subject: [PATCH] Bug fixed. --- app/PaymentDrivers/Forte/ACH.php | 5 +++-- app/PaymentDrivers/Forte/CreditCard.php | 3 ++- .../ninja2020/gateways/forte/credit_card/pay.blade.php | 1 + 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/app/PaymentDrivers/Forte/ACH.php b/app/PaymentDrivers/Forte/ACH.php index 6bd649545482..32db4db4cf2d 100644 --- a/app/PaymentDrivers/Forte/ACH.php +++ b/app/PaymentDrivers/Forte/ACH.php @@ -12,12 +12,13 @@ namespace App\PaymentDrivers\Forte; +use App\Models\Payment; use App\Models\GatewayType; +use App\Models\PaymentType; use App\Http\Requests\Request; use App\Utils\Traits\MakesHash; use Illuminate\Support\Facades\Validator; use App\PaymentDrivers\FortePaymentDriver; -use App\Models\Payment; class ACH { @@ -229,7 +230,7 @@ class ACH $data['gateway_type_id']=GatewayType::CREDIT_CARD; $data['amount']=$request->system_amount_with_fee; - $data['payment_type']=GatewayType::CREDIT_CARD; + $data['payment_type']=PaymentType::ACH; $data['transaction_reference']=$response->transaction_id; $payment=$this->forte->createPayment($data, Payment::STATUS_COMPLETED); diff --git a/app/PaymentDrivers/Forte/CreditCard.php b/app/PaymentDrivers/Forte/CreditCard.php index e1073456dc0a..7346754991b9 100644 --- a/app/PaymentDrivers/Forte/CreditCard.php +++ b/app/PaymentDrivers/Forte/CreditCard.php @@ -14,6 +14,7 @@ namespace App\PaymentDrivers\Forte; use App\Models\Payment; use App\Models\GatewayType; +use App\Models\PaymentType; use App\Utils\Traits\MakesHash; use Illuminate\Support\Facades\Session; use Illuminate\Support\Facades\Validator; @@ -231,7 +232,7 @@ class CreditCard $data['gateway_type_id']=GatewayType::CREDIT_CARD; $data['amount']=$request->system_amount_with_fee; - $data['payment_type']=GatewayType::CREDIT_CARD; + $data['payment_type']=PaymentType::parseCardType(strtolower($request->card_brand)) ?: PaymentType::CREDIT_CARD_OTHER; $data['transaction_reference']=$response->transaction_id; $payment=$this->forte->createPayment($data, Payment::STATUS_COMPLETED); diff --git a/resources/views/portal/ninja2020/gateways/forte/credit_card/pay.blade.php b/resources/views/portal/ninja2020/gateways/forte/credit_card/pay.blade.php index 4c39a1eacd9f..068e27a94295 100644 --- a/resources/views/portal/ninja2020/gateways/forte/credit_card/pay.blade.php +++ b/resources/views/portal/ninja2020/gateways/forte/credit_card/pay.blade.php @@ -37,6 +37,7 @@ @if(count($tokens) > 0) @foreach($tokens as $token)