mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-31 22:04:35 -04:00
Add reference to checkout gateways
This commit is contained in:
parent
0c015cb4bc
commit
100ca67c5f
@ -155,6 +155,7 @@ class CheckoutComPaymentDriver extends BaseDriver
|
|||||||
'raw_value' => $request->raw_value,
|
'raw_value' => $request->raw_value,
|
||||||
'currency' => $request->currency,
|
'currency' => $request->currency,
|
||||||
'payment_hash' =>$request->payment_hash,
|
'payment_hash' =>$request->payment_hash,
|
||||||
|
'reference' => $request->payment_hash,
|
||||||
];
|
];
|
||||||
|
|
||||||
$state = array_merge($state, $request->all());
|
$state = array_merge($state, $request->all());
|
||||||
@ -164,10 +165,12 @@ class CheckoutComPaymentDriver extends BaseDriver
|
|||||||
$method = new IdSource($state['token']);
|
$method = new IdSource($state['token']);
|
||||||
$payment = new CheckoutPayment($method, $state['currency']);
|
$payment = new CheckoutPayment($method, $state['currency']);
|
||||||
$payment->amount = $state['value'];
|
$payment->amount = $state['value'];
|
||||||
|
$payment->reference = $state['reference'];
|
||||||
} else {
|
} else {
|
||||||
$method = new TokenSource($state['server_response']->cardToken);
|
$method = new TokenSource($state['server_response']->cardToken);
|
||||||
$payment = new CheckoutPayment($method, $state['currency']);
|
$payment = new CheckoutPayment($method, $state['currency']);
|
||||||
$payment->amount = $state['value'];
|
$payment->amount = $state['value'];
|
||||||
|
$payment->reference = $state['reference'];
|
||||||
|
|
||||||
if ($this->client->currency()->code === 'EUR') {
|
if ($this->client->currency()->code === 'EUR') {
|
||||||
$payment->{'3ds'} = ['enabled' => true];
|
$payment->{'3ds'} = ['enabled' => true];
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
<meta name="customer-email" content="{{ $customer_email }}">
|
<meta name="customer-email" content="{{ $customer_email }}">
|
||||||
<meta name="value" content="{{ $value }}">
|
<meta name="value" content="{{ $value }}">
|
||||||
<meta name="currency" content="{{ $currency }}">
|
<meta name="currency" content="{{ $currency }}">
|
||||||
|
<meta name="reference" content="{{ $payment_hash }}">
|
||||||
|
|
||||||
<script src="{{ asset('js/clients/payments/checkout.com.js') }}"></script>
|
<script src="{{ asset('js/clients/payments/checkout.com.js') }}"></script>
|
||||||
@endpush
|
@endpush
|
||||||
@ -15,6 +16,7 @@
|
|||||||
@csrf
|
@csrf
|
||||||
<input type="hidden" name="gateway_response">
|
<input type="hidden" name="gateway_response">
|
||||||
<input type="hidden" name="store_card">
|
<input type="hidden" name="store_card">
|
||||||
|
<input type="hidden" name="reference" value="{{ $payment_hash }}">
|
||||||
<input type="hidden" name="payment_hash" value="{{ $payment_hash }}">
|
<input type="hidden" name="payment_hash" value="{{ $payment_hash }}">
|
||||||
<input type="hidden" name="company_gateway_id" value="{{ $company_gateway->id }}">
|
<input type="hidden" name="company_gateway_id" value="{{ $company_gateway->id }}">
|
||||||
<input type="hidden" name="payment_method_id" value="{{ $payment_method_id }}">
|
<input type="hidden" name="payment_method_id" value="{{ $payment_method_id }}">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user