Skip to content

Commit 4e80610

Browse files
committed
Fix an error with some Payment field providers when resubmitting the form after payment
1 parent 15ea25f commit 4e80610

File tree

5 files changed

+10
-5
lines changed

5 files changed

+10
-5
lines changed

src/web/assets/frontend/dist/js/payments/opayo.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/web/assets/frontend/dist/js/payments/paypal.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/web/assets/frontend/dist/js/payments/payway.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/web/assets/frontend/dist/js/payments/stripe.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/web/assets/frontend/src/js/payments/payment-provider.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,12 @@ export class FormiePaymentProvider {
255255

256256
// Resubmit the form, but skip payment handling, as we're done.
257257
// This ensures captchas and other validation runs again in case something changed.
258-
this.submitHandler.processSubmit(['payment']);
258+
if (this.submitHandler) {
259+
this.submitHandler.processSubmit(['payment']);
260+
} else if (this.form) {
261+
// Just in case `submitHandler` is undefined here...
262+
this.form.processSubmit(['payment']);
263+
}
259264
}
260265
}
261266

0 commit comments

Comments
 (0)