mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fixes for forte payment driver
This commit is contained in:
parent
8ace213c40
commit
db9ed2c8eb
@ -89,7 +89,7 @@ class ACH
|
||||
|
||||
public function paymentResponse($request)
|
||||
{
|
||||
$payment_hash = PaymentHash::whereRaw('BINARY `hash`= ?', [$request->input('payment_hash')])->firstOrFail();
|
||||
$payment_hash = PaymentHash::where('hash', $request->input('payment_hash'))->firstOrFail();
|
||||
|
||||
try {
|
||||
$curl = curl_init();
|
||||
|
@ -54,6 +54,7 @@ class CreditCard
|
||||
|
||||
public function authorizeView(array $data)
|
||||
{
|
||||
$data['gateway'] = $this->forte;
|
||||
return render('gateways.forte.credit_card.authorize', $data);
|
||||
}
|
||||
|
||||
@ -82,7 +83,7 @@ class CreditCard
|
||||
$this->forte->payment_hash->data = array_merge((array) $this->forte->payment_hash->data, $data);
|
||||
$this->forte->payment_hash->save();
|
||||
|
||||
$data['gateway'] = $this;
|
||||
$data['gateway'] = $this->forte;
|
||||
return render('gateways.forte.credit_card.pay', $data);
|
||||
}
|
||||
|
||||
|
@ -301,9 +301,9 @@ trait MakesInvoiceValues
|
||||
$data[$key][$table_type.'.description'] = Helpers::processReservedKeywords($item->notes, $entity);
|
||||
|
||||
$data[$key][$table_type.".{$_table_type}1"] = strlen($item->custom_value1) > 1 ? $helpers->formatCustomFieldValue($this->company->custom_fields, "{$_table_type}1", $item->custom_value1, $entity) : '';
|
||||
$data[$key][$table_type.".{$_table_type}2"] = strlen($item->custom_value1) > 2 ? $helpers->formatCustomFieldValue($this->company->custom_fields, "{$_table_type}2", $item->custom_value2, $entity) : '';
|
||||
$data[$key][$table_type.".{$_table_type}3"] = strlen($item->custom_value1) > 3 ? $helpers->formatCustomFieldValue($this->company->custom_fields, "{$_table_type}3", $item->custom_value3, $entity) : '';
|
||||
$data[$key][$table_type.".{$_table_type}4"] = strlen($item->custom_value1) > 4 ? $helpers->formatCustomFieldValue($this->company->custom_fields, "{$_table_type}4", $item->custom_value4, $entity) : '';
|
||||
$data[$key][$table_type.".{$_table_type}2"] = strlen($item->custom_value2) > 2 ? $helpers->formatCustomFieldValue($this->company->custom_fields, "{$_table_type}2", $item->custom_value2, $entity) : '';
|
||||
$data[$key][$table_type.".{$_table_type}3"] = strlen($item->custom_value3) > 3 ? $helpers->formatCustomFieldValue($this->company->custom_fields, "{$_table_type}3", $item->custom_value3, $entity) : '';
|
||||
$data[$key][$table_type.".{$_table_type}4"] = strlen($item->custom_value4) > 4 ? $helpers->formatCustomFieldValue($this->company->custom_fields, "{$_table_type}4", $item->custom_value4, $entity) : '';
|
||||
|
||||
if ($item->quantity > 0 || $item->cost > 0) {
|
||||
$data[$key][$table_type.'.quantity'] = Number::formatValueNoTrailingZeroes($item->quantity, $entity_currency);
|
||||
|
@ -1,14 +1,14 @@
|
||||
@extends('portal.ninja2020.layout.payments', ['gateway_title' => 'Bank Transfer', 'card_title' => 'Bank Transfer'])
|
||||
|
||||
@section('gateway_head')
|
||||
<meta name="forte-api-login-id" content="{{$gateway->forte->company_gateway->getConfigField("apiLoginId")}}">
|
||||
<meta name="forte-api-login-id" content="{{$gateway->company_gateway->getConfigField("apiLoginId")}}">
|
||||
@endsection
|
||||
|
||||
@section('gateway_content')
|
||||
<form action="{{ route('client.payments.response') }}" method="post" id="server_response">
|
||||
@csrf
|
||||
<input type="hidden" name="payment_hash" value="{{ $payment_hash }}">
|
||||
<input type="hidden" name="company_gateway_id" value="{{ $gateway->forte->company_gateway->id }}">
|
||||
<input type="hidden" name="company_gateway_id" value="{{ $gateway->company_gateway->id }}">
|
||||
<input type="hidden" name="payment_method_id" value="{{$payment_method_id}}">
|
||||
<input type="hidden" name="gateway_response" id="gateway_response">
|
||||
<input type="hidden" name="dataValue" id="dataValue"/>
|
||||
|
@ -1,7 +1,7 @@
|
||||
@extends('portal.ninja2020.layout.payments', ['gateway_title' => ctrans('texts.payment_type_credit_card'), 'card_title' => ctrans('texts.payment_type_credit_card')])
|
||||
|
||||
@section('gateway_head')
|
||||
<meta name="forte-api-login-id" content="{{$gateway->forte->company_gateway->getConfigField("apiLoginId")}}">
|
||||
<meta name="forte-api-login-id" content="{{$gateway->company_gateway->getConfigField("apiLoginId")}}">
|
||||
<script src="https://code.jquery.com/jquery-1.11.3.min.js"></script>
|
||||
<script src="{{ asset('js/clients/payments/forte-card-js.min.js') }}"></script>
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
<input type="hidden" name="card_brand" id="card_brand">
|
||||
<input type="hidden" name="payment_token" id="payment_token">
|
||||
<input type="hidden" name="payment_hash" value="{{ $payment_hash }}">
|
||||
<input type="hidden" name="company_gateway_id" value="{{ $gateway->forte->company_gateway->id }}">
|
||||
<input type="hidden" name="company_gateway_id" value="{{ $gateway->company_gateway->id }}">
|
||||
<input type="hidden" name="payment_method_id" value="{{$payment_method_id}}">
|
||||
<input type="hidden" name="gateway_response" id="gateway_response">
|
||||
<input type="hidden" name="dataValue" id="dataValue"/>
|
||||
@ -41,7 +41,7 @@
|
||||
@endsection
|
||||
|
||||
@section('gateway_footer')
|
||||
@if($gateway->forte->company_gateway->getConfigField('testMode'))
|
||||
@if($gateway->company_gateway->getConfigField('testMode'))
|
||||
<script type="text/javascript" src="https://sandbox.forte.net/api/js/v1"></script>
|
||||
@else
|
||||
<script type="text/javascript" src="https://api.forte.net/js/v1"></script>
|
||||
|
Loading…
x
Reference in New Issue
Block a user