From 2cb70cb7b3b61f33ae617aef086c9eb5c1fe24a8 Mon Sep 17 00:00:00 2001 From: mpn <123456> Date: Sun, 10 Mar 2024 11:17:48 +0330 Subject: [PATCH] fix payment and herosectiom --- .env.production | 8 ++++---- components/AppsComponent/CheckoutData/page.jsx | 16 +++++++++------- components/LandingPage/HeroSection/page.jsx | 16 ++++++++-------- next.config.js | 4 ++-- 4 files changed, 23 insertions(+), 21 deletions(-) diff --git a/.env.production b/.env.production index b24605b..163dabf 100644 --- a/.env.production +++ b/.env.production @@ -1,7 +1,7 @@ NODE_ENV="production" -NEXT_PUBLIC_SERVER_URL=https://api.vesmook.com -NEXT_PUBLIC_PUBLIC_URL=https://api.vesmook.com -NEXT_PUBLIC_API_URL=https://api.vesmook.com/api -NEXT_PUBLIC_STORAGE_URL=http://storage.vesmook.com +NEXT_PUBLIC_SERVER_URL=https://api.vesmeh.com +NEXT_PUBLIC_PUBLIC_URL=https://api.vesmeh.com +NEXT_PUBLIC_API_URL=https://api.vesmeh.com/api +NEXT_PUBLIC_STORAGE_URL=http://storage.vesmeh.com NEXT_PUBLIC_PACKAGE_VERSION=0.1.9 \ No newline at end of file diff --git a/components/AppsComponent/CheckoutData/page.jsx b/components/AppsComponent/CheckoutData/page.jsx index 6ef132f..a02c0a8 100644 --- a/components/AppsComponent/CheckoutData/page.jsx +++ b/components/AppsComponent/CheckoutData/page.jsx @@ -83,16 +83,18 @@ const CheckoutData = () => { }; const handleGoPayment = async () => { - const token = localStorage.getItem("token"); + const token = localStorage.getItem("token").slice(7); + + console.log(token); try { const data = await Chapar.post( - `${process.env.NEXT_PUBLIC_API_URL}/order/bag/payment/${checkOutData?.id}?paymentMethod=1`, + `${process.env.NEXT_PUBLIC_API_URL}/order/bag/payment/${checkOutData?.id}?paymentMethod=1&asccess_token=${token}` - { - headers: { - Authorization: token, - }, - } + // { + // headers: { + // Authorization: token, + // }, + // } ); router.push(data?.paymentUrl); diff --git a/components/LandingPage/HeroSection/page.jsx b/components/LandingPage/HeroSection/page.jsx index b714d47..93267b0 100644 --- a/components/LandingPage/HeroSection/page.jsx +++ b/components/LandingPage/HeroSection/page.jsx @@ -25,7 +25,7 @@ const HeroSection = () => { >