diff --git a/assets/js/frontend/ajax-submission.js b/assets/js/frontend/ajax-submission.js index 94f886a55..670c45089 100644 --- a/assets/js/frontend/ajax-submission.js +++ b/assets/js/frontend/ajax-submission.js @@ -47,7 +47,7 @@ jQuery( function( $ ) { const authorizeNetAjaxSubmitHandlerPromise = new Promise(function (resolve, reject) { window.EverestFormsAuthorizeNet.authorizeNetAjaxSubmitHandler(v).then(resolve).catch(reject); }); - + try { const response = await authorizeNetAjaxSubmitHandlerPromise; @@ -60,7 +60,7 @@ jQuery( function( $ ) { } catch (error) { return; } - + } if (errors.length < 1) { @@ -95,7 +95,7 @@ jQuery( function( $ ) { }) .done( function ( xhr, textStatus, errorThrown ) { var redirect_url = ( xhr.data && xhr.data.redirect_url ) ? xhr.data.redirect_url : ''; - if ( redirect_url ) { + if ( redirect_url && 'stripe' !== formTuple.find( ".everest-forms-gateway[data-gateway='stripe']" ).data( 'gateway' )) { formTuple.trigger( 'reset' ); window.location = redirect_url; return;