airwallex-payment-elements 1.122.0 → 1.131.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/bin/airwallex.cjs.js +2 -2
- package/lib/bin/airwallex.es.js +2 -2
- package/lib/bin/airwallex.iife.js +2 -2
- package/package.json +2 -2
- package/types/airwallex.d.ts +32 -6
- package/types/dropInElement.d.ts +19 -3
- package/types/element.d.ts +38 -1
- package/types/index.d.ts +3 -0
- package/types/qrcodeElement.d.ts +3 -1
package/lib/bin/airwallex.cjs.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* Airwallex Checkout Component Version [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",dev:"checkout-dev.airwallex.com",local:"localhost:3000"},r=r=>`https://${e[r]||e.prod}`,t="/assets/elements.bundle.min.js?version=1.
|
|
1
|
+
/* Airwallex Checkout Component Version [1.131.0] */
|
|
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",dev:"checkout-dev.airwallex.com",local:"localhost:3000"},r=r=>`https://${e[r]||e.prod}`,t="/assets/elements.bundle.min.js?version=1.131.0",o=e=>{const r=document.createElement("script");r.src=`${e}${t}`,r.crossOrigin="anonymous";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},n=async e=>{if("undefined"==typeof window)return null;if(window.Airwallex)return window.Airwallex;let n=0;const l=async()=>{const n=document.querySelector(`script[src="${t}"], script[src="${t}/"]`)||o(r((null==e?void 0:e.env)||"prod"));return new Promise(((r,t)=>{n.addEventListener("load",(()=>{window.Airwallex?(window.Airwallex.init(e),r(window.Airwallex)):t(new Error("Failed to load Airwallex on load event"))})),n.addEventListener("error",(()=>{t(new Error("Failed to load Airwallex scripts")),n.remove&&n.remove()}))}))};for(;n<3;)try{return await l()}catch(e){n++,await new Promise((e=>window.setTimeout(e,500)))}return null},l=e=>{window.Airwallex?window.Airwallex.init(e):console.error("Please loadAirwallex() before init();")},a=e=>{if(window.Airwallex)return window.Airwallex.redirectToCheckout(e);console.error("Please loadAirwallex() before redirectToCheckout();")},i=(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),d=e=>window.Airwallex?window.Airwallex.getElement(e):(console.error("Please loadAirwallex() before getElement();"),null),s=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=>{if(window.Airwallex)return window.Airwallex.confirmPaymentIntentWithSavedCard(e);{const e="Please loadAirwallex() before confirmPaymentIntentWithSavedCard();";throw console.error(e),new Error(e)}},x=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)}},m=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)}},A=async e=>{if(window.Airwallex)return window.Airwallex.createPaymentConsent(e);{const e="Please loadAirwallex() before createPaymentConsent();";throw console.error(e),new Error(e)}},y=e=>window.Airwallex.getDeviceFingerprint(e);var u={getGatewayUrl:r,loadAirwallex:n,loadAirwallexJs:o,init:l,redirectToCheckout:a,createElement:i,destroyElement:w,getDeviceFingerprint:y,getElement:d,getPaymentIntent:m,createPaymentMethod:x,createPaymentConsent:A,confirmPaymentIntent:s,confirmPaymentIntentWithSavedCard:c};exports.confirmPaymentIntent=s,exports.confirmPaymentIntentWithSavedCard=c,exports.createElement=i,exports.createPaymentConsent=A,exports.createPaymentMethod=x,exports.default=u,exports.destroyElement=w,exports.getDeviceFingerprint=y,exports.getElement=d,exports.getGatewayUrl=r,exports.getPaymentIntent=m,exports.init=l,exports.loadAirwallex=n,exports.loadAirwallexJs=o,exports.redirectToCheckout=a;
|
|
3
3
|
//# sourceMappingURL=airwallex.cjs.js.map
|
package/lib/bin/airwallex.es.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* Airwallex Checkout Component Version [1.
|
|
2
|
-
const e={prod:"checkout.airwallex.com",demo:"checkout-demo.airwallex.com",staging:"checkout-staging.airwallex.com",dev:"checkout-dev.airwallex.com",local:"localhost:3000"},r=r=>`https://${e[r]||e.prod}`,o="/assets/elements.bundle.min.js?version=1.
|
|
1
|
+
/* Airwallex Checkout Component Version [1.131.0] */
|
|
2
|
+
const e={prod:"checkout.airwallex.com",demo:"checkout-demo.airwallex.com",staging:"checkout-staging.airwallex.com",dev:"checkout-dev.airwallex.com",local:"localhost:3000"},r=r=>`https://${e[r]||e.prod}`,o="/assets/elements.bundle.min.js?version=1.131.0",n=e=>{const r=document.createElement("script");r.src=`${e}${o}`,r.crossOrigin="anonymous";const n=document.head||document.body;if(!n)throw new Error("Airwallex payment scripts requires a <head> or <body> html element in order to be loaded.");return n.appendChild(r),r},l=async e=>{if("undefined"==typeof window)return null;if(window.Airwallex)return window.Airwallex;let l=0;const t=async()=>{const l=document.querySelector(`script[src="${o}"], script[src="${o}/"]`)||n(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")),l.remove&&l.remove()}))}))};for(;l<3;)try{return await t()}catch(e){l++,await new Promise((e=>window.setTimeout(e,500)))}return null},t=e=>{window.Airwallex?window.Airwallex.init(e):console.error("Please loadAirwallex() before init();")},a=e=>{if(window.Airwallex)return window.Airwallex.redirectToCheckout(e);console.error("Please loadAirwallex() before redirectToCheckout();")},i=(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),d=e=>window.Airwallex?window.Airwallex.getElement(e):(console.error("Please loadAirwallex() before getElement();"),null),c=async e=>{if(window.Airwallex)return window.Airwallex.confirmPaymentIntent(e);{const e="Please loadAirwallex() before confirmPaymentIntent();";throw console.error(e),new Error(e)}},s=async e=>{if(window.Airwallex)return window.Airwallex.confirmPaymentIntentWithSavedCard(e);{const e="Please loadAirwallex() before confirmPaymentIntentWithSavedCard();";throw console.error(e),new Error(e)}},m=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)}},x=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)}},A=async e=>{if(window.Airwallex)return window.Airwallex.createPaymentConsent(e);{const e="Please loadAirwallex() before createPaymentConsent();";throw console.error(e),new Error(e)}},u=e=>window.Airwallex.getDeviceFingerprint(e);var y={getGatewayUrl:r,loadAirwallex:l,loadAirwallexJs:n,init:t,redirectToCheckout:a,createElement:i,destroyElement:w,getDeviceFingerprint:u,getElement:d,getPaymentIntent:x,createPaymentMethod:m,createPaymentConsent:A,confirmPaymentIntent:c,confirmPaymentIntentWithSavedCard:s};export default y;export{c as confirmPaymentIntent,s as confirmPaymentIntentWithSavedCard,i as createElement,A as createPaymentConsent,m as createPaymentMethod,w as destroyElement,u as getDeviceFingerprint,d as getElement,r as getGatewayUrl,x as getPaymentIntent,t as init,l as loadAirwallex,n as loadAirwallexJs,a as redirectToCheckout};
|
|
3
3
|
//# sourceMappingURL=airwallex.es.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* Airwallex Checkout Component Version [1.
|
|
2
|
-
var Airwallex=function(e){"use strict";const r={prod:"checkout.airwallex.com",demo:"checkout-demo.airwallex.com",staging:"checkout-staging.airwallex.com",dev:"checkout-dev.airwallex.com",local:"localhost:3000"},n=e=>`https://${r[e]||r.prod}`,t="/assets/elements.bundle.min.js?version=1.
|
|
1
|
+
/* Airwallex Checkout Component Version [1.131.0] */
|
|
2
|
+
var Airwallex=function(e){"use strict";const r={prod:"checkout.airwallex.com",demo:"checkout-demo.airwallex.com",staging:"checkout-staging.airwallex.com",dev:"checkout-dev.airwallex.com",local:"localhost:3000"},n=e=>`https://${r[e]||r.prod}`,t="/assets/elements.bundle.min.js?version=1.131.0",o=e=>{const r=document.createElement("script");r.src=`${e}${t}`,r.crossOrigin="anonymous";const n=document.head||document.body;if(!n)throw new Error("Airwallex payment scripts requires a <head> or <body> html element in order to be loaded.");return n.appendChild(r),r},l=async e=>{if("undefined"==typeof window)return null;if(window.Airwallex)return window.Airwallex;let r=0;const l=async()=>{const r=document.querySelector(`script[src="${t}"], script[src="${t}/"]`)||o(n((null==e?void 0:e.env)||"prod"));return new Promise(((n,t)=>{r.addEventListener("load",(()=>{window.Airwallex?(window.Airwallex.init(e),n(window.Airwallex)):t(new Error("Failed to load Airwallex on load event"))})),r.addEventListener("error",(()=>{t(new Error("Failed to load Airwallex scripts")),r.remove&&r.remove()}))}))};for(;r<3;)try{return await l()}catch(e){r++,await new Promise((e=>window.setTimeout(e,500)))}return null},a=e=>{window.Airwallex?window.Airwallex.init(e):console.error("Please loadAirwallex() before init();")},i=e=>{if(window.Airwallex)return window.Airwallex.redirectToCheckout(e);console.error("Please loadAirwallex() before redirectToCheckout();")},w=(e,r)=>window.Airwallex?window.Airwallex.createElement(e,r):(console.error("Please loadAirwallex() before createElement();"),null),d=e=>window.Airwallex?window.Airwallex.destroyElement(e):(console.error("Please loadAirwallex() before destroyElement();"),!1),c=e=>window.Airwallex?window.Airwallex.getElement(e):(console.error("Please loadAirwallex() before getElement();"),null),s=async e=>{if(window.Airwallex)return window.Airwallex.confirmPaymentIntent(e);{const e="Please loadAirwallex() before confirmPaymentIntent();";throw console.error(e),new Error(e)}},m=async e=>{if(window.Airwallex)return window.Airwallex.confirmPaymentIntentWithSavedCard(e);{const e="Please loadAirwallex() before confirmPaymentIntentWithSavedCard();";throw console.error(e),new Error(e)}},x=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)}},A=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)}},u=async e=>{if(window.Airwallex)return window.Airwallex.createPaymentConsent(e);{const e="Please loadAirwallex() before createPaymentConsent();";throw console.error(e),new Error(e)}},y=e=>window.Airwallex.getDeviceFingerprint(e);var f={getGatewayUrl:n,loadAirwallex:l,loadAirwallexJs:o,init:a,redirectToCheckout:i,createElement:w,destroyElement:d,getDeviceFingerprint:y,getElement:c,getPaymentIntent:A,createPaymentMethod:x,createPaymentConsent:u,confirmPaymentIntent:s,confirmPaymentIntentWithSavedCard:m};return e.confirmPaymentIntent=s,e.confirmPaymentIntentWithSavedCard=m,e.createElement=w,e.createPaymentConsent=u,e.createPaymentMethod=x,e.default=f,e.destroyElement=d,e.getDeviceFingerprint=y,e.getElement=c,e.getGatewayUrl=n,e.getPaymentIntent=A,e.init=a,e.loadAirwallex=l,e.loadAirwallexJs=o,e.redirectToCheckout=i,Object.defineProperty(e,"__esModule",{value:!0}),e}({});
|
|
3
3
|
//# sourceMappingURL=airwallex.iife.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "airwallex-payment-elements",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.131.0",
|
|
4
4
|
"module": "lib/bin/airwallex.es.js",
|
|
5
5
|
"main": "lib/bin/airwallex.cjs.js",
|
|
6
6
|
"bin": "lib/bin/airwallex.cjs.js",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
},
|
|
83
83
|
"husky": {
|
|
84
84
|
"hooks": {
|
|
85
|
-
"pre-commit": "lint-staged && yarn lint && yarn test && yarn build",
|
|
85
|
+
"pre-commit": "lint-staged && yarn lint && yarn test && yarn build && yarn typedoc",
|
|
86
86
|
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
|
|
87
87
|
}
|
|
88
88
|
},
|
package/types/airwallex.d.ts
CHANGED
|
@@ -93,6 +93,12 @@ export type AirwallexEnv = 'demo' | 'prod';
|
|
|
93
93
|
*/
|
|
94
94
|
export type Mode = 'payment' | 'recurring';
|
|
95
95
|
|
|
96
|
+
/**
|
|
97
|
+
* Describes the type of transaction being performed in order to customize the submit button text.
|
|
98
|
+
* @defaultValue `'pay'`
|
|
99
|
+
*/
|
|
100
|
+
export type SubmitType = 'pay' | 'book' | 'subscribe' | 'save';
|
|
101
|
+
|
|
96
102
|
export type AuthorizationType = 'pre_auth' | 'final_auth';
|
|
97
103
|
|
|
98
104
|
/**
|
|
@@ -106,7 +112,7 @@ export interface InitOptions {
|
|
|
106
112
|
*/
|
|
107
113
|
env?: AirwallexEnv;
|
|
108
114
|
/**
|
|
109
|
-
* The locale for your website.
|
|
115
|
+
* The locale for your website. Defaults to the browser's locale; however, if the browser's locale is not supported, it will default to 'en'.
|
|
110
116
|
*/
|
|
111
117
|
locale?: Locale;
|
|
112
118
|
/**
|
|
@@ -213,6 +219,14 @@ export interface Layout {
|
|
|
213
219
|
alwaysShowMethodLabel?: boolean;
|
|
214
220
|
}
|
|
215
221
|
|
|
222
|
+
|
|
223
|
+
export interface HppLayout {
|
|
224
|
+
/**
|
|
225
|
+
* Specify the layout for the payment elements. By default, `accordion` layout is used on desktop and `tab` layout is used on mobile.
|
|
226
|
+
*/
|
|
227
|
+
type?: 'tab' | 'accordion';
|
|
228
|
+
}
|
|
229
|
+
|
|
216
230
|
/**
|
|
217
231
|
* Configuration option for Hosted Payment Page(HPP), a checkout solution that redirects shoppers to a secure, pre-built payment page hosted by Airwallex.
|
|
218
232
|
*/
|
|
@@ -262,7 +276,7 @@ export interface HostPaymentPage {
|
|
|
262
276
|
*/
|
|
263
277
|
components?: Array<PaymentMethodType>;
|
|
264
278
|
/**
|
|
265
|
-
*
|
|
279
|
+
* Specify the payment methods and their order for display on the payment page. By default, the order will be based on the order configured in [Get available payment method types API](https://www.airwallex.com/docs/api/v1/pa/config/payment_method_types#/Payment_Acceptance/Config/_api_v1_pa_config_payment_method_types/get), with 'applepay', 'googlepay' and 'paypal' displayed at the top if they're supported. Note: Only payment methods supported for the specified currency and country_code will be shown on the payment page.
|
|
266
280
|
*/
|
|
267
281
|
methods?: Array<PaymentMethodType>;
|
|
268
282
|
/**
|
|
@@ -301,13 +315,13 @@ export interface HostPaymentPage {
|
|
|
301
315
|
/**
|
|
302
316
|
* The layout of the Hosted Payment Page.
|
|
303
317
|
*/
|
|
304
|
-
layout?:
|
|
318
|
+
layout?: HppLayout;
|
|
305
319
|
/**
|
|
306
320
|
* The URL of your website logo to display on the header of the Hosted Payment Page.
|
|
307
321
|
*/
|
|
308
322
|
logoUrl?: string;
|
|
309
323
|
/**
|
|
310
|
-
* The locale for your website.
|
|
324
|
+
* The locale for your website. Defaults to the browser's locale; however, if the browser's locale is not supported, it will default to 'en'.
|
|
311
325
|
*/
|
|
312
326
|
locale?: Locale;
|
|
313
327
|
/**
|
|
@@ -339,7 +353,7 @@ export interface HostPaymentPage {
|
|
|
339
353
|
*/
|
|
340
354
|
googlePayRequestOptions?: GooglePayHppRequestOptions;
|
|
341
355
|
/**
|
|
342
|
-
*
|
|
356
|
+
* The three-letter ISO currency code representing the currency of the Payment Intent or Payment Consent. Only payment methods supported for the specified `currency` will be shown on the payment page.
|
|
343
357
|
*/
|
|
344
358
|
currency: string;
|
|
345
359
|
/**
|
|
@@ -349,7 +363,11 @@ export interface HostPaymentPage {
|
|
|
349
363
|
*/
|
|
350
364
|
platformConnectedAccount?: string;
|
|
351
365
|
/**
|
|
352
|
-
* The two-letter ISO country code of the shopper's country.
|
|
366
|
+
* The two-letter ISO country code of the shopper's country.
|
|
367
|
+
* If the country_code is not provided, we will determine it based on the shopper's IP address.
|
|
368
|
+
* However, some payment methods, such as iDEAL, are only available to shoppers in specific countries.
|
|
369
|
+
* If the shopper is not located in a supported country, the corresponding payment method may not be displayed.
|
|
370
|
+
* To ensure that your customers can successfully complete their payments using the appropriate methods, we strongly recommend that you explicitly pass the country_code to us.
|
|
353
371
|
*/
|
|
354
372
|
country_code?: string;
|
|
355
373
|
/**
|
|
@@ -381,6 +399,14 @@ export interface HostPaymentPage {
|
|
|
381
399
|
* @defaultValue `true`
|
|
382
400
|
*/
|
|
383
401
|
autoSaveCardForFuturePayments?: boolean;
|
|
402
|
+
|
|
403
|
+
/**
|
|
404
|
+
* Describes the type of transaction being performed in order to customize the submit button text.
|
|
405
|
+
* Available options are 'pay', 'book', 'subscribe', 'save'.
|
|
406
|
+
* If blank, the default value will be `'pay'`
|
|
407
|
+
* @defaultValue `'pay'`
|
|
408
|
+
*/
|
|
409
|
+
submitType?: SubmitType;
|
|
384
410
|
}
|
|
385
411
|
|
|
386
412
|
/**
|
package/types/dropInElement.d.ts
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import { PaymentMethodType, BoxStyle, CardNetwork, Appearance, CSSProperties, SelectorAllowed } from './element';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
Mode,
|
|
4
|
+
RecurringOptions,
|
|
5
|
+
Billing,
|
|
6
|
+
AuthorizationType,
|
|
7
|
+
Layout,
|
|
8
|
+
PaymentConsentOptions,
|
|
9
|
+
SubmitType,
|
|
10
|
+
} from './airwallex';
|
|
3
11
|
import { ApplePayHppOrDropInRequestOptions, GooglePayRequestOptions, ContactField, LPMFlows } from './element';
|
|
4
12
|
interface WeChatPayFlow {
|
|
5
13
|
desktopFlow?: LPMFlows;
|
|
@@ -44,7 +52,7 @@ export interface DropInElementOptions {
|
|
|
44
52
|
*/
|
|
45
53
|
client_secret: string;
|
|
46
54
|
/**
|
|
47
|
-
*
|
|
55
|
+
* The three-letter ISO currency code representing the currency of the Payment Intent or Payment Consent. Only payment methods supported for the specified `currency` will be shown on the payment page.
|
|
48
56
|
*/
|
|
49
57
|
currency: string;
|
|
50
58
|
/**
|
|
@@ -79,7 +87,7 @@ export interface DropInElementOptions {
|
|
|
79
87
|
autoCapture?: boolean;
|
|
80
88
|
/**
|
|
81
89
|
* The authorization type for the card payment.
|
|
82
|
-
* Set it to `pre_auth` if you want to place a hold on your customer
|
|
90
|
+
* Set it to `pre_auth` if you want to place a hold on your customer's card for more than 7 days, i.e., extend the authorization time window.
|
|
83
91
|
* Currently `pre_auth` is only available when the card brand is Visa or Mastercard. `autoCapture` will be automatically set to `false` if you enable `pre_auth`.
|
|
84
92
|
* @defaultValue `'final_auth'`
|
|
85
93
|
*/
|
|
@@ -175,4 +183,12 @@ export interface DropInElementOptions {
|
|
|
175
183
|
* @defaultValue `true`
|
|
176
184
|
*/
|
|
177
185
|
autoSaveCardForFuturePayments?: boolean;
|
|
186
|
+
/**
|
|
187
|
+
* Describes the type of transaction being performed in order to customize the submit button text.
|
|
188
|
+
* Available options are 'pay', 'book', or 'subscribe'.
|
|
189
|
+
* The type can only be specified in `payment` mode.
|
|
190
|
+
* If blank, the default value will be `'pay'`
|
|
191
|
+
* @defaultValue `'pay'`
|
|
192
|
+
*/
|
|
193
|
+
submitType?: SubmitType;
|
|
178
194
|
}
|
package/types/element.d.ts
CHANGED
|
@@ -145,7 +145,8 @@ export type PaymentMethodWithRedirect =
|
|
|
145
145
|
| 'cash_app_pay'
|
|
146
146
|
| 'twint'
|
|
147
147
|
| 'laybuy'
|
|
148
|
-
| 'venmo'
|
|
148
|
+
| 'venmo'
|
|
149
|
+
| 'payme';
|
|
149
150
|
|
|
150
151
|
export type DirectDebitPaymentMethod =
|
|
151
152
|
| 'ach_direct_debit'
|
|
@@ -987,6 +988,17 @@ export interface GooglePayRequestOptions {
|
|
|
987
988
|
*
|
|
988
989
|
*/
|
|
989
990
|
callbackIntents?: google.payments.api.CallbackIntent[];
|
|
991
|
+
/**
|
|
992
|
+
* Whether the shopper must use an existing payment method.
|
|
993
|
+
* @defaultValue `false`
|
|
994
|
+
*/
|
|
995
|
+
existingPaymentMethodRequired?: boolean;
|
|
996
|
+
/**
|
|
997
|
+
* Whether the CVC is required.
|
|
998
|
+
* @defaultValue `true`
|
|
999
|
+
* @hidden
|
|
1000
|
+
*/
|
|
1001
|
+
cvcRequired?: boolean;
|
|
990
1002
|
}
|
|
991
1003
|
|
|
992
1004
|
/**
|
|
@@ -1485,6 +1497,21 @@ export interface CardElementType extends ElementBaseType {
|
|
|
1485
1497
|
on<T extends CardElementEventCode>(eventCode: T, handler: CardElementEventHandler<T>): void;
|
|
1486
1498
|
}
|
|
1487
1499
|
|
|
1500
|
+
/**
|
|
1501
|
+
* BIN (Bank Identification Number) information for card payment methods.
|
|
1502
|
+
*/
|
|
1503
|
+
export interface BinInfo {
|
|
1504
|
+
card_brand?: string;
|
|
1505
|
+
card_type?: string;
|
|
1506
|
+
commercial_card?: boolean;
|
|
1507
|
+
issuer_country_code?: string;
|
|
1508
|
+
issuer_name?: string;
|
|
1509
|
+
product_code?: string;
|
|
1510
|
+
product_description?: string;
|
|
1511
|
+
product_subtype_code?: string;
|
|
1512
|
+
product_subtype_description?: string;
|
|
1513
|
+
}
|
|
1514
|
+
|
|
1488
1515
|
/**
|
|
1489
1516
|
* Functions and external fields can be used in your integration flow with Airwallex Payment Elements.
|
|
1490
1517
|
*/
|
|
@@ -1546,6 +1573,16 @@ export interface CardNumberElementType extends ElementBaseType {
|
|
|
1546
1573
|
* ```
|
|
1547
1574
|
*/
|
|
1548
1575
|
confirm(data: PaymentMethodRequestData): Promise<Intent>;
|
|
1576
|
+
|
|
1577
|
+
/**
|
|
1578
|
+
* Using this function to get BIN (Bank Identification Number) information for the card.
|
|
1579
|
+
* @example
|
|
1580
|
+
* ```ts
|
|
1581
|
+
* element.getBinInfo('replace-with-your-client-secret');
|
|
1582
|
+
* ```
|
|
1583
|
+
*/
|
|
1584
|
+
getBinInfo(client_secret: string): Promise<BinInfo>;
|
|
1585
|
+
|
|
1549
1586
|
/**
|
|
1550
1587
|
* Using this function to create a payment method for future payments. The created payment method can be saved in your system.
|
|
1551
1588
|
* @param data - Payment method request payload
|
package/types/index.d.ts
CHANGED
|
@@ -38,6 +38,8 @@ import Airwallex, {
|
|
|
38
38
|
CreatePaymentMethodRequest,
|
|
39
39
|
} from './airwallex';
|
|
40
40
|
|
|
41
|
+
import { BinInfo } from './element';
|
|
42
|
+
|
|
41
43
|
export {
|
|
42
44
|
init,
|
|
43
45
|
AirwallexEnv,
|
|
@@ -68,6 +70,7 @@ export {
|
|
|
68
70
|
ElementTypeMap,
|
|
69
71
|
VerifyConsentRequest,
|
|
70
72
|
CreatePaymentMethodRequest,
|
|
73
|
+
BinInfo,
|
|
71
74
|
};
|
|
72
75
|
|
|
73
76
|
/**
|
package/types/qrcodeElement.d.ts
CHANGED
|
@@ -15,7 +15,9 @@ export type PaymentMethodWithQrcode =
|
|
|
15
15
|
| 'fps'
|
|
16
16
|
| 'cash_app_pay'
|
|
17
17
|
| 'rabbit_line_pay'
|
|
18
|
-
| 'pix'
|
|
18
|
+
| 'pix'
|
|
19
|
+
| 'payme'
|
|
20
|
+
| 'pay_now';
|
|
19
21
|
|
|
20
22
|
/**
|
|
21
23
|
* Apply to qrcode element type integration, interface used when call createElement with type `qrcode`
|