UNPKG

airwallex-payment-elements

Version:

[![Version](https://img.shields.io/npm/v/airwallex-payment-elements.svg)](https://www.npmjs.org/package/airwallex-payment-elements) [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://git

100 lines (95 loc) 2.48 kB
export * from './cardNumber'; export * from './element'; export * from './qrcodeElement'; export * from './fraud'; export * from './redirectElement'; export * from './dropInElement'; import Airwallex, { init, AirwallexEnv, redirectToCheckout, createElement, destroyElement, getElement, confirmPaymentIntent, confirmPaymentIntentWithSavedCard, createPaymentMethod, PaymentConsentRequest, PaymentConsentRequestData, PaymentMethodRequestData, PaymentConsentResponse, createPaymentConsent, getPaymentIntent, PaymentMethod, Address, InitOptions, FontOptions, HppTheme, HostPaymentPage, Mode, RecurringOptions, Consent, ElementTypeMap, Locale, Billing, VerifyConsentRequest, CreatePaymentMethodRequest, } from './airwallex'; export { init, AirwallexEnv, Mode, redirectToCheckout, createElement, destroyElement, getElement, confirmPaymentIntent, confirmPaymentIntentWithSavedCard, createPaymentMethod, PaymentConsentRequest, PaymentConsentRequestData, PaymentMethodRequestData, PaymentConsentResponse, createPaymentConsent, getPaymentIntent, PaymentMethod, Address, InitOptions, FontOptions, HppTheme, HostPaymentPage, RecurringOptions, Consent, Locale, Billing, ElementTypeMap, VerifyConsentRequest, CreatePaymentMethodRequest, }; /** * Element integration `step #1` * For integration using `yarn add` or `npm install` the very beginning step method to load all element stuff * * An equal step for using UMD build in your HTML: * ```html * <script src="https://checkout.airwallex.com/assets/bundle.0.0.79.min.js"></script> * ``` * * For element integration there are ***4*** steps in total, the remain steps are * * 2. integrate with `createElement` function in this package to create element on demand * * 3. using element create from #2 to mount on your dom by call `element.mount` function * * 4. collect non-pci fields (i.e billing, card name etc, except card number, cvc, expiry) and integrate with `confirmPaymentIntent` in this package * * After integrate with above 4 steps, you can listen on the event define by interface `ElementEvent` for user interaction. * */ export declare const loadAirwallex: (options?: InitOptions | undefined) => Promise<Airwallex | null>; /** * Global Airwallex const be created after loadAirwallex, you can use all supported methods of `window.Airwallex` */ export interface Window { Airwallex?: Airwallex; }