Skip to content

Commit

Permalink
Refactor payment process in checkout.vue
Browse files Browse the repository at this point in the history
  • Loading branch information
scottyzen committed Mar 14, 2024
1 parent dbbbf36 commit 567d5d1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions woonuxt_base/pages/checkout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const payNow = async () => {
const headers = { 'Content-Type': 'application/json' };
// createPaymentIntent
const { client_secret } = await fetch('/api/stripe', {
const all = await fetch('/api/stripe', {
method: 'POST',
headers,
body: JSON.stringify({
Expand All @@ -55,7 +55,7 @@ const payNow = async () => {
console.log({ all });
// confirmPayment
const data = await elms.value.instance.confirmCardPayment(client_secret, {
const data = await elms.value.instance.confirmCardPayment(all.client_secret, {
payment_method: {
card: cardElement,
},
Expand Down

0 comments on commit 567d5d1

Please sign in to comment.