Socket
Socket
Sign inDemoInstall

airwallex-payment-elements

Package Overview
Dependencies
1
Maintainers
2
Versions
161
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.2 to 0.1.4

4

lib/bin/airwallex.cjs.js

@@ -1,4 +0,4 @@

/* Airwallex Checkout Component Version [0.1.2] */
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const e={prod:"checkout.airwallex.com",demo:"checkout-demo.airwallex.com",staging:"checkout-staging.airwallex.com",qa:"checkoutui.qa.awx.im",preview:"checkoutui.preview.awx.im",dev:"localhost:3000"},r=r=>"https://"+(e[r]||"checkout.airwallex.com"),o=`/assets/bundle.${[0,1,2].join(".")}.min.js`;exports.confirmPaymentIntent=async e=>{if(window.Airwallex)return window.Airwallex.confirmPaymentIntent(e);{const e="Please loadAirwallex() before confirmPaymentIntent();";throw console.error(e),new Error(e)}},exports.createElement=(e,r)=>window.Airwallex?window.Airwallex.createElement(e,r):(console.error("Please loadAirwallex() before createElement();"),null),exports.createPaymentMethod=async(e,r)=>{if(window.Airwallex)return window.Airwallex.createPaymentMethod(e,r);{const e="Please loadAirwallex() before createPaymentMethod();";throw console.error(e),new Error(e)}},exports.destroyElement=e=>window.Airwallex?window.Airwallex.destroyElement(e):(console.error("Please loadAirwallex() before destroyElement();"),!1),exports.getElement=e=>window.Airwallex?window.Airwallex.getElement(e):(console.error("Please loadAirwallex() before getElement();"),null),exports.getGatewayUrl=r,exports.getPaymentIntent=async(e,r)=>{if(window.Airwallex)return window.Airwallex.getPaymentIntent(e,r);{const e="Please loadAirwallex() before getPaymentIntent();";throw console.error(e),new Error(e)}},exports.init=e=>{window.Airwallex?window.Airwallex.init(e):console.error("Please loadAirwallex() before init();")},exports.loadAirwallex=e=>Promise.resolve().then(()=>{if("undefined"==typeof window)return null;if(window.Airwallex)return window.Airwallex;const l=document.querySelector(`script[src="${o}"], script[src="${o}/"]`)||(e=>{const r=document.createElement("script");r.src=`${e}${o}`;const l=document.head||document.body;if(!l)throw new Error("Airwallex payment scripts requires a <head> or <body> html element in order to be loaded.");return l.appendChild(r),r})(r((null==e?void 0:e.env)||"prod"));return new Promise((r,o)=>{l.addEventListener("load",()=>{window.Airwallex?(window.Airwallex.init(e),r(window.Airwallex)):o(new Error("Failed to load Airwallex on load event"))}),l.addEventListener("error",()=>{o(new Error("Failed to load Airwallex scripts"))})})}),exports.redirectToCheckout=e=>{window.Airwallex?window.Airwallex.redirectToCheckout(e):console.error("Please loadAirwallex() before redirectToCheckout();")};
/* Airwallex Checkout Component Version [0.1.4] */
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const e={prod:"checkout.airwallex.com",demo:"checkout-demo.airwallex.com",staging:"checkout-staging.airwallex.com",qa:"checkoutui.qa.awx.im",preview:"checkoutui.preview.awx.im",dev:"localhost:3000"},r=r=>"https://"+(e[r]||"checkout.airwallex.com"),o=`/assets/bundle.${[0,1,4].join(".")}.min.js`;exports.confirmPaymentIntent=async e=>{if(window.Airwallex)return window.Airwallex.confirmPaymentIntent(e);{const e="Please loadAirwallex() before confirmPaymentIntent();";throw console.error(e),new Error(e)}},exports.createElement=(e,r)=>window.Airwallex?window.Airwallex.createElement(e,r):(console.error("Please loadAirwallex() before createElement();"),null),exports.createPaymentMethod=async(e,r)=>{if(window.Airwallex)return window.Airwallex.createPaymentMethod(e,r);{const e="Please loadAirwallex() before createPaymentMethod();";throw console.error(e),new Error(e)}},exports.destroyElement=e=>window.Airwallex?window.Airwallex.destroyElement(e):(console.error("Please loadAirwallex() before destroyElement();"),!1),exports.getElement=e=>window.Airwallex?window.Airwallex.getElement(e):(console.error("Please loadAirwallex() before getElement();"),null),exports.getGatewayUrl=r,exports.getPaymentIntent=async(e,r)=>{if(window.Airwallex)return window.Airwallex.getPaymentIntent(e,r);{const e="Please loadAirwallex() before getPaymentIntent();";throw console.error(e),new Error(e)}},exports.init=e=>{window.Airwallex?window.Airwallex.init(e):console.error("Please loadAirwallex() before init();")},exports.loadAirwallex=e=>Promise.resolve().then(()=>{if("undefined"==typeof window)return null;if(window.Airwallex)return window.Airwallex;const l=document.querySelector(`script[src="${o}"], script[src="${o}/"]`)||(e=>{const r=document.createElement("script");r.src=`${e}${o}`;const l=document.head||document.body;if(!l)throw new Error("Airwallex payment scripts requires a <head> or <body> html element in order to be loaded.");return l.appendChild(r),r})(r((null==e?void 0:e.env)||"prod"));return new Promise((r,o)=>{l.addEventListener("load",()=>{window.Airwallex?(window.Airwallex.init(e),r(window.Airwallex)):o(new Error("Failed to load Airwallex on load event"))}),l.addEventListener("error",()=>{o(new Error("Failed to load Airwallex scripts"))})})}),exports.redirectToCheckout=e=>{window.Airwallex?window.Airwallex.redirectToCheckout(e):console.error("Please loadAirwallex() before redirectToCheckout();")};
/* Airwallex @Charlie.Lang */
//# sourceMappingURL=airwallex.cjs.js.map

