Skip to content

Commit

Permalink
fixed adv flow. adjusted readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ribeiroguilherme committed Sep 23, 2024
1 parent b83ee8c commit a6fcfe9
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 15 deletions.
17 changes: 7 additions & 10 deletions examples/nuxt/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,17 @@
### Steps to run the project:

1. Install the project dependencies: `npm install`
2. Edit the `nuxt.config.ts` file and add there your account details:
2. Create the `.env` file and add there your account details:

Example:

```
runtimeConfig: {
apiKey: 'AQEthmfxKo7Mb...',
apiVersion: 'v71',
merchantAccount: 'TestMerchant...',
# SERVER
NUXT_CHECKOUT_API_KEY=AQEthmff3VfI5eG...
NUXT_API_VERSION=v71
NUXT_MERCHANT_ACCOUNT=TestMerchant...
public: {
clientKey: 'test_L6HTEOAXQBCZ...'
}
}
# CLIENT
NUXT_PUBLIC_CLIENT_KEY=test_L6HTEOAXQB...
```

3. Run `npm run dev`. The web app will be running on `http://localhost:3000`
Expand Down
2 changes: 1 addition & 1 deletion examples/nuxt/server/api/paymentDetails.post.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default defineEventHandler(async event => {
headers: {
'Access-Control-Allow-Origin': '*',
'Content-Type': 'application/json',
'X-Api-Key': config.apiKey
'X-Api-Key': config.checkoutApiKey
}
});

Expand Down
2 changes: 1 addition & 1 deletion examples/nuxt/server/api/paymentMethods.post.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default defineEventHandler(async event => {
headers: {
'Access-Control-Allow-Origin': '*',
'Content-Type': 'application/json',
'X-Api-Key': config.apiKey
'X-Api-Key': config.checkoutApiKey
}
});

Expand Down
2 changes: 1 addition & 1 deletion examples/nuxt/server/api/payments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default defineEventHandler(async event => {
headers: {
'Access-Control-Allow-Origin': '*',
'Content-Type': 'application/json',
'X-Api-Key': config.apiKey
'X-Api-Key': config.checkoutApiKey
}
});

Expand Down
3 changes: 1 addition & 2 deletions examples/nuxt/server/api/session.post.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,5 @@ export default defineEventHandler(async event => {
}
});

const data = await response.json();
return data;
return await response.json();
});

0 comments on commit a6fcfe9

Please sign in to comment.