This commit is contained in:
Kenneth Jannette
2024-01-28 21:03:50 -06:00
parent 654844d3e9
commit b06aa1f053
3 changed files with 14 additions and 8 deletions

View File

@@ -34,7 +34,11 @@ const PaymentModal = ({
const extraAccountsPrice = isAnnual
? additionalAccountsAnnualPriceToday
: additionalAccountsMonthlyPriceToday;
? additionalAccountsAnnualPriceToday
: 0
: additionalAccountsMonthlyPriceToday
? additionalAccountsMonthlyPriceToday
: 0;
const showAdditionaLAccountsView =
(selectedPlan[0]?.value === "partner" && numberOfAccountsToAdd > 0) ||
@@ -45,6 +49,7 @@ const PaymentModal = ({
const amountToday = isAnnual
? annualSubscriptionPriceToday
: monthlySubscriptionPriceToday;
const totalToday = amountToday + extraAccountsPrice;
function handleValidateAndPay() {

View File

@@ -217,12 +217,12 @@ const SignupPage = () => {
return;
}
/*
const userDataValues = validateUserData();
const dataValues = validateUserData();
if (dataValues === null) {
return;
}
*/
/*
const userDataValues = {
barNumber: "232323",
city: "broolyn",
@@ -237,7 +237,8 @@ const SignupPage = () => {
telephone: "(313) 555-5555",
zipCode: "12345",
};
saveLeadData(userDataValues);
*/
saveLeadData(dataValues);
setShowSelectPlan(!showSelectPlan);
};
@@ -265,7 +266,7 @@ const SignupPage = () => {
let error = false;
let subscriptionId = null;
let customerId = null;
console.log("~~~~~~~~~~~~~~~~~~~~~~~~handleStripeAuthorization fired");
const token = await stripe.tokens.create({
card: {
number: paymentDataValues.cardNumber,
@@ -280,6 +281,7 @@ const SignupPage = () => {
});
try {
console.log("got to create-subscription try block");
let response = await fetch(`${apiUrl}/create-subscription`, {
method: "POST",
headers: {
@@ -333,7 +335,7 @@ const SignupPage = () => {
if (dataValues === null) {
return;
}
console.log("dataValues in handleSignup", dataValues);
const planType = determinePlan(isAnnual, activeRadioOption);
setIsBusy(true);

View File

@@ -84,7 +84,6 @@ export const getValidatedFormData = (data, fields) =>
}, data);
export const handleFormDataChange = (e, name, data, fields) => {
console.log("fields", fields);
if (!fields) {
return;
}