1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-12 22:22:32 +01:00

Disable paynow button for ACH payments on submit

This commit is contained in:
David Bomba 2022-03-11 09:08:28 +11:00
parent ed2952356c
commit e294b7252c
2 changed files with 7 additions and 1 deletions

View File

@ -103,7 +103,7 @@ class Gateway extends StaticModel
case 20:
return [
GatewayType::CREDIT_CARD => ['refund' => true, 'token_billing' => true],
GatewayType::BANK_TRANSFER => ['refund' => true, 'token_billing' => true, 'webhooks' => ['source.chargeable','charge.succeeded']],
GatewayType::BANK_TRANSFER => ['refund' => true, 'token_billing' => true, 'webhooks' => ['source.chargeable','charge.succeeded','payment_intent.succeeded']],
GatewayType::ALIPAY => ['refund' => false, 'token_billing' => false],
GatewayType::APPLE_PAY => ['refund' => false, 'token_billing' => false],
GatewayType::SOFORT => ['refund' => true, 'token_billing' => true, 'webhooks' => ['source.chargeable', 'charge.succeeded']], //Stripe

View File

@ -52,6 +52,12 @@
}));
document.getElementById('pay-now').addEventListener('click', function () {
let payNowButton = document.getElementById('pay-now');
payNowButton.disabled = true;
payNowButton.querySelector('svg').classList.remove('hidden');
payNowButton.querySelector('span').classList.add('hidden');
document.getElementById('server-response').submit();
});
</script>