diff --git a/src/components/palmistry/discount-screen/discount-screen.tsx b/src/components/palmistry/discount-screen/discount-screen.tsx index 5906974..7986465 100644 --- a/src/components/palmistry/discount-screen/discount-screen.tsx +++ b/src/components/palmistry/discount-screen/discount-screen.tsx @@ -13,7 +13,8 @@ import { useAuth } from "@/auth"; import HeaderLogo from '@/components/palmistry/header-logo/header-logo'; import CheckoutForm from "@/components/PaymentPage/methods/Stripe/CheckoutForm"; -const currentProductId = "prod_PkXPacpzM8jSmE"; +const currentProductKey = "skip.trial.subscription.aura"; +const returnUrl = `${window.location.host}/palmistry/premium-bundle`; export default function DiscountScreen() { const navigate = useNavigate(); @@ -48,7 +49,7 @@ export default function DiscountScreen() { (async () => { const products = await api.getSinglePaymentProducts({ token }); - const product = products.find((product) => product.productId === currentProductId); + const product = products.find((product) => product.key === currentProductKey); if (product) { setProductId(product.productId); @@ -82,7 +83,7 @@ export default function DiscountScreen() { paymentInfo: { productId, }, - return_url: `${window.location.host}/palmistry/premium-bundle`, + return_url: returnUrl, }, }); @@ -149,7 +150,7 @@ export default function DiscountScreen() { {stripePromise && clientSecret && (
- + {isSuccess && ( 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 b2e85c6..f030979 100644 --- a/src/components/palmistry/premium-bundle-screen/premium-bundle-screen.tsx +++ b/src/components/palmistry/premium-bundle-screen/premium-bundle-screen.tsx @@ -12,7 +12,8 @@ import { useApi } from '@/api'; import { useAuth } from "@/auth"; import CheckoutForm from "@/components/PaymentPage/methods/Stripe/CheckoutForm"; -const currentProductId = "prod_PkXPacpzM8jSmE"; +const currentProductKey = "premium.bundle.aura"; +const returnUrl = window.location.host; export default function PremiumBundleScreen() { const navigate = useNavigate(); @@ -29,7 +30,7 @@ export default function PremiumBundleScreen() { (async () => { const products = await api.getSinglePaymentProducts({ token }); - const product = products.find((product) => product.productId === currentProductId); + const product = products.find((product) => product.key === currentProductKey); if (product) { setProductId(product.productId); @@ -63,7 +64,7 @@ export default function PremiumBundleScreen() { paymentInfo: { productId, }, - return_url: `${window.location.host}/palmistry/premium-bundle`, + return_url: returnUrl, }, }); @@ -215,7 +216,7 @@ export default function PremiumBundleScreen() { {stripePromise && clientSecret && (
- + {isSuccess && (