Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .env.development
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@ REACT_APP_DOPPLER_MY_LANDINGS_URL=https://landingsqa.fromdoppler.net/choose-a-te
REACT_APP_DOPPLER_CAN_BUY_CHAT_PLAN=true
REACT_APP_DOPPLER_CONVERSATIONS_URL=https://conversationsqa.fromdoppler.net
REACT_APP_USERPILOT_TOKEN=STG-NX-d04cfcac
REACT_APP_DOPPLER_CAN_BUY_ONSITE_PLAN=true
REACT_APP_DOPPLER_CAN_BUY_ONSITE_PLAN=true
REACT_APP_DOPPLER_VALIDATE_CAPTCHA=false
3 changes: 2 additions & 1 deletion .env.int
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,5 @@ REACT_APP_DOPPLER_MY_LANDINGS_URL=https://landingsqa.fromdoppler.net/choose-a-te
REACT_APP_DOPPLER_CAN_BUY_CHAT_PLAN=true
REACT_APP_DOPPLER_CONVERSATIONS_URL=https://conversationsqa.fromdoppler.net
REACT_APP_USERPILOT_TOKEN=STG-NX-d04cfcac
REACT_APP_DOPPLER_CAN_BUY_ONSITE_PLAN=true
REACT_APP_DOPPLER_CAN_BUY_ONSITE_PLAN=true
REACT_APP_DOPPLER_VALIDATE_CAPTCHA=false
3 changes: 2 additions & 1 deletion .env.production
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,5 @@ REACT_APP_DOPPLER_MY_LANDINGS_URL=https://landings.fromdoppler.com/choose-a-temp
REACT_APP_DOPPLER_CAN_BUY_CHAT_PLAN=true
REACT_APP_DOPPLER_CONVERSATIONS_URL=https://conversations.fromdoppler.com
REACT_APP_USERPILOT_TOKEN=NX-d04cfcac
REACT_APP_DOPPLER_CAN_BUY_ONSITE_PLAN=false
REACT_APP_DOPPLER_CAN_BUY_ONSITE_PLAN=false
REACT_APP_DOPPLER_VALIDATE_CAPTCHA=true
3 changes: 2 additions & 1 deletion .env.qa
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,5 @@ REACT_APP_DOPPLER_MY_LANDINGS_URL=https://landingsqa.fromdoppler.net/choose-a-te
REACT_APP_DOPPLER_CAN_BUY_CHAT_PLAN=true
REACT_APP_DOPPLER_CONVERSATIONS_URL=https://conversationsqa.fromdoppler.net
REACT_APP_USERPILOT_TOKEN=STG-NX-d04cfcac
REACT_APP_DOPPLER_CAN_BUY_ONSITE_PLAN=true
REACT_APP_DOPPLER_CAN_BUY_ONSITE_PLAN=true
REACT_APP_DOPPLER_VALIDATE_CAPTCHA=false
13 changes: 12 additions & 1 deletion src/components/form-helpers/form-helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,18 @@ const _FormWithCaptcha = ({
// See more details in https://stackoverflow.com/questions/43488605/detect-when-challenge-window-is-closed-for-google-recaptcha
const captchaDelay = 100;
createTimeout(() => formikProps.setSubmitting(false), captchaDelay);
const result = await verifyCaptcha();

const validateCaptcha = process.env.REACT_APP_DOPPLER_VALIDATE_CAPTCHA ?? 'true';
let result = {};

if (validateCaptcha === 'true') {
result = await verifyCaptcha();
} else {
result = { success: true, captchaResponseToken: 'hardcodedResponseToken' };
}

//await verifyCaptcha(); //{ success: true, captchaResponseToken: 'aaa'}; //

createTimeout(() => formikProps.setSubmitting(true), captchaDelay);
if (result.success) {
await originalOnSubmit(
Expand Down