From 97cadb940995a2266fa7f2b46acbfbb5be27b6ec Mon Sep 17 00:00:00 2001 From: Nikita Date: Sun, 28 Apr 2024 12:16:18 +0200 Subject: [PATCH] upd: paypal commented --- .../components/PayWithPaypalButton.tsx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/app/components/ui/Modals/CartModal/PaymentButtons/components/PayWithPaypalButton.tsx b/app/components/ui/Modals/CartModal/PaymentButtons/components/PayWithPaypalButton.tsx index 186bad7..cde910d 100644 --- a/app/components/ui/Modals/CartModal/PaymentButtons/components/PayWithPaypalButton.tsx +++ b/app/components/ui/Modals/CartModal/PaymentButtons/components/PayWithPaypalButton.tsx @@ -41,12 +41,15 @@ export function PayWithPaypalButton() { 10000, ) } else { - const payPalResponse = await axios.post("/api/create-paypal-session", { - payPalProductsQuery, - email: userStore.email, - } as TPayPalProductsQuery) + console.log(44, "payPalProductsQuery - ", payPalProductsQuery) + console.log(45, "email - ", userStore.email) + // const payPalResponse = await axios.post("/api/create-paypal-session", { + // payPalProductsQuery, + // email: userStore.email, + // } as TPayPalProductsQuery) + //redirect user to session.url on client side to avoid 'blocked by CORS' error - router.push(payPalResponse.data) + // router.push(payPalResponse.data) } } catch (error) { if (error instanceof AxiosError) {