@@ -1,4 +0,4 @@

/* Airwallex Checkout Component Version [0.1.2] */
const e={prod:"checkout.airwallex.com",demo:"checkout-demo.airwallex.com",staging:"checkout-staging.airwallex.com",qa:"checkoutui.qa.awx.im",preview:"checkoutui.preview.awx.im",dev:"localhost:3000"},r=r=>"https://"+(e[r]||"checkout.airwallex.com"),o=`/assets/bundle.${[0,1,2].join(".")}.min.js`,l=e=>Promise.resolve().then(()=>{if("undefined"==typeof window)return null;if(window.Airwallex)return window.Airwallex;const l=document.querySelector(`script[src="${o}"], script[src="${o}/"]`)||(e=>{const r=document.createElement("script");r.src=`${e}${o}`;const l=document.head||document.body;if(!l)throw new Error("Airwallex payment scripts requires a <head> or <body> html element in order to be loaded.");return l.appendChild(r),r})(r((null==e?void 0:e.env)||"prod"));return new Promise((r,o)=>{l.addEventListener("load",()=>{window.Airwallex?(window.Airwallex.init(e),r(window.Airwallex)):o(new Error("Failed to load Airwallex on load event"))}),l.addEventListener("error",()=>{o(new Error("Failed to load Airwallex scripts"))})})}),n=e=>{window.Airwallex?window.Airwallex.init(e):console.error("Please loadAirwallex() before init();")},i=e=>{window.Airwallex?window.Airwallex.redirectToCheckout(e):console.error("Please loadAirwallex() before redirectToCheckout();")},t=(e,r)=>window.Airwallex?window.Airwallex.createElement(e,r):(console.error("Please loadAirwallex() before createElement();"),null),w=e=>window.Airwallex?window.Airwallex.destroyElement(e):(console.error("Please loadAirwallex() before destroyElement();"),!1),a=e=>window.Airwallex?window.Airwallex.getElement(e):(console.error("Please loadAirwallex() before getElement();"),null),d=async e=>{if(window.Airwallex)return window.Airwallex.confirmPaymentIntent(e);{const e="Please loadAirwallex() before confirmPaymentIntent();";throw console.error(e),new Error(e)}},c=async(e,r)=>{if(window.Airwallex)return window.Airwallex.createPaymentMethod(e,r);{const e="Please loadAirwallex() before createPaymentMethod();";throw console.error(e),new Error(e)}},s=async(e,r)=>{if(window.Airwallex)return window.Airwallex.getPaymentIntent(e,r);{const e="Please loadAirwallex() before getPaymentIntent();";throw console.error(e),new Error(e)}};export{d as confirmPaymentIntent,t as createElement,c as createPaymentMethod,w as destroyElement,a as getElement,r as getGatewayUrl,s as getPaymentIntent,n as init,l as loadAirwallex,i as redirectToCheckout};
/* Airwallex Checkout Component Version [0.1.4] */
const e={prod:"checkout.airwallex.com",demo:"checkout-demo.airwallex.com",staging:"checkout-staging.airwallex.com",qa:"checkoutui.qa.awx.im",preview:"checkoutui.preview.awx.im",dev:"localhost:3000"},r=r=>"https://"+(e[r]||"checkout.airwallex.com"),o=`/assets/bundle.${[0,1,4].join(".")}.min.js`,l=e=>Promise.resolve().then(()=>{if("undefined"==typeof window)return null;if(window.Airwallex)return window.Airwallex;const l=document.querySelector(`script[src="${o}"], script[src="${o}/"]`)||(e=>{const r=document.createElement("script");r.src=`${e}${o}`;const l=document.head||document.body;if(!l)throw new Error("Airwallex payment scripts requires a <head> or <body> html element in order to be loaded.");return l.appendChild(r),r})(r((null==e?void 0:e.env)||"prod"));return new Promise((r,o)=>{l.addEventListener("load",()=>{window.Airwallex?(window.Airwallex.init(e),r(window.Airwallex)):o(new Error("Failed to load Airwallex on load event"))}),l.addEventListener("error",()=>{o(new Error("Failed to load Airwallex scripts"))})})}),n=e=>{window.Airwallex?window.Airwallex.init(e):console.error("Please loadAirwallex() before init();")},i=e=>{window.Airwallex?window.Airwallex.redirectToCheckout(e):console.error("Please loadAirwallex() before redirectToCheckout();")},t=(e,r)=>window.Airwallex?window.Airwallex.createElement(e,r):(console.error("Please loadAirwallex() before createElement();"),null),w=e=>window.Airwallex?window.Airwallex.destroyElement(e):(console.error("Please loadAirwallex() before destroyElement();"),!1),a=e=>window.Airwallex?window.Airwallex.getElement(e):(console.error("Please loadAirwallex() before getElement();"),null),d=async e=>{if(window.Airwallex)return window.Airwallex.confirmPaymentIntent(e);{const e="Please loadAirwallex() before confirmPaymentIntent();";throw console.error(e),new Error(e)}},c=async(e,r)=>{if(window.Airwallex)return window.Airwallex.createPaymentMethod(e,r);{const e="Please loadAirwallex() before createPaymentMethod();";throw console.error(e),new Error(e)}},s=async(e,r)=>{if(window.Airwallex)return window.Airwallex.getPaymentIntent(e,r);{const e="Please loadAirwallex() before getPaymentIntent();";throw console.error(e),new Error(e)}};export{d as confirmPaymentIntent,t as createElement,c as createPaymentMethod,w as destroyElement,a as getElement,r as getGatewayUrl,s as getPaymentIntent,n as init,l as loadAirwallex,i as redirectToCheckout};
/* Airwallex @Charlie.Lang */
//# sourceMappingURL=airwallex.es.js.map

