diff --git a/public/videos/background-video-1.mp4 b/public/videos/background-video-1.mp4 deleted file mode 100644 index 6a735ef..0000000 Binary files a/public/videos/background-video-1.mp4 and /dev/null differ diff --git a/src/api/api.ts b/src/api/api.ts index 547ea56..929a879 100644 --- a/src/api/api.ts +++ b/src/api/api.ts @@ -67,7 +67,6 @@ const api = { runThread: createMethod(OpenAI.createRequest), getStatusRunThread: createMethod(OpenAI.createRequest), getListRuns: createMethod(OpenAI.createRequest), - // Single payment getSinglePaymentProducts: createMethod(SinglePayment.createRequestGet), createSinglePayment: createMethod(SinglePayment.createRequestPost), } diff --git a/src/components/App/index.tsx b/src/components/App/index.tsx index 7103ae9..7cc558b 100755 --- a/src/components/App/index.tsx +++ b/src/components/App/index.tsx @@ -109,7 +109,6 @@ import AdvisorChatPage from "../pages/AdvisorChat"; import PaymentWithEmailPage from "../pages/PaymentWithEmailPage"; import SuccessPaymentPage from "../pages/PaymentWithEmailPage/ResultPayment/SuccessPaymentPage"; import FailPaymentPage from "../pages/PaymentWithEmailPage/ResultPayment/FailPaymentPage"; -import GetInformationPartnerPage from "../pages/GetInformationPartner"; const isProduction = import.meta.env.MODE === "production"; @@ -234,18 +233,9 @@ function App(): JSX.Element { {/* Email - Pay - Email */} } /> } /> - } - /> - } - /> - } - /> + } /> + } /> + } /> {/* Email - Pay - Email */} {/* Test Routes Start */} @@ -361,29 +351,19 @@ function App(): JSX.Element { {/* Email Letters End */} {/* Additional Purchases */} - }> - }> - } - /> - } - /> - } - /> - + }> + } /> + } + /> + } + /> {/* Additional Purchases End */} - } - /> - } diff --git a/src/components/pages/AdditionalPurchases/components/FooterButton/index.tsx b/src/components/pages/AdditionalPurchases/components/FooterButton/index.tsx index 32a498f..de0eae2 100644 --- a/src/components/pages/AdditionalPurchases/components/FooterButton/index.tsx +++ b/src/components/pages/AdditionalPurchases/components/FooterButton/index.tsx @@ -6,7 +6,6 @@ interface IFooterButtonProps { classNameButton?: string; classNameSkip?: string; children?: React.ReactNode; - disabled?: boolean; onClick: () => void; onClickSkip: () => void; } @@ -18,13 +17,11 @@ function FooterButton({ classNameContainer = "", classNameButton = "", classNameSkip = "", - disabled = false, }: IFooterButtonProps) { return (
{children} diff --git a/src/components/pages/AdditionalPurchases/components/SignUpOffer/index.tsx b/src/components/pages/AdditionalPurchases/components/SignUpOffer/index.tsx index 948a34c..9c015b5 100644 --- a/src/components/pages/AdditionalPurchases/components/SignUpOffer/index.tsx +++ b/src/components/pages/AdditionalPurchases/components/SignUpOffer/index.tsx @@ -1,7 +1,6 @@ import { ISignUpOffer } from "@/data/additionalPurchases"; import styles from "./styles.module.css"; import CheckMark from "./check-mark-1.svg"; -import { getPriceCentsToDollars } from "@/services/price"; interface ISignUpOfferProps extends ISignUpOffer { isActive: boolean; @@ -32,14 +31,9 @@ function SignUpOffer(props: ISignUpOfferProps) { )}
- - ${getPriceCentsToDollars(current || 0)} - {" "} - ( {id === "ultra-pack" ? "regular price" : "was"}{" "} - - ${getPriceCentsToDollars(old || 0)} - {" "} - ) + ${current} ({" "} + {id === "ultra-pack" ? "regular price" : "was"}{" "} + ${old} ) {id !== "ultra-pack" && (
diff --git a/src/components/pages/AdditionalPurchases/pages/AddConsultation/index.tsx b/src/components/pages/AdditionalPurchases/pages/AddConsultation/index.tsx index 9887303..7e98855 100644 --- a/src/components/pages/AdditionalPurchases/pages/AddConsultation/index.tsx +++ b/src/components/pages/AdditionalPurchases/pages/AddConsultation/index.tsx @@ -5,93 +5,14 @@ import PaymentAddress from "../../components/PaymentAddress"; import FooterButton from "../../components/FooterButton"; import { useNavigate } from "react-router-dom"; import routes from "@/routes"; -import { useAuth } from "@/auth"; -import { SinglePayment, useApi, useApiCall } from "@/api"; -import { useSelector } from "react-redux"; -import { selectors } from "@/store"; -import { useCallback, useState } from "react"; -import { - ResponsePost, - ResponsePostExistPaymentData, -} from "@/api/resources/SinglePayment"; -import { createSinglePayment } from "@/services/singlePayment"; -import Modal from "@/components/Modal"; -import PaymentForm from "@/components/pages/PaymentWithEmailPage/PaymentForm"; -import { getPriceCentsToDollars } from "@/services/price"; -import Loader, { LoaderColor } from "@/components/Loader"; function AddConsultationPage() { const navigate = useNavigate(); - const { user: userFromStore } = useAuth(); - const api = useApi(); - const tokenFromStore = useSelector(selectors.selectToken); - const [isLoading, setIsLoading] = useState(false); - const [paymentIntent, setPaymentIntent] = useState< - ResponsePost | ResponsePostExistPaymentData | null - >(null); - const [isError, setIsError] = useState(false); - const returnUrl = `${window.location.protocol}//${ - window.location.host - }${routes.client.getInformationPartner()}`; - - const loadData = useCallback(async () => { - return await api.getSinglePaymentProducts({ token: tokenFromStore }); - }, [api, tokenFromStore]); - - const { data: products, isPending: isPendingProducts } = - useApiCall(loadData); - - const currentProduct = products?.find( - (product) => product.key === "main.unique.individual.consultation" - ); - - const handleClick = async () => { - if (!userFromStore || !currentProduct) return; - setIsLoading(true); - const paymentIntent = await createSinglePayment( - userFromStore, - currentProduct.productId, - tokenFromStore, - userFromStore.email, - userFromStore.profile.full_name, - userFromStore.profile.birthday, - returnUrl, - api - ); - setPaymentIntent(paymentIntent); - setIsLoading(false); - if ("payment" in paymentIntent) { - if (paymentIntent.payment.status === "paid") - return navigate(routes.client.getInformationPartner()); - return setIsError(true); - } - }; - - const handleClickSkip = () => { - navigate(routes.client.getInformationPartner()); + const handleNext = () => { + navigate(routes.client.home()); }; return (
- {!isLoading && - paymentIntent && - "paymentIntent" in paymentIntent && - !!tokenFromStore.length && ( - <> - setPaymentIntent(null)} - > - - {getPriceCentsToDollars(currentProduct?.amount || 0)}$ - - - - - )} More for you @@ -106,22 +27,11 @@ function AddConsultationPage() { This is a non-recuring payment.

- {isError && ( -

- Something went wrong. Please try again later. -

- )} - {isPendingProducts || isLoading ? ( - - ) : ( - "Get my consultation" - )} - + onClick={handleNext} + onClickSkip={handleNext} + children="Get my consultation" + />
); } diff --git a/src/components/pages/AdditionalPurchases/pages/AddConsultation/styles.module.css b/src/components/pages/AdditionalPurchases/pages/AddConsultation/styles.module.css index 3e6dc95..345f5a5 100644 --- a/src/components/pages/AdditionalPurchases/pages/AddConsultation/styles.module.css +++ b/src/components/pages/AdditionalPurchases/pages/AddConsultation/styles.module.css @@ -36,12 +36,3 @@ line-height: 140%; color: rgb(79, 79, 79); } - -.error { - max-width: 526px; - margin-left: auto; - margin-right: auto; - text-align: center; - font-size: 14px; - color: red; -} diff --git a/src/components/pages/AdditionalPurchases/pages/AddReport/index.tsx b/src/components/pages/AdditionalPurchases/pages/AddReport/index.tsx index a12d5f6..51b7fd5 100644 --- a/src/components/pages/AdditionalPurchases/pages/AddReport/index.tsx +++ b/src/components/pages/AdditionalPurchases/pages/AddReport/index.tsx @@ -3,102 +3,22 @@ import ThankYouBanner from "../../components/ThankYouBanner"; import styles from "./styles.module.css"; import { signUpOffers } from "@/data/additionalPurchases"; import SignUpOffer from "../../components/SignUpOffer"; -import { useCallback, useState } from "react"; +import { useState } from "react"; import { useNavigate } from "react-router-dom"; import FooterButton from "../../components/FooterButton"; import routes from "@/routes"; import PaymentAddress from "../../components/PaymentAddress"; -import { createSinglePayment } from "@/services/singlePayment"; -import { - ResponsePost, - ResponsePostExistPaymentData, -} from "@/api/resources/SinglePayment"; -import { useAuth } from "@/auth"; -import { useSelector } from "react-redux"; -import { selectors } from "@/store"; -import { SinglePayment, useApi, useApiCall } from "@/api"; -import Loader, { LoaderColor } from "@/components/Loader"; -import { getPriceCentsToDollars } from "@/services/price"; -import Modal from "@/components/Modal"; -import PaymentForm from "@/components/pages/PaymentWithEmailPage/PaymentForm"; function AddReportPage() { const navigate = useNavigate(); - const { user: userFromStore } = useAuth(); - const api = useApi(); - const tokenFromStore = useSelector(selectors.selectToken); - const [paymentIntent, setPaymentIntent] = useState< - ResponsePost | ResponsePostExistPaymentData | null - >(null); - const [isLoading, setIsLoading] = useState(false); - const [isError, setIsError] = useState(false); - const [activeOffer, setActiveOffer] = useState(signUpOffers[0]); - const returnUrl = `${window.location.protocol}//${ - window.location.host - }${routes.client.unlimitedReadings()}`; + const [activeOffer, setActiveOffer] = useState(signUpOffers[0].id); - const loadData = useCallback(async () => { - return await api.getSinglePaymentProducts({ token: tokenFromStore }); - }, [api, tokenFromStore]); - - const { data: products, isPending: isPendingProducts } = - useApiCall(loadData); - - const getCurrentProduct = (id: string) => { - return products?.find((product) => product.key === id) || null; - }; - - const handleClick = async () => { - if (!userFromStore || !activeOffer) return; - const currentProduct = getCurrentProduct(activeOffer?.productKey); - if (!currentProduct) return; - setIsLoading(true); - const paymentIntent = await createSinglePayment( - userFromStore, - currentProduct.productId, - tokenFromStore, - userFromStore.email, - userFromStore.profile.full_name, - userFromStore.profile.birthday, - returnUrl, - api - ); - setPaymentIntent(paymentIntent); - setIsLoading(false); - if ("payment" in paymentIntent) { - if (paymentIntent.payment.status === "paid") - return navigate(routes.client.unlimitedReadings()); - return setIsError(true); - } - }; - - const handleClickSkip = () => { + const handleClick = () => { navigate(routes.client.unlimitedReadings()); }; return (
- {!isLoading && - paymentIntent && - "paymentIntent" in paymentIntent && - !!tokenFromStore.length && ( - <> - setPaymentIntent(null)} - > - - {getPriceCentsToDollars(activeOffer.price.current || 0)}$ - - - - - )} - Choose your sign-up offer 🔥 @@ -107,33 +27,26 @@ function AddReportPage() { Available only now
- {!isPendingProducts && - signUpOffers.map((offer, index) => ( - setActiveOffer(offer)} - {...offer} - /> - ))} - {isPendingProducts && } + {signUpOffers.map((offer, index) => ( + setActiveOffer(offer.id)} + /> + ))}

*You will be charged for the add-on services or offers selected at the time of purchase. This is a non-recuring payment.

- {isError && ( -

- Something went wrong. Please try again later. -

- )} - - {isLoading ? : "Get my copy"} + + Get my copy
); diff --git a/src/components/pages/AdditionalPurchases/pages/AddReport/styles.module.css b/src/components/pages/AdditionalPurchases/pages/AddReport/styles.module.css index 74189f1..4aa5861 100644 --- a/src/components/pages/AdditionalPurchases/pages/AddReport/styles.module.css +++ b/src/components/pages/AdditionalPurchases/pages/AddReport/styles.module.css @@ -34,10 +34,6 @@ margin-bottom: 0; } -.modal-title { - margin-bottom: 16px; -} - .subtitle { font-size: 18px; text-align: center; @@ -60,7 +56,3 @@ margin-bottom: 20px; color: rgb(79, 79, 79); } - -.error { - color: red; -} diff --git a/src/components/pages/AdditionalPurchases/pages/UnlimitedReadings/index.tsx b/src/components/pages/AdditionalPurchases/pages/UnlimitedReadings/index.tsx index 0f1c22a..50e8db8 100644 --- a/src/components/pages/AdditionalPurchases/pages/UnlimitedReadings/index.tsx +++ b/src/components/pages/AdditionalPurchases/pages/UnlimitedReadings/index.tsx @@ -9,105 +9,26 @@ import SliderNextArrow from "../../components/SliderNextArrow"; import SliderPrevArrow from "../../components/SliderPrevArrow"; import routes from "@/routes"; import PaymentAddress from "../../components/PaymentAddress"; -import { useAuth } from "@/auth"; -import { SinglePayment, useApi, useApiCall } from "@/api"; -import { useSelector } from "react-redux"; -import { selectors } from "@/store"; -import { useCallback, useState } from "react"; -import { createSinglePayment } from "@/services/singlePayment"; -import Loader, { LoaderColor } from "@/components/Loader"; -import { - ResponsePost, - ResponsePostExistPaymentData, -} from "@/api/resources/SinglePayment"; -import Modal from "@/components/Modal"; -import { getPriceCentsToDollars } from "@/services/price"; -import PaymentForm from "@/components/pages/PaymentWithEmailPage/PaymentForm"; - -const sliderSettings = { - dots: false, - infinite: false, - speed: 500, - slidesToShow: 1, - slidesToScroll: 1, - className: styles["slider-container"], - nextArrow: , - prevArrow: , -}; function UnlimitedReadingsPage() { const navigate = useNavigate(); - const { user: userFromStore } = useAuth(); - const api = useApi(); - const tokenFromStore = useSelector(selectors.selectToken); - const [isLoading, setIsLoading] = useState(false); - const [paymentIntent, setPaymentIntent] = useState< - ResponsePost | ResponsePostExistPaymentData | null - >(null); - const [isError, setIsError] = useState(false); - const returnUrl = `${window.location.protocol}//${ - window.location.host - }${routes.client.addConsultation()}`; - - const loadData = useCallback(async () => { - return await api.getSinglePaymentProducts({ token: tokenFromStore }); - }, [api, tokenFromStore]); - - const { data: products, isPending: isPendingProducts } = - useApiCall(loadData); - - const currentProduct = products?.find( - (product) => product.key === "main.unlimited.readings" - ); - - const handleClick = async () => { - if (!userFromStore || !currentProduct) return; - setIsLoading(true); - const paymentIntent = await createSinglePayment( - userFromStore, - currentProduct.productId, - tokenFromStore, - userFromStore.email, - userFromStore.profile.full_name, - userFromStore.profile.birthday, - returnUrl, - api - ); - setPaymentIntent(paymentIntent); - setIsLoading(false); - if ("payment" in paymentIntent) { - if (paymentIntent.payment.status === "paid") - return navigate(routes.client.addConsultation()); - return setIsError(true); - } + const handleClick = () => { + navigate(routes.client.addConsultation()); }; - const handleClickSkip = () => { - navigate(routes.client.addConsultation()); + const sliderSettings = { + dots: false, + infinite: false, + speed: 500, + slidesToShow: 1, + slidesToScroll: 1, + className: styles["slider-container"], + nextArrow: , + prevArrow: , }; return (
- {!isLoading && - paymentIntent && - "paymentIntent" in paymentIntent && - !!tokenFromStore.length && ( - <> - setPaymentIntent(null)} - > - - {getPriceCentsToDollars(currentProduct?.amount || 0)}$ - - - - - )}
@@ -133,24 +54,14 @@ function UnlimitedReadingsPage() { ))} - {isError && ( -

- Something went wrong. Please try again later. -

- )} - {isPendingProducts || isLoading ? ( - - ) : ( - "Add unlimited readings" - )} + Add unlimited readings

Please note: In addition to your subscription, your account will be diff --git a/src/components/pages/AdditionalPurchases/pages/UnlimitedReadings/styles.module.css b/src/components/pages/AdditionalPurchases/pages/UnlimitedReadings/styles.module.css index af671a5..271d6e7 100644 --- a/src/components/pages/AdditionalPurchases/pages/UnlimitedReadings/styles.module.css +++ b/src/components/pages/AdditionalPurchases/pages/UnlimitedReadings/styles.module.css @@ -82,12 +82,3 @@ height: 189px; object-fit: contain; } - -.error { - max-width: 526px; - margin-left: auto; - margin-right: auto; - text-align: center; - font-size: 14px; - color: red; -} diff --git a/src/components/pages/GetInformationPartner/index.tsx b/src/components/pages/GetInformationPartner/index.tsx deleted file mode 100644 index 53e8454..0000000 --- a/src/components/pages/GetInformationPartner/index.tsx +++ /dev/null @@ -1,56 +0,0 @@ -import Title from "@/components/Title"; -import styles from "./styles.module.css"; -import MainButton from "@/components/MainButton"; -import { useNavigate } from "react-router-dom"; -import routes from "@/routes"; - -function GetInformationPartnerPage() { - const navigate = useNavigate(); - - const handleBack = () => { - navigate(routes.client.addConsultation()); - }; - - const handleNext = () => { - navigate(routes.client.home()); - }; - - return ( -

- - - AURA - -
- - Wonderful! Let's find out what's working (and what isn't) and go from - there. - -

- Now we need some information about Your Partner's Profile to create - the astrological synastry blueprint between you and your partner. -

-
- - Back - - - Next - -
-
-
- ); -} - -export default GetInformationPartnerPage; diff --git a/src/components/pages/GetInformationPartner/styles.module.css b/src/components/pages/GetInformationPartner/styles.module.css deleted file mode 100644 index c934d6d..0000000 --- a/src/components/pages/GetInformationPartner/styles.module.css +++ /dev/null @@ -1,64 +0,0 @@ -.page { - background-color: #171717; - height: fit-content; - min-height: 100dvh; - color: #fff; - display: flex; - flex-direction: column; - align-items: center; - justify-content: space-between; -} - -.title { - margin-top: 58px; - z-index: 1; -} - -.buttons-container { - display: flex; - flex-direction: row; - align-items: center; - gap: 8px; - margin-top: 32px; -} - -.button { - min-width: 0; - min-height: 0; - width: 160px; - border-radius: 8px; -} - -.back-button { - background-color: transparent; - border: 2px solid #fff; -} - -.next-button { - background-color: #fff; - color: #000; -} - -.bottom-container { - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - text-align: center; - margin-bottom: 170px; - z-index: 1; -} - -.description { - line-height: 140%; -} - -.background-video { - position: fixed; - height: 100%; - width: 100%; - float: left; - top: 0; - padding: 0; - object-fit: cover; -} diff --git a/src/components/pages/PaymentWithEmailPage/index.tsx b/src/components/pages/PaymentWithEmailPage/index.tsx index 5dc148b..2266769 100644 --- a/src/components/pages/PaymentWithEmailPage/index.tsx +++ b/src/components/pages/PaymentWithEmailPage/index.tsx @@ -12,6 +12,7 @@ import { getClientTimezone } from "@/locales"; import ErrorText from "@/components/ErrorText"; import Title from "@/components/Title"; import NameInput from "@/components/EmailEnterPage/NameInput"; +import { getZodiacSignByDate } from "@/services/zodiac-sign"; import { ResponseGet, ResponsePost, @@ -21,7 +22,7 @@ import { useNavigate } from "react-router-dom"; import routes from "@/routes"; import PaymentForm from "./PaymentForm"; import { getPriceCentsToDollars } from "@/services/price"; -import { createSinglePayment } from "@/services/singlePayment"; +import { User } from "@/api/resources/User"; function PaymentWithEmailPage() { const { t, i18n } = useTranslation(); @@ -174,10 +175,7 @@ function PaymentWithEmailPage() { productId, token, email, - name, - birthday, - returnUrl, - api + name ); setPaymentIntent(paymentIntent); setIsLoading(false); @@ -206,10 +204,7 @@ function PaymentWithEmailPage() { productId, tokenFromStore, userFromStore.email, - userFromStore.profile.full_name, - userFromStore.profile.birthday, - returnUrl, - api + userFromStore.profile.full_name ); setPaymentIntent(paymentIntent); setIsLoadingPage(false); diff --git a/src/data/additionalPurchases.ts b/src/data/additionalPurchases.ts index 730b6c1..c21cc51 100644 --- a/src/data/additionalPurchases.ts +++ b/src/data/additionalPurchases.ts @@ -37,7 +37,6 @@ export interface ISignUpOffer { id: string; title: string; subtitle?: string; - productKey: string; price: ISignUpOfferPrice; emoji: string; } @@ -48,44 +47,40 @@ export const signUpOffers: ISignUpOffer[] = [ title: "ULTRA PACK", subtitle: "(3 in 1 + 2 secret bonus reading)", price: { - current: 4999, - old: 9999, + current: 49.99, + old: 99.99, discount: 50, }, - productKey: "main.ultra.pack", emoji: "star_struck.png", }, { id: "numerology-analyses", title: "NUMEROLOGY ANALYSIS", price: { - current: 1499, - old: 2999, + current: 14.99, + old: 29.99, discount: 50, }, - productKey: "main.numerology.analysis", emoji: "input_numbers.png", }, { id: "tarot-reading", title: "TAROT READING", price: { - current: 1999, - old: 3499, + current: 19.99, + old: 34.99, discount: 45, }, - productKey: "main.tarot.reading", emoji: "sunset.png", }, { id: "palmistry-guide", title: "PALMISTRY GUIDE", price: { - current: 1999, - old: 2999, + current: 19.99, + old: 29.99, discount: 30, }, - productKey: "main.palmistry.guide", emoji: "rised_hand.png", }, ]; diff --git a/src/routes.ts b/src/routes.ts index d94e926..efb882f 100755 --- a/src/routes.ts +++ b/src/routes.ts @@ -4,10 +4,7 @@ const isProduction = import.meta.env.MODE === "production"; const host = ""; export const apiHost = "https://api-web.aura.wit.life"; -const dApiHost = isProduction - ? "https://d.api.witapps.us" - : "https://dev.api.witapps.us"; -// const dApiHost = "https://d.api.witapps.us"; +const dApiHost = isProduction ? "https://d.api.witapps.us" : "https://dev.api.witapps.us" const siteHost = "https://aura.wit.life"; const prefix = "api/v1"; const openAIHost = " https://api.openai.com"; @@ -41,8 +38,7 @@ const routes = { palmistryPaywall: () => [host, "palmistry", "paywall"].join("/"), palmistryPayment: () => [host, "palmistry", "payment"].join("/"), palmistryDiscount: () => [host, "palmistry", "discount"].join("/"), - palmistryPremiumBundle: () => - [host, "palmistry", "premium-bundle"].join("/"), + palmistryPremiumBundle: () => [host, "palmistry", "premium-bundle"].join("/"), birthday: () => [host, "birthday"].join("/"), didYouKnow: () => [host, "did-you-know"].join("/"), freePeriodInfo: () => [host, "free-period"].join("/"), @@ -132,8 +128,6 @@ const routes = { epeSuccessPayment: () => [host, "epe", "success-payment"].join("/"), epeFailPayment: () => [host, "epe", "fail-payment"].join("/"), - getInformationPartner: () => [host, "get-information-partner"].join("/"), - notFound: () => [host, "404"].join("/"), }, server: { @@ -317,7 +311,6 @@ export const withoutFooterRoutes = [ routes.client.addConsultation(), routes.client.advisors(), routes.client.epeSuccessPayment(), - routes.client.getInformationPartner(), ]; export const withoutFooterPartOfRoutes = [ @@ -392,7 +385,6 @@ export const withoutHeaderRoutes = [ routes.client.tryApp(), routes.client.advisors(), routes.client.epeSuccessPayment(), - routes.client.getInformationPartner(), ]; export const hasNoHeader = (path: string) => { let result = true; diff --git a/src/services/singlePayment/index.ts b/src/services/singlePayment/index.ts deleted file mode 100644 index ea7953c..0000000 --- a/src/services/singlePayment/index.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { User } from "@/api/resources/User"; -import { getZodiacSignByDate } from "../zodiac-sign"; -import { ApiContextValue } from "@/api"; - -export const createSinglePayment = async ( - user: User, - productId: string, - token: string, - email: string, - name: string | null, - birthday: string | null, - returnUrl: string, - api: ApiContextValue -) => { - return await api.createSinglePayment({ - token, - data: { - user: { - id: `${user?.id}`, - email, - name: name || "", - sign: user?.profile?.sign?.sign || getZodiacSignByDate(birthday || ""), - age: user?.profile?.age?.years || 1, - }, - partner: { - sign: "partner_cancer", - age: 26, - }, - paymentInfo: { - productId, - }, - return_url: returnUrl, - }, - }); -};