Preselect the first token on WePay ACH payment page
This commit is contained in:
parent
fe5b5b7fcc
commit
5bf942a77e
1 changed files with 9 additions and 0 deletions
|
|
@ -53,5 +53,14 @@
|
|||
document.getElementById('pay-now').addEventListener('click', function () {
|
||||
document.getElementById('server-response').submit();
|
||||
});
|
||||
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
let firstAccount = document
|
||||
.querySelector('.toggle-payment-with-token')
|
||||
|
||||
firstAccount.checked = true;
|
||||
|
||||
document.querySelector('input[name=source]').value = firstAccount.dataset.token;
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue