This directory contains the React implementation of Airwallex Payment Element.
- node.js
npm
oryarn
package manager
- Clone the root airwallex-payment-demo project to your local machine
git clone https://github.com/airwallex/airwallex-payment-demo
-
Navigate into the react directory with
cd integrations/react
-
Install the package with
yarn
ornpm install
-
Run the project in development mode with
yarn start
. See the project at localhost:3000
Each of the payment methods are written as a separate component found in the /src/components folder.
To test each of the payment methods, be sure to replace the intent_id
and client_secret
variables at the top of each file with your own unique keys. These values can be created with the backend API integration with PaymentIntent.
const intent_id = 'replace-with-your-intent-id';
const client_secret = 'replace-with-your-client-secret';
Roy Yang and Josie Ku