Skip to content

Commit

Permalink
upd: paypal commented
Browse files Browse the repository at this point in the history
  • Loading branch information
nicitaacom committed Apr 28, 2024
1 parent 8960443 commit 97cadb9
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 97cadb9

Please sign in to comment.