diff --git a/src/components/CompatibilityV2/pages/Payment/index.tsx b/src/components/CompatibilityV2/pages/Payment/index.tsx
index dd13431..bcfd280 100644
--- a/src/components/CompatibilityV2/pages/Payment/index.tsx
+++ b/src/components/CompatibilityV2/pages/Payment/index.tsx
@@ -11,14 +11,10 @@ import Stars from "../../components/Stars";
import { usePaywall } from "@/hooks/paywall/usePaywall";
import { EPlacementKeys } from "@/api/resources/Paywall";
import { useNavigate } from "react-router-dom";
-import { useEffect, useState } from "react";
+import { useEffect } from "react";
import routes from "@/routes";
-import PaymentModal from "@/components/Payment/PaymentModal";
-import PaymentForm from "@/components/Payment/nmi/PaymentForm";
-import Toast from "@/components/pages/ABDesign/v1/components/Toast";
-import metricService, { EGoals, EMetrics } from "@/services/metric/metricService";
-const placementKey = EPlacementKeys['aura.placement.compatibility.v2'];
+// const placementKey = EPlacementKeys['aura.placement.compatibility.v2'];
function Payment() {
const navigate = useNavigate();
@@ -34,63 +30,64 @@ function Payment() {
// const isShowPaymentModal = useSelector(
// selectors.selectCompatibilityV2IsShowPaymentModalV1
// );
- const [isPaymentSuccess, setIsPaymentSuccess] = useState(false);
- const [isPaymentError, setIsPaymentError] = useState(false);
- const [isPaymentModalOpen, setIsPaymentModalOpen] = useState(false);
+ // const [isPaymentSuccess, setIsPaymentSuccess] = useState(false);
+ // const [isPaymentError, setIsPaymentError] = useState(false);
+ // const [isPaymentModalOpen, setIsPaymentModalOpen] = useState(false);
- const onPaymentError = (error?: string) => {
- setIsPaymentError(true);
- if (error === "Product not found") {
- return navigate(routes.client.compatibilityV2TrialChoice());
- }
- metricService.reachGoal(EGoals.PAYMENT_ERROR, [EMetrics.YANDEX, EMetrics.KLAVIYO]);
- }
+ // const onPaymentError = (error?: string) => {
+ // setIsPaymentError(true);
+ // if (error === "Product not found") {
+ // return navigate(routes.client.compatibilityV2TrialChoice());
+ // }
+ // metricService.reachGoal(EGoals.PAYMENT_ERROR, [EMetrics.YANDEX, EMetrics.KLAVIYO]);
+ // }
- const onPaymentSuccess = () => {
- setIsPaymentSuccess(true);
- // metricService.reachGoal(EGoals.PAYMENT_SUCCESS);
- // if (activeProductFromStore) {
- // metricService.reachGoal(EGoals.PURCHASE, [EMetrics.FACEBOOK], {
- // currency: "USD",
- // value: ((activeProductFromStore.trialPrice || 100) / 100).toFixed(2),
- // });
- // }
+ // const onPaymentSuccess = () => {
+ // setIsPaymentSuccess(true);
+ // // metricService.reachGoal(EGoals.PAYMENT_SUCCESS);
+ // // if (activeProductFromStore) {
+ // // metricService.reachGoal(EGoals.PURCHASE, [EMetrics.FACEBOOK], {
+ // // currency: "USD",
+ // // value: ((activeProductFromStore.trialPrice || 100) / 100).toFixed(2),
+ // // });
+ // // }
- metricService.reachGoal(EGoals.PAYMENT_SUCCESS, [EMetrics.YANDEX, EMetrics.KLAVIYO]);
- metricService.reachGoal(EGoals.PURCHASE, [EMetrics.FACEBOOK], {
- currency: "USD",
- value: ((activeProductFromStore?.trialPrice || 100) / 100).toFixed(2),
- });
- setTimeout(() => {
- navigate(routes.client.compatibilityV2SkipTrial());
- }, 1500);
- }
+ // metricService.reachGoal(EGoals.PAYMENT_SUCCESS, [EMetrics.YANDEX, EMetrics.KLAVIYO]);
+ // metricService.reachGoal(EGoals.PURCHASE, [EMetrics.FACEBOOK], {
+ // currency: "USD",
+ // value: ((activeProductFromStore?.trialPrice || 100) / 100).toFixed(2),
+ // });
+ // setTimeout(() => {
+ // navigate(routes.client.compatibilityV2SkipTrial());
+ // }, 1500);
+ // }
- const onModalClosed = () => {
- setIsPaymentModalOpen(false);
- navigate(routes.client.compatibilityV2SaveOff());
- }
+ // const onModalClosed = () => {
+ // setIsPaymentModalOpen(false);
+ // navigate(routes.client.compatibilityV2SaveOff());
+ // }
- const showModal = () => {
+ const handlePayment = () => {
// dispatch(actions.compatibilityV2.setIsShowPaymentModalV1(true));
- metricService.reachGoal(EGoals.PAYMENT_METHODS_OPENED, [EMetrics.YANDEX, EMetrics.KLAVIYO]);
- metricService.reachGoal(EGoals.AURA_PAYMENT_METHODS_OPENED, [EMetrics.KLAVIYO]);
- setIsPaymentModalOpen(true);
+ // metricService.reachGoal(EGoals.PAYMENT_METHODS_OPENED, [EMetrics.YANDEX, EMetrics.KLAVIYO]);
+ // metricService.reachGoal(EGoals.AURA_PAYMENT_METHODS_OPENED, [EMetrics.KLAVIYO]);
+ // setIsPaymentModalOpen(true);
+ navigate(routes.client.compatibilityV2PaymentModal());
};
- useEffect(() => {
- window.onpopstate = function (_event) {
- if (document.location.toString() === `${window.location.origin}${routes.client.compatibilityV2TrialPayment()}`) {
- return navigate(routes.client.compatibilityV2SaveOff());
- }
- };
- return () => {
- setTimeout(() => {
- window.onpopstate = null;
- }, 0);
- };
+ // useEffect(() => {
+ // window.onpopstate = function (_event) {
+ // if (document.location.toString() === `${window.location.origin}${routes.client.compatibilityV2TrialPayment()}`) {
+ // return navigate(routes.client.compatibilityV2SaveOff());
+ // }
+ // };
+ // return () => {
+ // setTimeout(() => {
+ // window.onpopstate = null;
+ // }, 0);
+ // };
- }, [])
+ // }, [])
useEffect(() => {
if (!products.length) return;
@@ -102,13 +99,13 @@ function Payment() {
return (
<>
-
{translate("/payment.app_number_one", { @@ -153,11 +150,11 @@ function Payment() {