Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation Error: Incorrect Code Example in Hosted Payment Page Docs #141

Open
cutsin opened this issue Jan 22, 2025 · 1 comment
Open
Assignees
Labels
bug Something isn't working

Comments

@cutsin
Copy link

cutsin commented Jan 22, 2025

Description:
There is a mistake in the code example provided in the Hosted Payment Page documentation:
https://www.airwallex.com/docs/js/payments/hosted-payment-page/.

The code refers to payment, but it should be payments.

Correct example:

import { init } from '@airwallex/components-sdk';

const { payments } = await init({
  env: 'demo', // Choose the Airwallex environment ('demo' or 'prod')
  enabledElements: ['payments'],
});
payments.redirectToCheckout({
  intent_id: 'replace-with-your-intent-id',
  client_secret: 'replace-with-your-client-secret',
  currency: 'replace-with-your-currency',
  country_code: 'replace-with-your-country-code',
});

Please update the documentation to prevent confusion for other developers. Thank you!

@cutsin cutsin added the bug Something isn't working label Jan 22, 2025
@shirly-chen-awx
Copy link
Contributor

@cutsin Thanks for the correction! We will update it soon.

@shirly-chen-awx shirly-chen-awx self-assigned this Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants