From c031d2d48f55b30ae4bd58f10117754d40199cf6 Mon Sep 17 00:00:00 2001 From: Andy E Phipps Date: Tue, 12 Jul 2022 15:42:39 +0100 Subject: [PATCH 1/4] Troubleshooting --- src/utils/Membership.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/utils/Membership.js b/src/utils/Membership.js index 19d18f065..227aa5a22 100644 --- a/src/utils/Membership.js +++ b/src/utils/Membership.js @@ -1,3 +1,5 @@ +/* eslint-disable no-unused-vars */ +/* eslint-disable max-len */ // this function prevent keyboard characters like e, + , - to be passed on the input const onKeyPress = event => { const keyCode = event.keyCode || event.which; @@ -56,7 +58,11 @@ const handleDonateSubmission = ( } const givingTypeUrl = givingType === 'single' ? 'single' : 'monthly'; - window.location.href = `${donateLink}?clientOverride=${clientID}&amount=${amount}¤cy=GBP&givingType=${givingTypeUrl}&cartId=${cartID}&affiliate=${affiliateValue}&siteurl=${currentpageUrl}&rowID=${mbshipID}`; + console.log('UPDATE 3'); + + // window.location.href = `${donateLink}?clientOverride=${clientID}&amount=${amount}¤cy=GBP&givingType=${givingTypeUrl}&cartId=${cartID}&affiliate=${affiliateValue}&siteurl=${currentpageUrl}&rowID=${mbshipID}`; + + window.location.href = `${donateLink}`; }; export { From 8e627984c0fce0dbb33605f8bd78b46dab7723df Mon Sep 17 00:00:00 2001 From: Andy E Phipps Date: Tue, 12 Jul 2022 17:10:40 +0100 Subject: [PATCH 2/4] Troubleshoot 2 --- src/utils/Membership.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utils/Membership.js b/src/utils/Membership.js index 227aa5a22..12e4b2bae 100644 --- a/src/utils/Membership.js +++ b/src/utils/Membership.js @@ -58,11 +58,11 @@ const handleDonateSubmission = ( } const givingTypeUrl = givingType === 'single' ? 'single' : 'monthly'; - console.log('UPDATE 3'); + console.log('UPDATE 5'); - // window.location.href = `${donateLink}?clientOverride=${clientID}&amount=${amount}¤cy=GBP&givingType=${givingTypeUrl}&cartId=${cartID}&affiliate=${affiliateValue}&siteurl=${currentpageUrl}&rowID=${mbshipID}`; + const forwardingURL = `${donateLink}?clientOverride=${clientID}&amount=${amount}¤cy=GBP&givingType=${givingTypeUrl}&cartId=${cartID}&affiliate=${affiliateValue}&siteurl=${currentpageUrl}&rowID=${mbshipID}`; - window.location.href = `${donateLink}`; + window.location.replace(forwardingURL); }; export { From 3f2e3239111b4ff04b155a5425f3cc766eea47c9 Mon Sep 17 00:00:00 2001 From: Andy E Phipps Date: Wed, 20 Jul 2022 18:50:34 +0100 Subject: [PATCH 3/4] More debug --- src/utils/Membership.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/Membership.js b/src/utils/Membership.js index 12e4b2bae..1210fbe35 100644 --- a/src/utils/Membership.js +++ b/src/utils/Membership.js @@ -58,7 +58,7 @@ const handleDonateSubmission = ( } const givingTypeUrl = givingType === 'single' ? 'single' : 'monthly'; - console.log('UPDATE 5'); + console.log('UPDATE 6', currentpageUrl, 'affiliateValue', affiliateValue); const forwardingURL = `${donateLink}?clientOverride=${clientID}&amount=${amount}¤cy=GBP&givingType=${givingTypeUrl}&cartId=${cartID}&affiliate=${affiliateValue}&siteurl=${currentpageUrl}&rowID=${mbshipID}`; From 5875cc21438e7da8f3adfe270ce58a0128daaa44 Mon Sep 17 00:00:00 2001 From: Andy E Phipps Date: Wed, 20 Jul 2022 19:03:16 +0100 Subject: [PATCH 4/4] Deggo --- src/utils/Membership.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/utils/Membership.js b/src/utils/Membership.js index 1210fbe35..cfa22682b 100644 --- a/src/utils/Membership.js +++ b/src/utils/Membership.js @@ -58,10 +58,11 @@ const handleDonateSubmission = ( } const givingTypeUrl = givingType === 'single' ? 'single' : 'monthly'; - console.log('UPDATE 6', currentpageUrl, 'affiliateValue', affiliateValue); const forwardingURL = `${donateLink}?clientOverride=${clientID}&amount=${amount}¤cy=GBP&givingType=${givingTypeUrl}&cartId=${cartID}&affiliate=${affiliateValue}&siteurl=${currentpageUrl}&rowID=${mbshipID}`; + console.log('UPDATE 7', currentpageUrl, 'affiliateValue', affiliateValue, 'forwardingURL', forwardingURL); + window.location.replace(forwardingURL); };