mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 05:02:36 +01:00
Update pay.blade.php
don't use token id integer on front end Signed-off-by: Kendall Arneaud <kendall.arneaud@gmail.com>
This commit is contained in:
parent
1196181a06
commit
8e1706cd7b
@ -23,7 +23,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="radio" data-token="{{ $token->token }}" data-token_id="{{ $token->id }}" name="payment-type"
|
<input type="radio" data-token="{{ $token->token }}" name="payment-type"
|
||||||
class="form-radio cursor-pointer toggle-payment-with-token" />
|
class="form-radio cursor-pointer toggle-payment-with-token" />
|
||||||
<span class="ml-1 cursor-pointer">
|
<span class="ml-1 cursor-pointer">
|
||||||
{{ App\Models\GatewayType::getAlias($token->gateway_type_id) }} ({{ $token->meta->brand }})
|
{{ App\Models\GatewayType::getAlias($token->gateway_type_id) }} ({{ $token->meta->brand }})
|
||||||
@ -81,11 +81,10 @@
|
|||||||
.from(document.getElementsByClassName('toggle-payment-with-token'))
|
.from(document.getElementsByClassName('toggle-payment-with-token'))
|
||||||
.forEach((element) => element.addEventListener('click', (element) => {
|
.forEach((element) => element.addEventListener('click', (element) => {
|
||||||
document.querySelector('input[name=source]').value = element.target.dataset.token;
|
document.querySelector('input[name=source]').value = element.target.dataset.token;
|
||||||
document.querySelector('input[name=token_id]').value = element.target.dataset.token_id;
|
|
||||||
}));
|
}));
|
||||||
|
|
||||||
document.getElementById('pay-now').addEventListener('click', function() {
|
document.getElementById('pay-now').addEventListener('click', function() {
|
||||||
document.getElementById('server-response').submit();
|
document.getElementById('server-response').submit();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
@endpush
|
@endpush
|
||||||
|
Loading…
Reference in New Issue
Block a user