@@ -1,4 +0,4 @@

/* Airwallex Checkout Component Version [0.1.2] */
var Airwallex=function(e){"use strict";const r={prod:"checkout.airwallex.com",demo:"checkout-demo.airwallex.com",staging:"checkout-staging.airwallex.com",qa:"checkoutui.qa.awx.im",preview:"checkoutui.preview.awx.im",dev:"localhost:3000"},o=e=>"https://"+(r[e]||"checkout.airwallex.com"),l=`/assets/bundle.${[0,1,2].join(".")}.min.js`;return e.confirmPaymentIntent=async e=>{if(window.Airwallex)return window.Airwallex.confirmPaymentIntent(e);{const e="Please loadAirwallex() before confirmPaymentIntent();";throw console.error(e),new Error(e)}},e.createElement=(e,r)=>window.Airwallex?window.Airwallex.createElement(e,r):(console.error("Please loadAirwallex() before createElement();"),null),e.createPaymentMethod=async(e,r)=>{if(window.Airwallex)return window.Airwallex.createPaymentMethod(e,r);{const e="Please loadAirwallex() before createPaymentMethod();";throw console.error(e),new Error(e)}},e.destroyElement=e=>window.Airwallex?window.Airwallex.destroyElement(e):(console.error("Please loadAirwallex() before destroyElement();"),!1),e.getElement=e=>window.Airwallex?window.Airwallex.getElement(e):(console.error("Please loadAirwallex() before getElement();"),null),e.getGatewayUrl=o,e.getPaymentIntent=async(e,r)=>{if(window.Airwallex)return window.Airwallex.getPaymentIntent(e,r);{const e="Please loadAirwallex() before getPaymentIntent();";throw console.error(e),new Error(e)}},e.init=e=>{window.Airwallex?window.Airwallex.init(e):console.error("Please loadAirwallex() before init();")},e.loadAirwallex=e=>Promise.resolve().then(()=>{if("undefined"==typeof window)return null;if(window.Airwallex)return window.Airwallex;const r=document.querySelector(`script[src="${l}"], script[src="${l}/"]`)||(e=>{const r=document.createElement("script");r.src=`${e}${l}`;const o=document.head||document.body;if(!o)throw new Error("Airwallex payment scripts requires a <head> or <body> html element in order to be loaded.");return o.appendChild(r),r})(o((null==e?void 0:e.env)||"prod"));return new Promise((o,l)=>{r.addEventListener("load",()=>{window.Airwallex?(window.Airwallex.init(e),o(window.Airwallex)):l(new Error("Failed to load Airwallex on load event"))}),r.addEventListener("error",()=>{l(new Error("Failed to load Airwallex scripts"))})})}),e.redirectToCheckout=e=>{window.Airwallex?window.Airwallex.redirectToCheckout(e):console.error("Please loadAirwallex() before redirectToCheckout();")},e}({});
/* Airwallex Checkout Component Version [0.1.4] */
var Airwallex=function(e){"use strict";const r={prod:"checkout.airwallex.com",demo:"checkout-demo.airwallex.com",staging:"checkout-staging.airwallex.com",qa:"checkoutui.qa.awx.im",preview:"checkoutui.preview.awx.im",dev:"localhost:3000"},o=e=>"https://"+(r[e]||"checkout.airwallex.com"),l=`/assets/bundle.${[0,1,4].join(".")}.min.js`;return e.confirmPaymentIntent=async e=>{if(window.Airwallex)return window.Airwallex.confirmPaymentIntent(e);{const e="Please loadAirwallex() before confirmPaymentIntent();";throw console.error(e),new Error(e)}},e.createElement=(e,r)=>window.Airwallex?window.Airwallex.createElement(e,r):(console.error("Please loadAirwallex() before createElement();"),null),e.createPaymentMethod=async(e,r)=>{if(window.Airwallex)return window.Airwallex.createPaymentMethod(e,r);{const e="Please loadAirwallex() before createPaymentMethod();";throw console.error(e),new Error(e)}},e.destroyElement=e=>window.Airwallex?window.Airwallex.destroyElement(e):(console.error("Please loadAirwallex() before destroyElement();"),!1),e.getElement=e=>window.Airwallex?window.Airwallex.getElement(e):(console.error("Please loadAirwallex() before getElement();"),null),e.getGatewayUrl=o,e.getPaymentIntent=async(e,r)=>{if(window.Airwallex)return window.Airwallex.getPaymentIntent(e,r);{const e="Please loadAirwallex() before getPaymentIntent();";throw console.error(e),new Error(e)}},e.init=e=>{window.Airwallex?window.Airwallex.init(e):console.error("Please loadAirwallex() before init();")},e.loadAirwallex=e=>Promise.resolve().then(()=>{if("undefined"==typeof window)return null;if(window.Airwallex)return window.Airwallex;const r=document.querySelector(`script[src="${l}"], script[src="${l}/"]`)||(e=>{const r=document.createElement("script");r.src=`${e}${l}`;const o=document.head||document.body;if(!o)throw new Error("Airwallex payment scripts requires a <head> or <body> html element in order to be loaded.");return o.appendChild(r),r})(o((null==e?void 0:e.env)||"prod"));return new Promise((o,l)=>{r.addEventListener("load",()=>{window.Airwallex?(window.Airwallex.init(e),o(window.Airwallex)):l(new Error("Failed to load Airwallex on load event"))}),r.addEventListener("error",()=>{l(new Error("Failed to load Airwallex scripts"))})})}),e.redirectToCheckout=e=>{window.Airwallex?window.Airwallex.redirectToCheckout(e):console.error("Please loadAirwallex() before redirectToCheckout();")},e}({});
/* Airwallex @Charlie.Lang */
//# sourceMappingURL=airwallex.iife.js.map
{
"name": "airwallex-payment-elements",
"version": "0.1.2",
"version": "0.1.4",
"module": "lib/bin/airwallex.es.js",

@@ -5,0 +5,0 @@ "main": "lib/bin/airwallex.cjs.js",

@@ -1,2 +0,13 @@

import { Element, ElementType } from './element';
import {
Element,
ElementType,
CardElementOptions,
CardNumberElementOptions,
ExpiryDateElementOptions,
CvcElementOptions,
FullFeaturedCardElementOptions,
DropInElementOptions,
WechatElementOptions,
PaymentRequestButtonOptions,
} from './element';
import { Intent } from './cardNumber';

@@ -86,48 +97,2 @@ import { Properties } from 'csstype';

/**
* Config options for element integration, support using for ElementType
*/
export interface ElementOptions {
/**
* Element css style camelcase option, default style by Chrome browser default
*/
style?: Style;
/**
* Config if the element input are disabled or not, default false
*/
disabled?: boolean;
/**
* The placeholder attribute specifies a short hint that describes the expected value of an input field
*/
placeholder?: string;
/**
* Only support for 'cvc' element config
*/
cvcLength?: number;
/**
* Your checkout website origin url, aka merchant checkout page's 'window.location.origin' field
*/
origin?: string;
/**
* The payment intent you would like to checkout
* Refer to [Airwallex Client API](https://www.airwallex.com/docs/api#/Payment_Acceptance/Payment_Intents/Intro)
* ***IMPORTANT***
*
* For `card` | `dropIn` integration the intent.id and intent.client_secret is required since those elements need them to init the checkout form
*/
intent?: Intent;
/**
* The payment method component your website would like to integrate with
*/
component?: 'default' | 'card' | 'wechatpay';
/**
* Only support for card payment, indicate whether to capture immediate when authentication success
*/
autoCapture?: boolean;
/**
* Apply only for card payment, to improve 3DS experience, indicate if the payment form will collect billing info from shopper
*/
withBilling?: boolean;
}
/**
* Config option for Hosted Payment Page(HPP) when doing redirect checkout using Airwallex payment page

@@ -333,7 +298,50 @@ */

/**
* The definition mapping of supported integration element type with it's props options used to customize the element, merchant can check on each element options type for details
*/
export interface ElementOptionsTypeMap {
/**
* Define card number input element type and it's mapped option type, apply to split card element integration
* Using together with `expiry` and `cvc` element to gain maximum customization
*/
cardNumber: CardNumberElementOptions;
/**
* Define expiry input element type and it's mapped option type, apply to split card element integration
* Using together with `cardNumber` and `cvc` element to gain maximum customization
*/
expiry: ExpiryDateElementOptions;
/**
* Define cvc input element type and it's mapped option type, apply to split card element integration
* Using together with `cardNumber` and `expiry` element to gain maximum customization
*/
cvc: CvcElementOptions;
/**
* Define W3C payment request API element type and it's mapped option type
*/
paymentRequestButton: PaymentRequestButtonOptions;
/**
* Define card element type and it's mapped option type, this integration make the card PCI input (card number / cvc / expiry) behavior like a single input
*/
card: CardElementOptions;
/**
* Define WeChat element type and it's mapped option type
*/
wechat: WechatElementOptions;
/**
* Define dropIn element type and it's mapped option type, this integration make integrate with Airwallex supported card and APM (alternative payment method like WeChat etc.) payment method like a single widget
*/
dropIn: DropInElementOptions;
/**
* Define full featured card element type and it's mapped option type, this integration make integrate with Airwallex supported card payment method like a single widget
*/
fullFeaturedCard: FullFeaturedCardElementOptions;
}
/**
* Element integration `step #2`
* Create payment element for checkout
*/
export declare const createElement: (type: ElementType, options?: ElementOptions | undefined) => Element | null;
export declare function createElement<T extends ElementType>(
type: T,
options?: ElementOptionsTypeMap[T],
): Element | null;
/**

@@ -340,0 +348,0 @@ * Destroy element on the demand

@@ -1,5 +0,18 @@

import { ElementOptions } from './airwallex';
import { Intent } from './cardNumber';
/**
* Config options for element integration, support using for ElementType
*/
export interface ElementOptions {
/**
* Element css style camelcase option, default style by Chrome browser default
*/
style?: Style;
/**
* Your checkout website origin url, aka merchant checkout page's 'window.location.origin' field
*/
origin?: string;
}
/**
* Supported integration element type

@@ -146,3 +159,157 @@ */

}
/**
* The PaymentShippingOption dictionary has members describing a shipping option.
*/
export interface PaymentShippingOption {
id: string;
label: string;
amount: {
currency: string;
value: string;
};
selected: boolean;
}
export interface CardElementOptions extends ElementOptions {
/**
* Config if the element input are disabled or not, default false
*/
disabled?: boolean;
/**
* Indicate whether to capture immediate when authentication success
*/
autoCapture?: boolean;
}
export interface CardNumberElementOptions extends ElementOptions {
/**
* Config if the element input are disabled or not, default false
*/
disabled?: boolean;
/**
* The payment intent you would like to checkout
* Refer to [Airwallex Client API](https://www.airwallex.com/docs/api#/Payment_Acceptance/Payment_Intents/Intro)
*
*/
intent?: Intent;
/**
* Indicate whether to capture immediate when authentication success
*/
autoCapture?: boolean;
/**
* The placeholder attribute specifies a short hint that describes the expected value of an input field
*/
placeholder?: string;
}
export interface ExpiryDateElementOptions extends ElementOptions {
/**
* Config if the element input are disabled or not, default false
*/
disabled?: boolean;
/**
* The placeholder attribute specifies a short hint that describes the expected value of an input field
*/
placeholder?: string;
}
export interface CvcElementOptions extends ElementOptions {
/**
* Config if the element input are disabled or not, default false
*/
disabled?: boolean;
/**
* The placeholder attribute specifies a short hint that describes the expected value of an input field
*/
placeholder?: string;
/**
* Indicate cvc's length
*/
cvcLength?: number;
}
export interface FullFeaturedCardElementOptions extends ElementOptions {
/**
* The payment intent you would like to checkout
* Refer to [Airwallex Client API](https://www.airwallex.com/docs/api#/Payment_Acceptance/Payment_Intents/Intro)
*
*/
intent?: Intent;
/**
* The payment method component your website would like to integrate with
*/
component?: 'default' | 'card' | 'wechatpay';
/**
* Indicate whether to capture immediate when authentication success, apply when shopper using card payment method
*/
autoCapture?: boolean;
/**
* Indicate to improve 3DS experience, indicate if the payment form will collect billing info from shopper
*/
withBilling?: boolean;
}
export interface DropInElementOptions extends ElementOptions {
/**
* The payment intent you would like to checkout
* Refer to [Airwallex Client API](https://www.airwallex.com/docs/api#/Payment_Acceptance/Payment_Intents/Intro)
*
*/
intent?: Intent;
/**
* The payment method component your website would like to integrate with
*/
component?: 'default' | 'card' | 'wechatpay';
/**
* Indicate whether to capture immediate when authentication success
*/
autoCapture?: boolean;
/**
* Indicate to improve 3DS experience, indicate if the payment form will collect billing info from shopper
*/
withBilling?: boolean;
}
export interface PaymentRequestButtonOptions extends ElementOptions {
/**
* The payment intent you would like to checkout
* Refer to [Airwallex Client API](https://www.airwallex.com/docs/api#/Payment_Acceptance/Payment_Intents/Intro)
*
*/
intent?: Intent;
/**
* Indicate whether to capture immediate when authentication success
*/
autoCapture?: boolean;
/**
* Indicate if the payment form collect payer name is required
*/
requestPayerName?: boolean;
/**
* Indicate if the payment form collect payer email is required
*/
requestPayerEmail?: boolean;
/**
* Indicate if the payment form collect payer phone is required
*/
requestPayerPhone?: boolean;
/**
* Indicate if the payment form collect shipping info from shopper is required
*/
requestShipping?: boolean;
/**
* The shippingOptions must be supplied when requestShipping is true for the customer to proceed in the flow.
*/
shippingOptions?: Array<PaymentShippingOption>;
}
export interface WechatElementOptions extends ElementOptions {
/**
* The payment intent you would like to checkout
* Refer to [Airwallex Client API](https://www.airwallex.com/docs/api#/Payment_Acceptance/Payment_Intents/Intro)
*
*/
intent?: Intent;
}
/**

@@ -161,3 +328,11 @@ * Functions and external fields can be using in your integration flow with airwallex element

*/
options?: ElementOptions;
options?:
| CardElementOptions
| CardNumberElementOptions
| ExpiryDateElementOptions
| CvcElementOptions
| FullFeaturedCardElementOptions
| DropInElementOptions
| WechatElementOptions
| PaymentRequestButtonOptions;
/**

@@ -193,3 +368,13 @@ * The iframe element after mount to the DOM

*/
update(options?: ElementOptions): void;
update(
options?:
| CardElementOptions
| CardNumberElementOptions
| ExpiryDateElementOptions
| CvcElementOptions
| FullFeaturedCardElementOptions
| DropInElementOptions
| WechatElementOptions
| PaymentRequestButtonOptions,
): void;
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc