Bug fixed.

This commit is contained in:
Kishan Patel 2022-04-19 11:27:40 +05:30
parent b935b82a8b
commit 7be910ea69
3 changed files with 6 additions and 3 deletions

View File

@ -12,12 +12,13 @@
namespace App\PaymentDrivers\Forte; namespace App\PaymentDrivers\Forte;
use App\Models\Payment;
use App\Models\GatewayType; use App\Models\GatewayType;
use App\Models\PaymentType;
use App\Http\Requests\Request; use App\Http\Requests\Request;
use App\Utils\Traits\MakesHash; use App\Utils\Traits\MakesHash;
use Illuminate\Support\Facades\Validator; use Illuminate\Support\Facades\Validator;
use App\PaymentDrivers\FortePaymentDriver; use App\PaymentDrivers\FortePaymentDriver;
use App\Models\Payment;
class ACH class ACH
{ {
@ -229,7 +230,7 @@ class ACH
$data['gateway_type_id']=GatewayType::CREDIT_CARD; $data['gateway_type_id']=GatewayType::CREDIT_CARD;
$data['amount']=$request->system_amount_with_fee; $data['amount']=$request->system_amount_with_fee;
$data['payment_type']=GatewayType::CREDIT_CARD; $data['payment_type']=PaymentType::ACH;
$data['transaction_reference']=$response->transaction_id; $data['transaction_reference']=$response->transaction_id;
$payment=$this->forte->createPayment($data, Payment::STATUS_COMPLETED); $payment=$this->forte->createPayment($data, Payment::STATUS_COMPLETED);

View File

@ -14,6 +14,7 @@ namespace App\PaymentDrivers\Forte;
use App\Models\Payment; use App\Models\Payment;
use App\Models\GatewayType; use App\Models\GatewayType;
use App\Models\PaymentType;
use App\Utils\Traits\MakesHash; use App\Utils\Traits\MakesHash;
use Illuminate\Support\Facades\Session; use Illuminate\Support\Facades\Session;
use Illuminate\Support\Facades\Validator; use Illuminate\Support\Facades\Validator;
@ -231,7 +232,7 @@ class CreditCard
$data['gateway_type_id']=GatewayType::CREDIT_CARD; $data['gateway_type_id']=GatewayType::CREDIT_CARD;
$data['amount']=$request->system_amount_with_fee; $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; $data['transaction_reference']=$response->transaction_id;
$payment=$this->forte->createPayment($data, Payment::STATUS_COMPLETED); $payment=$this->forte->createPayment($data, Payment::STATUS_COMPLETED);

View File

@ -37,6 +37,7 @@
@if(count($tokens) > 0) @if(count($tokens) > 0)
@foreach($tokens as $token) @foreach($tokens as $token)
<label class="mr-4"> <label class="mr-4">
<input type="hidden" name="card_brand" value="{{optional($token->meta)->brand}}">
<input <input
type="radio" type="radio"
data-token="{{ $token->hashed_id }}" data-token="{{ $token->hashed_id }}"