Hi,
We’re looking at changing payment providers from ChargeBee over to Stripe. As a part of the swap over we need to change our sign up process, which I’ve begun on this page (https://npaq.redunion.com.au/join2-2)
Ideally, customers will fill in their details and based on which option they select for both Employment Status (employmentStatusMap) and Preferred Billing Schedule (billingScheduleMap) it will spit out the correct redirect for the member to pay.
For example, if you select Employment Status: Part Time and Billing: Annual it should redirect the user to upon form submission to: Stripe Checkout
I’ve tried to make this work with the code below, which I think is returning the URL successfully, but then isn’t redirecting properly:
const stripeRedirect = (employmentStatusMap && billingScheduleMap)
if (employmentStatusMap === “Part Time (<48hrs / fortnight)” && billingScheduleMap === “Annually”) {
return window.location = “Stripe Checkout”
} else {
return window.location = “https://www.redunion.com.au”
}
window.location = stripeRedirect;
For context, this is all nested under an onFormSubmit so I believe it should fire when the form is submitted. It might be a bit of an ask, but any guidance on the matter would be much appreciated! Javascript kind of breaks my brain a little bit still.