This directory contains an implementation of Airwallex Payment Element using static html files. The HTML files are served using Serve.
- 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/cdn
-
Install the package with
yarn
ornpm install
-
Run the project in development mode with
npm start
oryarn start
. See the project at localhost:5000
Each of the payment methods are written as a separate html file found in /integrations/cdn folder.
<!-- STEP #1: Import airwallex-payment-elements bundle -->
<script src="https://checkout.airwallex.com/assets/elements.bundle.min.js"></script>
Also, to test each of the payment methods, be sure to replace the intent_id
and client_secret
variables in the 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';
Charlie Lang, Josie Ku, and Shirly Chen