From 12dad5f1f88f910d88a07a13a71eec750b72c827 Mon Sep 17 00:00:00 2001 From: Mario Lorenz Date: Tue, 5 Sep 2023 14:07:46 +0200 Subject: [PATCH] prevent double submit by disable submit-button during submit --- views/frontend/tpl/order/unzer_card.tpl | 1 + views/frontend/tpl/order/unzer_eps_charge.tpl | 1 + views/frontend/tpl/order/unzer_installment.tpl | 1 + views/frontend/tpl/order/unzer_invoice.tpl | 1 + views/frontend/tpl/order/unzer_sepa.tpl | 1 + views/frontend/tpl/order/unzer_sepa_secured.tpl | 1 + 6 files changed, 6 insertions(+) diff --git a/views/frontend/tpl/order/unzer_card.tpl b/views/frontend/tpl/order/unzer_card.tpl index 46d218f0..3c115119 100644 --- a/views/frontend/tpl/order/unzer_card.tpl +++ b/views/frontend/tpl/order/unzer_card.tpl @@ -29,6 +29,7 @@ event.preventDefault(); $( "#payment-form-card" ).submit(); } + $( '#orderConfirmAgbBottom .submitButton' ).prop('disabled', true); }); // Create an Unzer instance with your public key diff --git a/views/frontend/tpl/order/unzer_eps_charge.tpl b/views/frontend/tpl/order/unzer_eps_charge.tpl index 68d6afa6..6583988c 100644 --- a/views/frontend/tpl/order/unzer_eps_charge.tpl +++ b/views/frontend/tpl/order/unzer_eps_charge.tpl @@ -12,6 +12,7 @@ event.preventDefault(); $( '#payment-form' ).submit(); } + $( '#orderConfirmAgbBottom .submitButton' ).prop('disabled', true); }); // Create an Unzer instance with your public key diff --git a/views/frontend/tpl/order/unzer_installment.tpl b/views/frontend/tpl/order/unzer_installment.tpl index 22cd3f89..2dec04cb 100644 --- a/views/frontend/tpl/order/unzer_installment.tpl +++ b/views/frontend/tpl/order/unzer_installment.tpl @@ -96,6 +96,7 @@ event.preventDefault(); $( '#payment-form-installment' ).submit(); } + $( '#orderConfirmAgbBottom .submitButton' ).prop('disabled', true); }); // Handling payment form submission diff --git a/views/frontend/tpl/order/unzer_invoice.tpl b/views/frontend/tpl/order/unzer_invoice.tpl index 24c71b08..348b3ab4 100644 --- a/views/frontend/tpl/order/unzer_invoice.tpl +++ b/views/frontend/tpl/order/unzer_invoice.tpl @@ -212,6 +212,7 @@ event.preventDefault(); $("#payment-form").submit(); } + $( '#orderConfirmAgbBottom .submitButton' ).prop('disabled', true); }); [{/capture}] diff --git a/views/frontend/tpl/order/unzer_sepa.tpl b/views/frontend/tpl/order/unzer_sepa.tpl index 358f21d4..cf241d38 100644 --- a/views/frontend/tpl/order/unzer_sepa.tpl +++ b/views/frontend/tpl/order/unzer_sepa.tpl @@ -28,6 +28,7 @@ event.preventDefault(); $( "#payment-form-sepa" ).submit(); } + $( '#orderConfirmAgbBottom .submitButton' ).prop('disabled', true); }); // Create an Unzer instance with your public key diff --git a/views/frontend/tpl/order/unzer_sepa_secured.tpl b/views/frontend/tpl/order/unzer_sepa_secured.tpl index 9ec54caa..c9effd38 100644 --- a/views/frontend/tpl/order/unzer_sepa_secured.tpl +++ b/views/frontend/tpl/order/unzer_sepa_secured.tpl @@ -131,6 +131,7 @@ event.preventDefault(); $( "#payment-form-sepa-secured" ).submit(); } + $( '#orderConfirmAgbBottom .submitButton' ).prop('disabled', true); }); [{/capture}] [{oxscript add=$unzerSepaDirectSecurredJS}] \ No newline at end of file