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

46 lines (41 loc) 1.39 kB
import { Intent } from './cardNumber'; import { CSSProperties } from './element'; /** * All payment method options for qrcode element, those payment method type integration will render qrcode from your checkout site to specific provider’s authentication page. */ export type PaymentMethodWithQrcode = 'alipayhk' | 'kakaopay' | 'wechatpay' | 'fps'; /** * Apply to qrcode element type integration, interface used when call createElement with type `qrcode` */ export interface QrcodeElementPaymentOptions { /** * The payment intent you would like to checkout * Refer to [Airwallex Client API](https://www.airwallex.com/docs/api#/Payment_Acceptance/Payment_Intents/) * */ /** * @deprecated Please use {@link intent_id} and {@link client_secret} instead. */ intent?: Intent; qrcodeMethod?: PaymentMethodWithQrcode; intent_id: string; client_secret: string; mode: 'payment'; /** * Box style for the QRcode element. */ style?: CSSProperties; } export interface QrcodeElementRecurringOptions { mode: 'recurring'; client_secret: string; currency: string; customer_id: string; qrcodeMethod: 'wechatpay'; merchant_trigger_reason?: 'scheduled' | 'unscheduled'; /** * Box style for the QRcode element. */ style?: CSSProperties; } export type QrcodeElementOptions = QrcodeElementPaymentOptions | QrcodeElementRecurringOptions;