more
This commit is contained in:
@@ -44,13 +44,24 @@ const PaymentModal = ({
|
|||||||
(selectedPlan[0]?.value === "seniorPartner" && numberOfAccountsToAdd > 0);
|
(selectedPlan[0]?.value === "seniorPartner" && numberOfAccountsToAdd > 0);
|
||||||
|
|
||||||
const planName = selectedPlan[0].name ? selectedPlan[0].name : null;
|
const planName = selectedPlan[0].name ? selectedPlan[0].name : null;
|
||||||
const billingPeriod = isAnnual ? "Annually" : "Monthly";
|
const planValue = selectedPlan[0].value ? selectedPlan[0].value : null;
|
||||||
const amountToday = isAnnual
|
const billingPeriod =
|
||||||
|
planValue === "ofCounsel"
|
||||||
|
? "Single Purchase"
|
||||||
|
: isAnnual
|
||||||
|
? "Annually"
|
||||||
|
: "Monthly";
|
||||||
|
const amountToday =
|
||||||
|
planValue === "ofCounsel"
|
||||||
|
? 59
|
||||||
|
: isAnnual
|
||||||
? annualSubscriptionPriceToday
|
? annualSubscriptionPriceToday
|
||||||
: monthlySubscriptionPriceToday;
|
: monthlySubscriptionPriceToday;
|
||||||
|
|
||||||
const totalToday = amountToday + extraAccountsPrice;
|
const totalToday =
|
||||||
|
planValue === "ofCounsel" ? 59 : amountToday + extraAccountsPrice;
|
||||||
|
|
||||||
|
const isCounsel = planValue === "ofCounsel" ? true : false;
|
||||||
const handleSignupClick = () => {
|
const handleSignupClick = () => {
|
||||||
//clear fields
|
//clear fields
|
||||||
handleSignup();
|
handleSignup();
|
||||||
@@ -95,7 +106,7 @@ const PaymentModal = ({
|
|||||||
<div className="paymodal-summary-right">Total today:</div>
|
<div className="paymodal-summary-right">Total today:</div>
|
||||||
<div className="paymodal-summary-left">${totalToday}</div>
|
<div className="paymodal-summary-left">${totalToday}</div>
|
||||||
</div>
|
</div>
|
||||||
{isAnnual ? (
|
{isAnnual && !isCounsel ? (
|
||||||
<div className="payment-modal-text-wrapper">
|
<div className="payment-modal-text-wrapper">
|
||||||
<div className="paymodal-summary-right"></div>
|
<div className="paymodal-summary-right"></div>
|
||||||
<div className="paymodal-summary-left-bonus">
|
<div className="paymodal-summary-left-bonus">
|
||||||
@@ -171,15 +182,3 @@ const PaymentModal = ({
|
|||||||
};
|
};
|
||||||
|
|
||||||
export default PaymentModal;
|
export default PaymentModal;
|
||||||
|
|
||||||
/*
|
|
||||||
const tempExtraAccountsPrice = isAnnual
|
|
||||||
? additionalAccountsAnnualPriceToday
|
|
||||||
: additionalAccountsMonthlyPriceToday;
|
|
||||||
|
|
||||||
const extraAccountsPrice =
|
|
||||||
tempExtraAccountsPrice === NaN || tempExtraAccountsPrice === undefined
|
|
||||||
? 0
|
|
||||||
: 0;
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|||||||
@@ -424,7 +424,7 @@ const SignupPage = () => {
|
|||||||
paymentDataValues,
|
paymentDataValues,
|
||||||
dataValues
|
dataValues
|
||||||
);
|
);
|
||||||
console.log("9====> ~ ~ ~ ~ data", data);
|
console.log("data returned from handleStipeAuth", data);
|
||||||
const customerId = data?.data?.customerId;
|
const customerId = data?.data?.customerId;
|
||||||
const subscriptionCreated = data?.data?.subscriptionCreated;
|
const subscriptionCreated = data?.data?.subscriptionCreated;
|
||||||
const subscriptionPeriodStart = data?.data?.subscriptionPeriodStart;
|
const subscriptionPeriodStart = data?.data?.subscriptionPeriodStart;
|
||||||
@@ -455,12 +455,11 @@ const SignupPage = () => {
|
|||||||
subscriptionId,
|
subscriptionId,
|
||||||
isPromotionalMebership
|
isPromotionalMebership
|
||||||
);
|
);
|
||||||
|
|
||||||
setIsBusy(false);
|
setIsBusy(false);
|
||||||
navigate("/dashboard");
|
navigate("/dashboard");
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log("Error handling request", error, error.message);
|
console.log("Error handling request", error);
|
||||||
setIsBusy(false);
|
setIsBusy(false);
|
||||||
setNotice("Sorry, something went wrong. Please try again.");
|
setNotice("Sorry, something went wrong. Please try again.");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user