Skip to content

Latest commit

 

History

History

Airwallex Payment Elements - CDN Demo

This directory contains an implementation of Airwallex Payment Element using static html files. The HTML files are served using Serve.

Requirements

  • node.js
  • npm or yarn package manager

Installation and Development

  1. Clone the root airwallex-payment-demo project to your local machine

git clone https://github.com/airwallex/airwallex-payment-demo

  1. Navigate into the react directory with cd integrations/cdn

  2. Install the package with yarn or npm install

  3. Run the project in development mode with npm start or yarn start. See the project at localhost:5000

Usage

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';

Authors

Charlie Lang, Josie Ku, and Shirly Chen