Special Offer
@@ -57,7 +52,7 @@ function MarketingTrialPayment() {
No pressure. Cancel anytime
Total today:
-
$0
+
${(products[0]?.trialPrice / 100).toFixed(2) || 0}
@@ -76,7 +71,7 @@ function MarketingTrialPayment() {
Save $10 every period
- You will be charged only $0 for your 7-day trial.{" "}
+ You will be charged only ${(products[0]?.trialPrice / 100).toFixed(2) || 0} for your 7-day trial.{" "}
Subscription renews automatically until cancelled. You{" "}
can cancel at any time before the end of the trial.
diff --git a/src/components/pages/PaymentWithEmailPage/index.tsx b/src/components/pages/PaymentWithEmailPage/index.tsx
deleted file mode 100644
index 81cfd99..0000000
--- a/src/components/pages/PaymentWithEmailPage/index.tsx
+++ /dev/null
@@ -1,246 +0,0 @@
-import EmailInput from "@/components/EmailEnterPage/EmailInput";
-import styles from "./styles.module.css";
-import { useCallback, useEffect, useState } from "react";
-import { useTranslation } from "react-i18next";
-import { actions, selectors } from "@/store";
-import { useDispatch, useSelector } from "react-redux";
-import MainButton from "@/components/MainButton";
-import Loader, { LoaderColor } from "@/components/Loader";
-import { useAuth } from "@/auth";
-import { ApiError, extractErrorMessage, useApi } from "@/api";
-import { getClientTimezone } from "@/locales";
-import ErrorText from "@/components/ErrorText";
-import Title from "@/components/Title";
-import NameInput from "@/components/EmailEnterPage/NameInput";
-import { useParams } from "react-router-dom";
-import routes from "@/routes";
-import PaymentForm from "./PaymentForm";
-import { getPriceCentsToDollars } from "@/services/price";
-import { useSinglePayment } from "@/hooks/payment/useSinglePayment";
-
-function PaymentWithEmailPage() {
- const { productId } = useParams();
- const { t, i18n } = useTranslation();
- // const tokenFromStore = useSelector(selectors.selectToken);
- const { signUp, user: userFromStore, token: tokenFromStore } = useAuth();
- const api = useApi();
- const timezone = getClientTimezone();
- const dispatch = useDispatch();
- const birthday = useSelector(selectors.selectBirthday);
- const locale = i18n.language;
- const [email, setEmail] = useState("");
- const [name, setName] = useState("");
- const [isValidEmail, setIsValidEmail] = useState(false);
- const [isValidName, setIsValidName] = useState(productId !== "chat.aura");
- const [isDisabled, setIsDisabled] = useState(true);
- const [isAuth, setIsAuth] = useState(false);
- const [apiError, setApiError] = useState
(null);
- const [error, setError] = useState(false);
- const returnUrl = `${window.location.protocol}//${
- window.location.host
- }${routes.client.paymentResult()}`;
-
- const [isLoadingAuth, setIsLoadingAuth] = useState(false);
-
- const {
- product,
- paymentIntent,
- createSinglePayment,
- isLoading: isLoadingSinglePayment,
- error: errorSinglePayment,
- } = useSinglePayment();
-
- useEffect(() => {
- if (
- isValidName &&
- isValidEmail &&
- !(error || apiError || errorSinglePayment?.error)
- ) {
- setIsDisabled(false);
- } else {
- setIsDisabled(true);
- }
- }, [
- isValidEmail,
- email,
- isValidName,
- name,
- error,
- apiError,
- errorSinglePayment?.error,
- ]);
-
- const handleValidEmail = (email: string) => {
- dispatch(actions.form.addEmail(email));
- setEmail(email);
- setIsValidEmail(true);
- };
-
- const handleValidName = (name: string) => {
- setName(name);
- setIsValidName(true);
- };
-
- const authorization = async () => {
- try {
- setIsLoadingAuth(true);
- const auth = await api.auth({ email, timezone, locale });
- const {
- auth: { token, user },
- } = auth;
- signUp(token, user);
- const payload = {
- user: {
- profile_attributes: {
- birthday,
- full_name: name,
- },
- },
- token,
- };
- const updatedUser = await api.updateUser(payload).catch((error) => {
- console.log("Error: ", error);
- });
-
- if (updatedUser?.user) {
- dispatch(actions.user.update(updatedUser.user));
- }
- if (name) {
- dispatch(
- actions.user.update({
- username: name,
- })
- );
- }
- dispatch(actions.status.update("registred"));
- setIsAuth(true);
- const userUpdated = await api.getUser({ token });
- setIsLoadingAuth(false);
- return { user: userUpdated?.user, token };
- } catch (error) {
- console.error(error);
- if (error instanceof ApiError) {
- setApiError(error as ApiError);
- } else {
- setError(true);
- }
- setIsLoadingAuth(false);
- }
- };
-
- const handleClick = async () => {
- const authData = await authorization();
- if (!authData) {
- return;
- }
- const { user, token } = authData;
-
- await createSinglePayment({
- user,
- token,
- targetProductKey: productId || "",
- returnUrl,
- });
- };
-
- const handleAuthUser = useCallback(async () => {
- if (!tokenFromStore.length || !userFromStore) {
- return;
- }
-
- await createSinglePayment({
- user: userFromStore,
- token: tokenFromStore,
- targetProductKey: productId || "",
- returnUrl,
- });
- }, [
- createSinglePayment,
- productId,
- returnUrl,
- tokenFromStore,
- userFromStore,
- ]);
-
- useEffect(() => {
- handleAuthUser();
- // eslint-disable-next-line react-hooks/exhaustive-deps
- }, []);
-
- return (
-
- {(isLoadingSinglePayment || isLoadingSinglePayment) && (
-
- )}
- {!isLoadingSinglePayment &&
- !isLoadingAuth &&
- paymentIntent &&
- "paymentIntent" in paymentIntent &&
- !!tokenFromStore.length && (
- <>
-
- {getPriceCentsToDollars(product?.price || 0)}$
-
-
- >
- )}
- {(!tokenFromStore || !paymentIntent) &&
- // || (productId !== "chat.aura" && !name.length)
- !isLoadingSinglePayment &&
- !isLoadingAuth && (
- <>
-
setIsValidName(productId !== "chat.aura")}
- />
- setIsValidEmail(false)}
- />
-
-
- {isLoadingSinglePayment && }
- {!isLoadingSinglePayment &&
- !(!apiError && !error && !isLoadingSinglePayment && isAuth) &&
- t("_continue")}
- {!apiError && !error && !isLoadingSinglePayment && isAuth && (
-
- )}
-
- >
- )}
- {(error || apiError || errorSinglePayment?.error) && (
-
- Something went wrong:{" "}
- {errorSinglePayment?.error?.length && errorSinglePayment?.error}
-
- )}
- {apiError && (
-
- )}
-
- );
-}
-
-export default PaymentWithEmailPage;
diff --git a/src/components/pages/PaymentWithEmailPage/styles.module.css b/src/components/pages/PaymentWithEmailPage/styles.module.css
deleted file mode 100644
index 27971fd..0000000
--- a/src/components/pages/PaymentWithEmailPage/styles.module.css
+++ /dev/null
@@ -1,61 +0,0 @@
-.page {
- /* position: relative; */
- position: static;
- height: fit-content;
- min-height: calc(100dvh - 103px);
- /* max-height: -webkit-fill-available; */
- display: flex;
- justify-items: center;
- justify-content: center;
- align-items: center;
- /* gap: 16px; */
-}
-
-.button {
- border-radius: 12px;
- margin-top: 0;
- box-shadow: rgba(0, 0, 0, 0.25) 0px 4px 4px 0px;
- height: 50px;
- min-height: 0;
- background: linear-gradient(
- 165.54deg,
- rgb(20, 19, 51) -33.39%,
- rgb(32, 34, 97) 15.89%,
- rgb(84, 60, 151) 55.84%,
- rgb(105, 57, 162) 74.96%
- );
- font-size: 18px;
- line-height: 21px;
-}
-
-.payment-loader {
- display: flex;
- justify-content: center;
- align-items: center;
-}
-
-.cross {
- position: absolute;
- top: -36px;
- right: 28px;
- width: 22px;
- height: 22px;
- cursor: pointer;
- z-index: 9;
-}
-
-.title {
- font-size: 27px;
- font-weight: 700;
- margin: 0;
-}
-
-.email {
- font-size: 17px;
- font-weight: 500;
- margin: 0;
-}
-
-.success-icon {
- height: 100%;
-}
diff --git a/src/components/pages/PaymentWithEmailPage/PaymentForm/index.tsx b/src/components/pages/SinglePaymentPage/PaymentForm/index.tsx
similarity index 93%
rename from src/components/pages/PaymentWithEmailPage/PaymentForm/index.tsx
rename to src/components/pages/SinglePaymentPage/PaymentForm/index.tsx
index aaa0019..ecaf0d1 100644
--- a/src/components/pages/PaymentWithEmailPage/PaymentForm/index.tsx
+++ b/src/components/pages/SinglePaymentPage/PaymentForm/index.tsx
@@ -1,6 +1,6 @@
import { Elements } from "@stripe/react-stripe-js";
import styles from "./styles.module.css";
-import CheckoutForm from "@/components/PaymentPage/methods/Stripe/CheckoutForm";
+import CheckoutForm from "@/components/PaymentPage/methods/CheckoutForm";
import { useEffect, useState } from "react";
import { Stripe, loadStripe } from "@stripe/stripe-js";
import SecurityPayments from "../../TrialPayment/components/SecurityPayments";
diff --git a/src/components/pages/PaymentWithEmailPage/PaymentForm/styles.module.css b/src/components/pages/SinglePaymentPage/PaymentForm/styles.module.css
similarity index 100%
rename from src/components/pages/PaymentWithEmailPage/PaymentForm/styles.module.css
rename to src/components/pages/SinglePaymentPage/PaymentForm/styles.module.css
diff --git a/src/components/pages/PaymentWithEmailPage/ResultPayment/FailPaymentPage/index.tsx b/src/components/pages/SinglePaymentPage/ResultPayment/FailPaymentPage/index.tsx
similarity index 100%
rename from src/components/pages/PaymentWithEmailPage/ResultPayment/FailPaymentPage/index.tsx
rename to src/components/pages/SinglePaymentPage/ResultPayment/FailPaymentPage/index.tsx
diff --git a/src/components/pages/PaymentWithEmailPage/ResultPayment/FailPaymentPage/styles.module.css b/src/components/pages/SinglePaymentPage/ResultPayment/FailPaymentPage/styles.module.css
similarity index 100%
rename from src/components/pages/PaymentWithEmailPage/ResultPayment/FailPaymentPage/styles.module.css
rename to src/components/pages/SinglePaymentPage/ResultPayment/FailPaymentPage/styles.module.css
diff --git a/src/components/pages/PaymentWithEmailPage/ResultPayment/SuccessPaymentPage/index.tsx b/src/components/pages/SinglePaymentPage/ResultPayment/SuccessPaymentPage/index.tsx
similarity index 100%
rename from src/components/pages/PaymentWithEmailPage/ResultPayment/SuccessPaymentPage/index.tsx
rename to src/components/pages/SinglePaymentPage/ResultPayment/SuccessPaymentPage/index.tsx
diff --git a/src/components/pages/PaymentWithEmailPage/ResultPayment/SuccessPaymentPage/styles.module.css b/src/components/pages/SinglePaymentPage/ResultPayment/SuccessPaymentPage/styles.module.css
similarity index 100%
rename from src/components/pages/PaymentWithEmailPage/ResultPayment/SuccessPaymentPage/styles.module.css
rename to src/components/pages/SinglePaymentPage/ResultPayment/SuccessPaymentPage/styles.module.css
diff --git a/src/components/pages/SinglePaymentPage/index.tsx b/src/components/pages/SinglePaymentPage/index.tsx
index 2b1f86a..b662985 100644
--- a/src/components/pages/SinglePaymentPage/index.tsx
+++ b/src/components/pages/SinglePaymentPage/index.tsx
@@ -1,6 +1,6 @@
import Title from "@/components/Title";
import styles from "./styles.module.css";
-import PaymentForm from "../PaymentWithEmailPage/PaymentForm";
+import PaymentForm from "./PaymentForm";
import { getPriceCentsToDollars } from "@/services/price";
import { useSinglePayment } from "@/hooks/payment/useSinglePayment";
import routes from "@/routes";
diff --git a/src/components/pages/TrialPayment/components/PaymentModal/index.tsx b/src/components/pages/TrialPayment/components/PaymentModal/index.tsx
index c93f520..841e298 100644
--- a/src/components/pages/TrialPayment/components/PaymentModal/index.tsx
+++ b/src/components/pages/TrialPayment/components/PaymentModal/index.tsx
@@ -4,13 +4,11 @@ import PaymentMethodsChoice from "../PaymentMethodsChoice";
import { useEffect, useMemo, useState } from "react";
import { EPaymentMethod, paymentMethods } from "@/data/paymentMethods";
import { Elements } from "@stripe/react-stripe-js";
-import ApplePayButton from "@/components/StripePage/ApplePayButton";
-import CheckoutForm from "@/components/PaymentPage/methods/Stripe/CheckoutForm";
+import ApplePayButton from "@/components/PaymentPage/methods/ApplePayButton";
+import CheckoutForm from "@/components/PaymentPage/methods/CheckoutForm";
import { Stripe, loadStripe } from "@stripe/stripe-js";
import { useSelector } from "react-redux";
import { selectors } from "@/store";
-import { useNavigate } from "react-router-dom";
-import routes from "@/routes";
import Loader from "@/components/Loader";
import SecurityPayments from "../SecurityPayments";
import { EPlacementKeys, IPaywallProduct } from "@/api/resources/Paywall";
@@ -21,6 +19,7 @@ interface IPaymentModalProps {
activeProduct?: IPaywallProduct;
noTrial?: boolean;
returnUrl?: string;
+ placementKey?: EPlacementKeys;
}
const getPrice = (product: IPaywallProduct | null) => {
@@ -34,13 +33,13 @@ function PaymentModal({
activeProduct,
noTrial,
returnUrl,
+ placementKey = EPlacementKeys["aura.placement.main"],
}: IPaymentModalProps) {
- const navigate = useNavigate();
const [stripePromise, setStripePromise] =
useState | null>(null);
const { products } = usePaywall({
- placementKey: EPlacementKeys["aura.placement.main"],
+ placementKey,
});
const activeProductFromStore = useSelector(selectors.selectActiveProduct);
@@ -81,14 +80,8 @@ function PaymentModal({
(async () => {
if (!products?.length || !publicKey) return;
setStripePromise(loadStripe(publicKey));
- const isActiveProduct = products.find(
- (product) => product._id === _activeProduct?._id
- );
- if (!_activeProduct || !isActiveProduct) {
- navigate(routes.client.trialChoice());
- }
})();
- }, [_activeProduct, navigate, products, publicKey]);
+ }, [products, publicKey]);
if (isLoading) {
return (
diff --git a/src/components/pages/TrialPayment/index.tsx b/src/components/pages/TrialPayment/index.tsx
index 8dd84d3..d783f1a 100755
--- a/src/components/pages/TrialPayment/index.tsx
+++ b/src/components/pages/TrialPayment/index.tsx
@@ -68,6 +68,16 @@ function TrialPaymentPage() {
}
}, [dispatch, subPlan, products, activeProduct]);
+ useEffect(() => {
+ if (!products.length) return;
+ const isActiveProduct = products.find(
+ (product) => product._id === activeProduct?._id
+ );
+ if (!activeProduct || !isActiveProduct) {
+ navigate(routes.client.trialChoice());
+ }
+ }, [activeProduct, navigate, products]);
+
useEffect(() => {
if (["relationship", "married"].includes(flowChoice)) {
setMarginTopTitle(460);
diff --git a/src/components/pages/TrialPaymentWithDiscount/PaymentDiscountTable/index.tsx b/src/components/pages/TrialPaymentWithDiscount/PaymentDiscountTable/index.tsx
index c8452b5..3157556 100644
--- a/src/components/pages/TrialPaymentWithDiscount/PaymentDiscountTable/index.tsx
+++ b/src/components/pages/TrialPaymentWithDiscount/PaymentDiscountTable/index.tsx
@@ -38,7 +38,7 @@ function PaymentDiscountTable() {
Your cost per 14 days after trial:
$19
- $9
+ ${(activeProduct?.price || 0) / 100}
You save $30
diff --git a/src/components/pages/TrialPaymentWithDiscount/index.tsx b/src/components/pages/TrialPaymentWithDiscount/index.tsx
index 4122374..2eb3226 100644
--- a/src/components/pages/TrialPaymentWithDiscount/index.tsx
+++ b/src/components/pages/TrialPaymentWithDiscount/index.tsx
@@ -4,11 +4,35 @@ import MainButton from "@/components/MainButton";
import PaymentDiscountTable from "./PaymentDiscountTable";
import Modal from "@/components/Modal";
import PaymentModal from "../TrialPayment/components/PaymentModal";
-import { useState } from "react";
+import { useEffect, useState } from "react";
+import { usePaywall } from "@/hooks/paywall/usePaywall";
+import { EPlacementKeys } from "@/api/resources/Paywall";
+import { useDispatch, useSelector } from "react-redux";
+import { actions, selectors } from "@/store";
function TrialPaymentWithDiscount() {
+ const dispatch = useDispatch();
+ const { products } = usePaywall({
+ placementKey: EPlacementKeys["aura.placement.secret.discount"],
+ });
+ const productFromStore = useSelector(selectors.selectActiveProduct);
+
const [isOpenPaymentModal, setIsOpenPaymentModal] = useState
(false);
+ useEffect(() => {
+ if (!products.length) return;
+ const activeProduct = products.find(
+ (p) => p.trialPrice === productFromStore?.trialPrice
+ );
+ if (!activeProduct) {
+ dispatch(actions.payment.update({ activeProduct: products[0] }));
+ }
+ if (activeProduct) {
+ dispatch(actions.payment.update({ activeProduct }));
+ }
+ // eslint-disable-next-line react-hooks/exhaustive-deps
+ }, [dispatch, products]);
+
const handleClose = () => {
setIsOpenPaymentModal(false);
};
@@ -16,7 +40,9 @@ function TrialPaymentWithDiscount() {
return (
-
+
- By continuing you agree that if you don't cancel prior to the end of the
- 3-days trial, you will automatically be charged $9 for the introductory
- period of 14 days thereafter the standard rate of $9 every 14 days until
- you cancel in settings. Learn more about cancellation and refund policy
- in Subscription terms.
+ By continuing you agree that if you don`t cancel prior to the end of the
+ 3-days trial, you will automatically be charged $
+ {(productFromStore?.price || 0) / 100} for the introductory period of 14
+ days thereafter the standard rate of $
+ {(productFromStore?.price || 0) / 100} every 14 days until you cancel in
+ settings. Learn more about cancellation and refund policy in
+ Subscription terms.
);
diff --git a/src/components/palmistry/discount-screen/discount-screen.tsx b/src/components/palmistry/discount-screen/discount-screen.tsx
index 985e067..29dcca5 100644
--- a/src/components/palmistry/discount-screen/discount-screen.tsx
+++ b/src/components/palmistry/discount-screen/discount-screen.tsx
@@ -11,7 +11,7 @@ import routes from "@/routes";
import { useApi } from "@/api";
import { useAuth } from "@/auth";
import HeaderLogo from "@/components/palmistry/header-logo/header-logo";
-import CheckoutForm from "@/components/PaymentPage/methods/Stripe/CheckoutForm";
+import CheckoutForm from "@/components/PaymentPage/methods/CheckoutForm";
import { ResponseGet } from "@/api/resources/SinglePayment";
const currentProductKey = "skip.trial.subscription.aura";
diff --git a/src/components/palmistry/payment-screen/payment-screen.tsx b/src/components/palmistry/payment-screen/payment-screen.tsx
index 7d577cd..23e89ee 100644
--- a/src/components/palmistry/payment-screen/payment-screen.tsx
+++ b/src/components/palmistry/payment-screen/payment-screen.tsx
@@ -9,6 +9,8 @@ import useTimer from "@/hooks/palmistry/use-timer";
import HeaderLogo from "@/components/palmistry/header-logo/header-logo";
import PaymentModal from "@/components/pages/TrialPayment/components/PaymentModal";
import { selectors } from "@/store";
+import { EPlacementKeys } from "@/api/resources/Paywall";
+import { useSearchParams } from "react-router-dom";
const getFormattedPrice = (price: number) => {
return (price / 100).toFixed(2);
@@ -17,7 +19,12 @@ const getFormattedPrice = (price: number) => {
export default function PaymentScreen() {
const time = useTimer();
const activeProductFromStore = useSelector(selectors.selectActiveProduct);
- const subscriptionStatus = useSelector(selectors.selectStatus);
+ const [searchParams] = useSearchParams();
+ const subscriptionStatus =
+ searchParams.get("redirect_status") === "succeeded"
+ ? "subscribed"
+ : "lead";
+ // const subscriptionStatus = useSelector(selectors.selectStatus);
const steps = useSteps();
@@ -247,7 +254,10 @@ export default function PaymentScreen() {
}`}
>
{subscriptionStatus !== "subscribed" && (
-
+
)}
{subscriptionStatus === "subscribed" && (
diff --git a/src/components/palmistry/premium-bundle-screen/premium-bundle-screen.tsx b/src/components/palmistry/premium-bundle-screen/premium-bundle-screen.tsx
index 49589c3..60da2dd 100644
--- a/src/components/palmistry/premium-bundle-screen/premium-bundle-screen.tsx
+++ b/src/components/palmistry/premium-bundle-screen/premium-bundle-screen.tsx
@@ -10,7 +10,7 @@ import routes from "@/routes";
import HeaderLogo from "@/components/palmistry/header-logo/header-logo";
import { useApi } from "@/api";
import { useAuth } from "@/auth";
-import CheckoutForm from "@/components/PaymentPage/methods/Stripe/CheckoutForm";
+import CheckoutForm from "@/components/PaymentPage/methods/CheckoutForm";
import { ResponseGet } from "@/api/resources/SinglePayment";
const currentProductKey = "premium.bundle.aura";
diff --git a/src/components/palmistry/step-subscription-plan/step-subscription-plan.tsx b/src/components/palmistry/step-subscription-plan/step-subscription-plan.tsx
index f59b3fe..3620bc7 100644
--- a/src/components/palmistry/step-subscription-plan/step-subscription-plan.tsx
+++ b/src/components/palmistry/step-subscription-plan/step-subscription-plan.tsx
@@ -21,7 +21,7 @@ export default function StepSubscriptionPlan() {
const dispatch = useDispatch();
const activeProductFromStore = useSelector(selectors.selectActiveProduct);
const { products } = usePaywall({
- placementKey: EPlacementKeys["aura.placement.main"],
+ placementKey: EPlacementKeys["aura.placement.palmistry.main"],
});
const storedEmail = steps.getStoredValue(Step.Email);
@@ -35,23 +35,16 @@ export default function StepSubscriptionPlan() {
}
}, [activeProductFromStore]);
- React.useEffect(() => {
- if (product) {
- const targetProduct = products.find(
- (_product) => _product._id === product
- );
-
- if (targetProduct) {
- dispatch(actions.payment.update({ activeProduct: targetProduct }));
- }
- }
- }, [dispatch, product, products]);
-
React.useEffect(() => {
setEmail(storedEmail || "");
}, [storedEmail]);
const onNext = () => {
+ const targetProduct = products.find((_product) => _product._id === product);
+
+ if (targetProduct) {
+ dispatch(actions.payment.update({ activeProduct: targetProduct }));
+ }
steps.saveCurrent(product);
steps.goNext();
};
diff --git a/src/components/palmistry/step-upload/step-upload.tsx b/src/components/palmistry/step-upload/step-upload.tsx
index ff5db42..9331c53 100644
--- a/src/components/palmistry/step-upload/step-upload.tsx
+++ b/src/components/palmistry/step-upload/step-upload.tsx
@@ -15,6 +15,8 @@ type Props = {
onOpenModal: (isOpen: boolean) => void;
};
+const isProduction = import.meta.env.MODE === "production";
+
export default function StepUpload(props: Props) {
const steps = useSteps();
const api = useApi();
@@ -606,7 +608,11 @@ export default function StepUpload(props: Props) {
className="palmistry-container__take-palm-button"
disabled={isUpladProcessing}
active={!isUpladProcessing}
- onClick={() => setPalmCameraModalIsOpen(true)}
+ onClick={() =>
+ isProduction
+ ? setPalmCameraModalIsOpen(true)
+ : setUploadMenuModalIsOpen(true)
+ }
isProcessing={isUpladProcessing}
>
{(isUpladProcessing && "Loading photo") || "Take a picture now"}
diff --git a/src/hooks/paywall/defaultPaywalls.ts b/src/hooks/paywall/defaultPaywalls.ts
index 0276219..3244540 100644
--- a/src/hooks/paywall/defaultPaywalls.ts
+++ b/src/hooks/paywall/defaultPaywalls.ts
@@ -242,5 +242,208 @@ export const defaultPaywalls: { [key in EPlacementKeys]: IPaywall } = {
"_id": "664542bbfe0a8eb4ee0b4f2e"
}
]
+ },
+ "aura.placement.email.marketing": {
+ "_id": "66565b15e4ad13456f7d04f2",
+ "key": "aura.paywall.email.marketing",
+ "name": "Special Offer!",
+ "products": [
+ {
+ "_id": "66565aa8e4ad13456f7d02a6",
+ "key": "compatibility.pdf.trial.5",
+ "productId": "prod_PnStTEBzrPLgvL",
+ "priceId": "price_1PG2RSIlX4lgwUxrDfU2BDS4",
+ "name": "小ompatibility AURA | Trial $0.50",
+ "description": "Description",
+ "price": 1900,
+ "discountPrice": null,
+ "isDiscount": false,
+ "discountPriceId": null,
+ "trialDuration": 3,
+ "trialPrice": 50,
+ "isFreeTrial": false,
+ "isTrial": true,
+ "trialPriceId": "price_1PG1vKIlX4lgwUxrVhBf6eIq",
+ "type": "subscription"
+ }
+ ],
+ "properties": [
+ {
+ "key": "text.old.price",
+ "value": "up to $13.67",
+ "_id": "66565b15e4ad13456f7d04f3"
+ }
+ ]
+ },
+ "aura.placement.secret.discount": {
+ "_id": "6658973fef0d180993cdbcc1",
+ "key": "aura.paywall.secret.discount",
+ "name": "Secret Discount",
+ "products": [
+ {
+ "_id": "66589439ef0d180993cdb72f",
+ "key": "compatibility.secret.discount.trial.0",
+ "productId": "prod_PnStTEBzrPLgvL",
+ "priceId": "price_1PMAREIlX4lgwUxrmvtHWth1",
+ "name": "小ompatibility AURA Secret Discount | Trial $0.99",
+ "description": "Description",
+ "price": 900,
+ "discountPrice": null,
+ "isDiscount": false,
+ "discountPriceId": null,
+ "trialDuration": 3,
+ "trialPrice": 99,
+ "isFreeTrial": false,
+ "isTrial": true,
+ "trialPriceId": "price_1PFiSkIlX4lgwUxrVel0l445",
+ "type": "subscription"
+ },
+ {
+ "_id": "6658946cef0d180993cdb79f",
+ "key": "compatibility.secret.discount.trial.1",
+ "productId": "prod_PnStTEBzrPLgvL",
+ "priceId": "price_1PMAREIlX4lgwUxrmvtHWth1",
+ "name": "小ompatibility AURA Secret Discount | Trial $5.00",
+ "description": "Description",
+ "price": 900,
+ "discountPrice": null,
+ "isDiscount": false,
+ "discountPriceId": null,
+ "trialDuration": 3,
+ "trialPrice": 500,
+ "isFreeTrial": false,
+ "isTrial": true,
+ "trialPriceId": "price_1PFyASIlX4lgwUxriLtzsk05",
+ "type": "subscription"
+ },
+ {
+ "_id": "66589544ef0d180993cdb7dc",
+ "key": "compatibility.secret.discount.trial.2",
+ "productId": "prod_PnStTEBzrPLgvL",
+ "priceId": "price_1PMAREIlX4lgwUxrmvtHWth1",
+ "name": "小ompatibility AURA Secret Discount | Trial $9.00",
+ "description": "Description",
+ "price": 900,
+ "discountPrice": null,
+ "isDiscount": false,
+ "discountPriceId": null,
+ "trialDuration": 3,
+ "trialPrice": 900,
+ "isFreeTrial": false,
+ "isTrial": true,
+ "trialPriceId": "price_1PFyAuIlX4lgwUxr4fFoauCV",
+ "type": "subscription"
+ },
+ {
+ "_id": "66589591ef0d180993cdb88e",
+ "key": "compatibility.secret.discount.trial.3",
+ "productId": "prod_PnStTEBzrPLgvL",
+ "priceId": "price_1PMAREIlX4lgwUxrmvtHWth1",
+ "name": "小ompatibility AURA Secret Discount | Trial $13.76",
+ "description": "Description",
+ "price": 900,
+ "discountPrice": null,
+ "isDiscount": false,
+ "discountPriceId": null,
+ "trialDuration": 3,
+ "trialPrice": 1376,
+ "isFreeTrial": false,
+ "isTrial": true,
+ "trialPriceId": "price_1PFyBQIlX4lgwUxrMnEUkV73",
+ "type": "subscription"
+ }
+ ],
+ "properties": []
+ },
+ "aura.placement.palmistry.main": {
+ "_id": "66565a0ee4ad13456f7d0079",
+ "key": "aura.paywall.palmistry.main",
+ "name": "paywall without free trial",
+ "products": [
+ {
+ "_id": "65ff043dfc0fcfc4be550035",
+ "key": "compatibility.pdf.trial.0",
+ "productId": "prod_PnStTEBzrPLgvL",
+ "name": "小ompatibility AURA | Trial $0.99",
+ "priceId": "price_1PG2RSIlX4lgwUxrDfU2BDS4",
+ "type": "subscription",
+ "description": "Description",
+ "discountPrice": null,
+ "discountPriceId": null,
+ "isDiscount": false,
+ "isFreeTrial": false,
+ "isTrial": true,
+ "price": 1900,
+ "trialDuration": 3,
+ "trialPrice": 99,
+ "trialPriceId": "price_1PFiSkIlX4lgwUxrVel0l445"
+ },
+ {
+ "_id": "66420b6e859ff1199d3a6e88",
+ "key": "compatibility.pdf.trial.1",
+ "productId": "prod_PnStTEBzrPLgvL",
+ "name": "小ompatibility AURA | Trial $5.00",
+ "priceId": "price_1PG2RSIlX4lgwUxrDfU2BDS4",
+ "type": "subscription",
+ "description": "Description",
+ "discountPrice": null,
+ "discountPriceId": null,
+ "isDiscount": false,
+ "isFreeTrial": false,
+ "isTrial": true,
+ "price": 1900,
+ "trialDuration": 3,
+ "trialPrice": 500,
+ "trialPriceId": "price_1PFyASIlX4lgwUxriLtzsk05"
+ },
+ {
+ "_id": "66420be1859ff1199d3a6e89",
+ "key": "compatibility.pdf.trial.2",
+ "productId": "prod_PnStTEBzrPLgvL",
+ "name": "小ompatibility AURA | Trial $9.00",
+ "priceId": "price_1PG2RSIlX4lgwUxrDfU2BDS4",
+ "type": "subscription",
+ "description": "Description",
+ "discountPrice": null,
+ "discountPriceId": null,
+ "isDiscount": false,
+ "isFreeTrial": false,
+ "isTrial": true,
+ "price": 1900,
+ "trialDuration": 3,
+ "trialPrice": 900,
+ "trialPriceId": "price_1PFyAuIlX4lgwUxr4fFoauCV"
+ },
+ {
+ "_id": "66420c1c859ff1199d3a6e8a",
+ "key": "compatibility.pdf.trial.3",
+ "productId": "prod_PnStTEBzrPLgvL",
+ "name": "小ompatibility AURA | Trial $13.76",
+ "priceId": "price_1PG2RSIlX4lgwUxrDfU2BDS4",
+ "type": "subscription",
+ "description": "Description",
+ "discountPrice": null,
+ "discountPriceId": null,
+ "isDiscount": false,
+ "isFreeTrial": false,
+ "isTrial": true,
+ "price": 1900,
+ "trialDuration": 3,
+ "trialPrice": 1376,
+ "trialPriceId": "price_1PFyBQIlX4lgwUxrMnEUkV73"
+ }
+ ],
+ "properties": [
+ {
+ "key": "text.0",
+ "value": "We've helped millions of people to\nreveal the destiny of their love life\nand what the future holds for them\nand their families.",
+ "_id": "664542bbfe0a8eb4ee0b4f27"
+ },
+ {
+ "key": "text.1",
+ "value": "It costs us $13.21 to compensate our AURA\nemployees for the trial, but please choose the\namount you are comfortable with.",
+ "_id": "664542bbfe0a8eb4ee0b4f29"
+ }
+ ]
}
}
\ No newline at end of file
diff --git a/src/routes.ts b/src/routes.ts
index 5f8996d..2f0c89b 100755
--- a/src/routes.ts
+++ b/src/routes.ts
@@ -57,7 +57,6 @@ const routes = {
paymentResult: () => [host, "payment", "result"].join("/"),
paymentSuccess: () => [host, "payment", "success"].join("/"),
paymentFail: () => [host, "payment", "fail"].join("/"),
- paymentStripe: () => [host, "payment", "stripe"].join("/"),
wallpaper: () => [host, "wallpaper"].join("/"),
static: () => [host, "static", ":typeId"].join("/"),
legal: (type: string) => [host, "static", type].join("/"),
@@ -349,7 +348,6 @@ export const withoutFooterRoutes = [
routes.client.paymentResult(),
routes.client.paymentSuccess(),
routes.client.paymentFail(),
- routes.client.paymentStripe(),
routes.client.magicBall(),
routes.client.horoscopeBestiesResult(),
routes.client.predictionMoonResult(),
diff --git a/src/store/paywalls.ts b/src/store/paywalls.ts
index 4190ded..d273f8b 100644
--- a/src/store/paywalls.ts
+++ b/src/store/paywalls.ts
@@ -19,9 +19,15 @@ type IPayloadUpdatePaywall = {
const initialState: TPaywalls = {
"aura.placement.main": null,
"aura.placement.redesign.main": null,
+ "aura.placement.email.marketing": null,
+ "aura.placement.secret.discount": null,
+ "aura.placement.palmistry.main": null,
isMustUpdate: {
"aura.placement.main": true,
"aura.placement.redesign.main": true,
+ "aura.placement.email.marketing": true,
+ "aura.placement.secret.discount": true,
+ "aura.placement.palmistry.main": true
},
}