From b7d759b7961e7efc5f5bbe8d1ee3a7f6277be005 Mon Sep 17 00:00:00 2001 From: Jen Lampton Date: Wed, 24 Apr 2019 22:18:10 -0700 Subject: [PATCH] Move the delay to the submission to authnet, not for the webform. duh. --- js/authorizenetwebform.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/js/authorizenetwebform.js b/js/authorizenetwebform.js index 662cf86..5d32431 100644 --- a/js/authorizenetwebform.js +++ b/js/authorizenetwebform.js @@ -42,7 +42,11 @@ secureData.authData = authData; - Accept.dispatchData(secureData, 'responseHandler'); + // @todo remove this stupid delay when AuthNet gets their act together. + // https://community.developer.authorize.net/t5/Integration-and-Testing/E00114-Invalid-OTS-Token/td-p/58879/page/2 + setTimeout(function() { + Accept.dispatchData(secureData, 'responseHandler'); + }, Drupal.settings.authorizeNetWebform.delay); // Prevent the webform from submitting now. @see last line. e.preventDefault(); @@ -126,12 +130,8 @@ } } - // @todo remove this stupid delay when AuthNet gets their act together. - // https://community.developer.authorize.net/t5/Integration-and-Testing/E00114-Invalid-OTS-Token/td-p/58879/page/2 - setTimeout(function() { - // Submit the webform when done. - $(context).find("[data-authnet-form]").submit(); - }, Drupal.settings.authorizeNetWebform.delay); + // Submit the webform when done. + $(context).find("[data-authnet-form]").submit(); } }); -- GitLab