mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 18:34:30 -04:00
Fixes for CVV issues on Authorize & Forte (#84)
* fixes for forte * fixes for authorize
This commit is contained in:
parent
0e8da70f77
commit
f6333fcae0
@ -7,9 +7,6 @@
|
|||||||
|
|
||||||
<script src="https://code.jquery.com/jquery-1.11.3.min.js"></script>
|
<script src="https://code.jquery.com/jquery-1.11.3.min.js"></script>
|
||||||
<meta name="authnet-require-cvv" content="{{ $gateway->company_gateway->require_cvv }}">
|
<meta name="authnet-require-cvv" content="{{ $gateway->company_gateway->require_cvv }}">
|
||||||
|
|
||||||
<script src="{{ asset('build/public/js/card-js.min.js/card-js.min.js') }}"></script>
|
|
||||||
<link href="{{ asset('build/public/css/card-js.min.css/card-js.min.css') }}" rel="stylesheet" type="text/css">
|
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@section('gateway_content')
|
@section('gateway_content')
|
||||||
@ -77,20 +74,11 @@
|
|||||||
|
|
||||||
@push('footer')
|
@push('footer')
|
||||||
<script defer>
|
<script defer>
|
||||||
|
document.querySelector('#date').addEventListener('change', (e) => {
|
||||||
|
const [month, year] = e.target.value.replace(/\s/g, '').split('/');
|
||||||
|
|
||||||
$(function() {
|
document.getElementsByName('expiry-month')[0].value = month;
|
||||||
|
document.getElementsByName('expiry-year')[0].value = `20${year}`;
|
||||||
document.getElementsByClassName("expiry")[0].addEventListener('change', function() {
|
|
||||||
|
|
||||||
str = document.getElementsByClassName("expiry")[0].value.replace(/\s/g, '');
|
|
||||||
const expiryArray = str.split("/");
|
|
||||||
|
|
||||||
document.getElementsByName('expiry-month')[0].value = expiryArray[0];
|
|
||||||
document.getElementsByName('expiry-year')[0].value = expiryArray[1];
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
@endpush
|
@endpush
|
@ -3,11 +3,14 @@
|
|||||||
<div class="card-js" id="my-card" data-capture-name="true">
|
<div class="card-js" id="my-card" data-capture-name="true">
|
||||||
<input class="input w-full" id="cardholder_name" name="card_holders_name"
|
<input class="input w-full" id="cardholder_name" name="card_holders_name"
|
||||||
placeholder="{{ ctrans('texts.name')}}">
|
placeholder="{{ ctrans('texts.name')}}">
|
||||||
<input type="text" class="input w-full" id="number" placeholder="0000 0000 0000 0000">
|
<input type="text" class="input w-full" id="number" placeholder="0000 0000 0000 0000" name="card_number" />
|
||||||
<div class="flex items-center gap-2">
|
<div class="flex items-center gap-2">
|
||||||
<input type="text" class="input w-1/2" id="date" placeholder="MM/YY">
|
<input type="text" class="input w-1/2" id="date" placeholder="MM/YY">
|
||||||
<input type="text" class="input w-1/2" id="cvv" placeholder="000">
|
<input type="text" class="input w-1/2" id="cvv" placeholder="000">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<input type="hidden" class="expiry-month" name="expiry-month" id="expiration_month" autocomplete="cc-exp-month" x-autocompletetype="cc-exp-month">
|
||||||
|
<input type="hidden" class="expiry-year" name="expiry-year" id="expiration_year" autocomplete="cc-exp-year" x-autocompletetype="cc-exp-year">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="errors"></div>
|
<div id="errors"></div>
|
||||||
|
@ -5,9 +5,6 @@
|
|||||||
<meta name="instant-payment" content="yes" />
|
<meta name="instant-payment" content="yes" />
|
||||||
|
|
||||||
<script src="https://code.jquery.com/jquery-1.11.3.min.js"></script>
|
<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>
|
|
||||||
|
|
||||||
<link href="{{ asset('css/card-js.min.css') }}" rel="stylesheet" type="text/css">
|
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@section('gateway_content')
|
@section('gateway_content')
|
||||||
@ -86,20 +83,11 @@
|
|||||||
|
|
||||||
@push('footer')
|
@push('footer')
|
||||||
<script defer>
|
<script defer>
|
||||||
|
document.querySelector('#date').addEventListener('change', (e) => {
|
||||||
|
const [month, year] = e.target.value.replace(/\s/g, '').split('/');
|
||||||
|
|
||||||
$(function() {
|
document.getElementsByName('expiry-month')[0].value = month;
|
||||||
|
document.getElementsByName('expiry-year')[0].value = `20${year}`;
|
||||||
document.getElementsByClassName("expiry")[0].addEventListener('change', function() {
|
|
||||||
|
|
||||||
str = document.getElementsByClassName("expiry")[0].value.replace(/\s/g, '');
|
|
||||||
const expiryArray = str.split("/");
|
|
||||||
|
|
||||||
document.getElementsByName('expiry-month')[0].value = expiryArray[0];
|
|
||||||
document.getElementsByName('expiry-year')[0].value = expiryArray[1];
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
@endpush
|
@endpush
|
@ -3,11 +3,14 @@
|
|||||||
<div class="card-js" id="my-card" data-capture-name="true">
|
<div class="card-js" id="my-card" data-capture-name="true">
|
||||||
<input class="input w-full" id="cardholder_name" name="card_holders_name"
|
<input class="input w-full" id="cardholder_name" name="card_holders_name"
|
||||||
placeholder="{{ ctrans('texts.name')}}">
|
placeholder="{{ ctrans('texts.name')}}">
|
||||||
<input type="text" class="input w-full" id="number" placeholder="0000 0000 0000 0000">
|
<input type="text" class="input w-full" id="number" placeholder="0000 0000 0000 0000" name="card-number" />
|
||||||
<div class="flex items-center gap-2">
|
<div class="flex items-center gap-2">
|
||||||
<input type="text" class="input w-1/2" id="date" placeholder="MM/YY">
|
<input type="text" class="input w-1/2" id="date" placeholder="MM/YY">
|
||||||
<input type="text" class="input w-1/2" id="cvv" placeholder="000">
|
<input type="text" class="input w-1/2" id="cvv" placeholder="000">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<input type="hidden" class="expiry-month" name="expiry-month" id="expiration_month" autocomplete="cc-exp-month" x-autocompletetype="cc-exp-month">
|
||||||
|
<input type="hidden" class="expiry-year" name="expiry-year" id="expiration_year" autocomplete="cc-exp-year" x-autocompletetype="cc-exp-year">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="errors"></div>
|
<div id="errors"></div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user