more
This commit is contained in:
@@ -34,7 +34,11 @@ const PaymentModal = ({
|
|||||||
|
|
||||||
const extraAccountsPrice = isAnnual
|
const extraAccountsPrice = isAnnual
|
||||||
? additionalAccountsAnnualPriceToday
|
? additionalAccountsAnnualPriceToday
|
||||||
: additionalAccountsMonthlyPriceToday;
|
? additionalAccountsAnnualPriceToday
|
||||||
|
: 0
|
||||||
|
: additionalAccountsMonthlyPriceToday
|
||||||
|
? additionalAccountsMonthlyPriceToday
|
||||||
|
: 0;
|
||||||
|
|
||||||
const showAdditionaLAccountsView =
|
const showAdditionaLAccountsView =
|
||||||
(selectedPlan[0]?.value === "partner" && numberOfAccountsToAdd > 0) ||
|
(selectedPlan[0]?.value === "partner" && numberOfAccountsToAdd > 0) ||
|
||||||
@@ -45,6 +49,7 @@ const PaymentModal = ({
|
|||||||
const amountToday = isAnnual
|
const amountToday = isAnnual
|
||||||
? annualSubscriptionPriceToday
|
? annualSubscriptionPriceToday
|
||||||
: monthlySubscriptionPriceToday;
|
: monthlySubscriptionPriceToday;
|
||||||
|
|
||||||
const totalToday = amountToday + extraAccountsPrice;
|
const totalToday = amountToday + extraAccountsPrice;
|
||||||
|
|
||||||
function handleValidateAndPay() {
|
function handleValidateAndPay() {
|
||||||
|
|||||||
@@ -217,12 +217,12 @@ const SignupPage = () => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
const dataValues = validateUserData();
|
||||||
const userDataValues = validateUserData();
|
|
||||||
if (dataValues === null) {
|
if (dataValues === null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
/*
|
||||||
const userDataValues = {
|
const userDataValues = {
|
||||||
barNumber: "232323",
|
barNumber: "232323",
|
||||||
city: "broolyn",
|
city: "broolyn",
|
||||||
@@ -237,7 +237,8 @@ const SignupPage = () => {
|
|||||||
telephone: "(313) 555-5555",
|
telephone: "(313) 555-5555",
|
||||||
zipCode: "12345",
|
zipCode: "12345",
|
||||||
};
|
};
|
||||||
saveLeadData(userDataValues);
|
*/
|
||||||
|
saveLeadData(dataValues);
|
||||||
setShowSelectPlan(!showSelectPlan);
|
setShowSelectPlan(!showSelectPlan);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -265,7 +266,7 @@ const SignupPage = () => {
|
|||||||
let error = false;
|
let error = false;
|
||||||
let subscriptionId = null;
|
let subscriptionId = null;
|
||||||
let customerId = null;
|
let customerId = null;
|
||||||
|
console.log("~~~~~~~~~~~~~~~~~~~~~~~~handleStripeAuthorization fired");
|
||||||
const token = await stripe.tokens.create({
|
const token = await stripe.tokens.create({
|
||||||
card: {
|
card: {
|
||||||
number: paymentDataValues.cardNumber,
|
number: paymentDataValues.cardNumber,
|
||||||
@@ -280,6 +281,7 @@ const SignupPage = () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
console.log("got to create-subscription try block");
|
||||||
let response = await fetch(`${apiUrl}/create-subscription`, {
|
let response = await fetch(`${apiUrl}/create-subscription`, {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@@ -333,7 +335,7 @@ const SignupPage = () => {
|
|||||||
if (dataValues === null) {
|
if (dataValues === null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
console.log("dataValues in handleSignup", dataValues);
|
||||||
const planType = determinePlan(isAnnual, activeRadioOption);
|
const planType = determinePlan(isAnnual, activeRadioOption);
|
||||||
setIsBusy(true);
|
setIsBusy(true);
|
||||||
|
|
||||||
|
|||||||
@@ -84,7 +84,6 @@ export const getValidatedFormData = (data, fields) =>
|
|||||||
}, data);
|
}, data);
|
||||||
|
|
||||||
export const handleFormDataChange = (e, name, data, fields) => {
|
export const handleFormDataChange = (e, name, data, fields) => {
|
||||||
console.log("fields", fields);
|
|
||||||
if (!fields) {
|
if (!fields) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user