diff --git a/src/Components/SignupPage/SignupPage.js b/src/Components/SignupPage/SignupPage.js index 4994e51..5ed2a2b 100644 --- a/src/Components/SignupPage/SignupPage.js +++ b/src/Components/SignupPage/SignupPage.js @@ -91,7 +91,8 @@ const SignupPage = () => { [1, 2, 3, 4, 5, 6, 7, 8], [1, 2], ]; - const selectValues = selectedPlan === "partner" ? vals[1] : vals[0]; + + const selectValues = selectedPlan[0].value === "partner" ? vals[1] : vals[0]; const validateData = () => { const newData = getValidatedFormData(data, signupFields); const hasErrors = isFormDataHasErrors(newData); @@ -208,12 +209,15 @@ const SignupPage = () => { setShowAddAccount(!showAddAccount); }; - //STRIPE AUTH ********************************************************************** + //STRIPE PAYMRNT ********************************************************************** async function handleStripeAuthorization( user, paymentDataValues, customerDataValues ) { + const additionalAccounts = numberOfAccountsToAdd + ? numberOfAccountsToAdd + : 0; let error = false; let subscriptionId = null; let customerId = null; @@ -238,7 +242,8 @@ const SignupPage = () => { "Content-Type": "application/json", }, body: JSON.stringify({ - type: "monthly", + type: selectedPlan, + additionalAccounts: additionalAccounts, isAnnual: isAnnual, customerData: { email: customerDataValues.email, @@ -325,8 +330,8 @@ const SignupPage = () => { const showNoticeOnPage = "" !== notice && !showPaymentModal; const addAccountCopy = selectedPlan[0].value === "seniorPartner" - ? "Add up to eight accounts for your Sentio Partner subscripton" - : "Add up to two additional accounts for your Sentio Partner subscripton"; + ? "Add up to eight additional accounts to your subscripton" + : "Add up to two additional accounts to your subscripton"; return (
@@ -464,7 +469,9 @@ const SignupPage = () => {

-
{}
+
+
{addAccountCopy}
+