airwallex-payment-elements 1.10.0 → 1.12.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.
@@ -1,3 +1,3 @@
1
- /* Airwallex Checkout Component Version [1.10.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",qa:"checkoutui.qa.awx.im",preview:"checkoutui.preview.awx.im",dev:"localhost:3000"},r=r=>`https://${e[r]||e.prod}`,t="/assets/elements.bundle.min.js?version=1.10.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)}},u=e=>window.Airwallex.getDeviceFingerprint(e);var y={getGatewayUrl:r,loadAirwallex:n,loadAirwallexJs:o,init:l,redirectToCheckout:a,createElement:i,destroyElement:w,getDeviceFingerprint:u,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=y,exports.destroyElement=w,exports.getDeviceFingerprint=u,exports.getElement=d,exports.getGatewayUrl=r,exports.getPaymentIntent=m,exports.init=l,exports.loadAirwallex=n,exports.loadAirwallexJs=o,exports.redirectToCheckout=a;
1
+ /* Airwallex Checkout Component Version [1.12.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",qa:"checkoutui.qa.awx.im",preview:"checkoutui.preview.awx.im",dev:"localhost:3000"},r=r=>`https://${e[r]||e.prod}`,t="/assets/elements.bundle.min.js?version=1.12.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)}},u=e=>window.Airwallex.getDeviceFingerprint(e);var y={getGatewayUrl:r,loadAirwallex:n,loadAirwallexJs:o,init:l,redirectToCheckout:a,createElement:i,destroyElement:w,getDeviceFingerprint:u,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=y,exports.destroyElement=w,exports.getDeviceFingerprint=u,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
@@ -1,3 +1,3 @@
1
- /* Airwallex Checkout Component Version [1.10.0] */
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]||e.prod}`,o="/assets/elements.bundle.min.js?version=1.10.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},t=async e=>{if("undefined"==typeof window)return null;if(window.Airwallex)return window.Airwallex;let t=0;const l=async()=>{const t=document.querySelector(`script[src="${o}"], script[src="${o}/"]`)||n(r((null==e?void 0:e.env)||"prod"));return new Promise(((r,o)=>{t.addEventListener("load",(()=>{window.Airwallex?(window.Airwallex.init(e),r(window.Airwallex)):o(new Error("Failed to load Airwallex on load event"))})),t.addEventListener("error",(()=>{o(new Error("Failed to load Airwallex scripts")),t.remove&&t.remove()}))}))};for(;t<3;)try{return await l()}catch(e){t++,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),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:t,loadAirwallexJs:n,init:l,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,l as init,t as loadAirwallex,n as loadAirwallexJs,a as redirectToCheckout};
1
+ /* Airwallex Checkout Component Version [1.12.0] */
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]||e.prod}`,o="/assets/elements.bundle.min.js?version=1.12.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},t=async e=>{if("undefined"==typeof window)return null;if(window.Airwallex)return window.Airwallex;let t=0;const l=async()=>{const t=document.querySelector(`script[src="${o}"], script[src="${o}/"]`)||n(r((null==e?void 0:e.env)||"prod"));return new Promise(((r,o)=>{t.addEventListener("load",(()=>{window.Airwallex?(window.Airwallex.init(e),r(window.Airwallex)):o(new Error("Failed to load Airwallex on load event"))})),t.addEventListener("error",(()=>{o(new Error("Failed to load Airwallex scripts")),t.remove&&t.remove()}))}))};for(;t<3;)try{return await l()}catch(e){t++,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),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:t,loadAirwallexJs:n,init:l,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,l as init,t 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.10.0] */
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"},n=e=>`https://${r[e]||r.prod}`,t="/assets/elements.bundle.min.js?version=1.10.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)}},u=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 f={getGatewayUrl:n,loadAirwallex:l,loadAirwallexJs:o,init:a,redirectToCheckout:i,createElement:w,destroyElement:d,getDeviceFingerprint:y,getElement:c,getPaymentIntent:u,createPaymentMethod:x,createPaymentConsent:A,confirmPaymentIntent:s,confirmPaymentIntentWithSavedCard:m};return e.confirmPaymentIntent=s,e.confirmPaymentIntentWithSavedCard=m,e.createElement=w,e.createPaymentConsent=A,e.createPaymentMethod=x,e.default=f,e.destroyElement=d,e.getDeviceFingerprint=y,e.getElement=c,e.getGatewayUrl=n,e.getPaymentIntent=u,e.init=a,e.loadAirwallex=l,e.loadAirwallexJs=o,e.redirectToCheckout=i,Object.defineProperty(e,"__esModule",{value:!0}),e}({});
1
+ /* Airwallex Checkout Component Version [1.12.0] */
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"},n=e=>`https://${r[e]||r.prod}`,t="/assets/elements.bundle.min.js?version=1.12.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)}},u=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 f={getGatewayUrl:n,loadAirwallex:l,loadAirwallexJs:o,init:a,redirectToCheckout:i,createElement:w,destroyElement:d,getDeviceFingerprint:y,getElement:c,getPaymentIntent:u,createPaymentMethod:x,createPaymentConsent:A,confirmPaymentIntent:s,confirmPaymentIntentWithSavedCard:m};return e.confirmPaymentIntent=s,e.confirmPaymentIntentWithSavedCard=m,e.createElement=w,e.createPaymentConsent=A,e.createPaymentMethod=x,e.default=f,e.destroyElement=d,e.getDeviceFingerprint=y,e.getElement=c,e.getGatewayUrl=n,e.getPaymentIntent=u,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.10.0",
3
+ "version": "1.12.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",
@@ -8,6 +8,7 @@ import {
8
8
  FullFeaturedCardElementOptions,
9
9
  WechatElementOptions,
10
10
  ApplePayButtonOptions,
11
+ GooglePayButtonOptions,
11
12
  } from './element';
12
13
  import { QrcodeElementOptions } from './qrcodeElement';
13
14
  import { Intent, PaymentMethodBasicInfo } from './cardNumber';
@@ -189,12 +190,12 @@ export interface HostPaymentPage {
189
190
  */
190
191
  methods?: Array<PaymentMethodType>;
191
192
  /**
192
- * For card payment only. Indicate whether to capture immediately when authorization succeeds
193
+ * Specifies whether the funds should be requested automatically after the payment is authorized. Set it to `false` if you want to capture the funds sometime later.
193
194
  * @defaultValue `true` if authorization type is `final_auth` and `false` for `pre_auth`.
194
195
  */
195
196
  autoCapture?: boolean;
196
197
  /**
197
- * For card payment only. Indicate the authorization type.
198
+ * The authorization type of the card payment. Set it to `pre_auth` if you want to place a hold on your customer’s card for more than 7 days. Currently it's only available when the card brand is visa or mastercard. You should also set `auto_capture` to be false if you want to enable pre-auth.
198
199
  * @defaultValue `final_auth`
199
200
  */
200
201
  authorizationType?: AuthorizationType;
@@ -387,7 +388,7 @@ export interface PaymentMethod {
387
388
  */
388
389
  card?: {
389
390
  /**
390
- * Indicate whether to capture immediately when authorization succeeds
391
+ * Specifies whether the funds should be requested automatically after the payment is authorized. Set it to `false` if you want to capture the funds sometime later.
391
392
  * @defaultValue `true` if authorization type is `final_auth` and `false` for `pre_auth`.
392
393
  */
393
394
  auto_capture?: boolean;
@@ -429,52 +430,56 @@ export declare const init: (options?: InitOptions | undefined) => void;
429
430
  export declare const redirectToCheckout: (props: HostPaymentPage) => void | string;
430
431
 
431
432
  /**
432
- * 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
433
- * We encourage to use `dropIn` element, since it's easy to scale new payment methods
434
- * We suggest to NOT use `applePayButton`, `googlePayButton`, `wechat`, `qrcode`, `redirect` and `fullFeaturedCard` elements
433
+ * The definition that maps the supported integration element type with its props options used to customize the element. The merchant can check on each element options type for details.
434
+ * We encourage to use `dropIn` element since it scales to new payment methods easily.
435
+ * We suggest to NOT use `applePayButton`, `googlePayButton`, `wechat`, `qrcode`, `redirect` and `fullFeaturedCard` elements.
435
436
  */
436
437
  export interface ElementOptionsTypeMap {
437
438
  /**
438
- * Define card number input element type and it's mapped option type, apply to split card element integration
439
- * Using together with `expiry` and `cvc` element to gain maximum customization
439
+ * Define card number input element type and its mapped option type, apply to split card element integration
440
+ * Use it together with `expiry` and `cvc` element to gain maximum customization.
440
441
  */
441
442
  cardNumber: CardNumberElementOptions;
442
443
  /**
443
- * Define expiry input element type and it's mapped option type, apply to split card element integration
444
- * Using together with `cardNumber` and `cvc` element to gain maximum customization
444
+ * Define expiry input element type and its mapped option type, apply to split card element integration
445
+ * Use it together with `cardNumber` and `cvc` element to gain maximum customization.
445
446
  */
446
447
  expiry: ExpiryDateElementOptions;
447
448
  /**
448
- * Define cvc input element type and it's mapped option type, apply to split card element integration
449
- * Using together with `cardNumber` and `expiry` element to gain maximum customization
449
+ * Define cvc input element type and its mapped option type. It applies to split card element integration.
450
+ * Use it together with `cardNumber` and `expiry` element to gain maximum customization.
450
451
  */
451
452
  cvc: CvcElementOptions;
452
453
  /**
453
- * Define apple pay element type and it's mapped option type
454
+ * Define apple pay element type and its mapped option type.
454
455
  */
455
456
  applePayButton: ApplePayButtonOptions;
456
457
  /**
457
- * 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
458
+ * Define google pay element type and its mapped option type.
459
+ */
460
+ googlePayButton: GooglePayButtonOptions;
461
+ /**
462
+ * Define card element type and its mapped option type. This integration makes the card PCI input (card number / cvc / expiry) behave like a single input.
458
463
  */
459
464
  card: CardElementOptions;
460
465
  /**
461
- * Define WeChat element type and it's mapped option type
466
+ * Define WeChat element type and its mapped option type.
462
467
  */
463
468
  wechat: WechatElementOptions;
464
469
  /**
465
- * Define Qrcode element type and it's mapped option type
470
+ * Define Qrcode element type and its mapped option type.
466
471
  */
467
472
  qrcode: QrcodeElementOptions;
468
473
  /**
469
- * Define Redirect element type and it's mapped option type
474
+ * Define Redirect element type and its mapped option type.
470
475
  */
471
476
  redirect: RedirectElementOptions;
472
477
  /**
473
- * 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
478
+ * Define dropIn element type and its mapped option type. This integration makes integrating with Airwallex supported card and APM (alternative payment method like WeChat etc.) payment method like a single widget.
474
479
  */
475
480
  dropIn: DropInElementOptions;
476
481
  /**
477
- * 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
482
+ * Define full featured card element type and its mapped option type. This integration makes integrating with Airwallex supported card payment method like a single widget.
478
483
  */
479
484
  fullFeaturedCard: FullFeaturedCardElementOptions;
480
485
  }
@@ -552,7 +557,7 @@ export interface Consent {
552
557
  * We encourage to use `dropIn` element, since it's easy to scale new payment methods
553
558
  * We suggest to NOT use `applePayButton`, `googlePayButton`, `wechat`, `qrcode`, `redirect` and `fullFeaturedCard` elements
554
559
  */
555
- export declare function createElement<T extends ElementType>(
560
+ export declare function createElement<T extends keyof ElementOptionsTypeMap>(
556
561
  type: T,
557
562
  options?: ElementOptionsTypeMap[T],
558
563
  ): Element | null;
@@ -78,7 +78,14 @@ export interface PaymentMethodBasicInfo {
78
78
  created_at: string;
79
79
  customer_id: string;
80
80
  status: 'CREATED' | 'VERIFIED' | 'DISABLED';
81
- type: 'card' | 'applepay' | 'googlepay' | 'ach_direct_debit' | 'bacs_direct_debit' | 'becs_direct_debit' | 'sepa_direct_debit';
81
+ type:
82
+ | 'card'
83
+ | 'applepay'
84
+ | 'googlepay'
85
+ | 'ach_direct_debit'
86
+ | 'bacs_direct_debit'
87
+ | 'becs_direct_debit'
88
+ | 'sepa_direct_debit';
82
89
  updated_at: string;
83
90
  card: {
84
91
  avs_check?: string;
@@ -30,12 +30,12 @@ export interface DropInElementOptions extends ElementOptions {
30
30
  */
31
31
  methods?: Array<PaymentMethodType>;
32
32
  /**
33
- * Indicate whether to capture immediately when authorization succeeds
33
+ * Specifies whether the funds should be requested automatically after the payment is authorized. Set it to `false` if you want to capture the funds sometime later.
34
34
  * @defaultValue `true` if authorization type is `final_auth` and `false` for `pre_auth`.
35
35
  */
36
36
  autoCapture?: boolean;
37
37
  /**
38
- * The authorization type.
38
+ * The authorization type of the card payment. Set it to `pre_auth` if you want to place a hold on your customer’s card for more than 7 days. Currently it's only available when the card brand is visa or mastercard. You should also set `auto_capture` to be false if you want to enable pre-auth.
39
39
  * @defaultValue `final_auth`
40
40
  */
41
41
  authorizationType?: AuthorizationType;
@@ -405,12 +405,12 @@ export interface CardElementOptions extends ElementOptions {
405
405
  */
406
406
  disabled?: boolean;
407
407
  /**
408
- * Indicate whether to capture immediately when authorization succeeds.
408
+ * Specifies whether the funds should be requested automatically after the payment is authorized. Set it to `false` if you want to capture the funds sometime later.
409
409
  * @defaultValue `true` if authorization type is `final_auth` and `false` for `pre_auth`.
410
410
  */
411
411
  autoCapture?: boolean;
412
412
  /**
413
- * The authorization type.
413
+ * The authorization type of the card payment. Set it to `pre_auth` if you want to place a hold on your customer’s card for more than 7 days. Currently it's only available when the card brand is visa or mastercard. You should also set `auto_capture` to be false if you want to enable pre-auth.
414
414
  * @defaultValue `final_auth`
415
415
  */
416
416
  authorizationType?: AuthorizationType;
@@ -443,12 +443,12 @@ export interface CardNumberElementOptions extends ElementOptions {
443
443
  */
444
444
  intent?: Intent;
445
445
  /**
446
- * Indicate whether to capture immediately when authorization succeeds.
446
+ * Specifies whether the funds should be requested automatically after the payment is authorized. Set it to `false` if you want to capture the funds sometime later.
447
447
  * @defaultValue `true` if authorization type is `final_auth` and `false` for `pre_auth`.
448
448
  */
449
449
  autoCapture?: boolean;
450
450
  /**
451
- * The authorization type.
451
+ * The authorization type of the card payment. Set it to `pre_auth` if you want to place a hold on your customer’s card for more than 7 days. Currently it's only available when the card brand is visa or mastercard. You should also set `auto_capture` to be false if you want to enable pre-auth.
452
452
  * @defaultValue `final_auth`
453
453
  */
454
454
  authorizationType?: AuthorizationType;
@@ -538,12 +538,12 @@ export interface FullFeaturedCardElementOptions extends ElementOptions {
538
538
  */
539
539
  intent?: Intent;
540
540
  /**
541
- * Indicate whether to capture immediately when authorization succeeds. Apply when shopper uses card payment method.
541
+ * Specifies whether the funds should be requested automatically after the payment is authorized. Set it to `false` if you want to capture the funds sometime later.
542
542
  * @defaultValue `true` if authorization type is `final_auth` and `false` for `pre_auth`.
543
543
  */
544
544
  autoCapture?: boolean;
545
545
  /**
546
- * The authorization type.
546
+ * The authorization type of the card payment. Set it to `pre_auth` if you want to place a hold on your customer’s card for more than 7 days. Currently it's only available when the card brand is visa or mastercard. You should also set `auto_capture` to be false if you want to enable pre-auth.
547
547
  * @defaultValue `final_auth`
548
548
  */
549
549
  authorizationType?: AuthorizationType;
@@ -865,12 +865,12 @@ export interface GooglePayButtonOptions extends GooglePayRequestOptions, Element
865
865
  };
866
866
 
867
867
  /**
868
- * Indicate whether to capture immediately when authorization succeeds.
868
+ * Specifies whether the funds should be requested automatically after the payment is authorized. Set it to `false` if you want to capture the funds sometime later.
869
869
  * @defaultValue `true` if authorization type is `final_auth` and `false` for `pre_auth`.
870
870
  */
871
871
  autoCapture?: boolean;
872
872
  /**
873
- * The authorization type.
873
+ * The authorization type of the card payment. Set it to `pre_auth` if you want to place a hold on your customer’s card for more than 7 days. Currently it's only available when the card brand is visa or mastercard. You should also set `auto_capture` to be false if you want to enable pre-auth.
874
874
  * @defaultValue `final_auth`
875
875
  */
876
876
  authorizationType?: AuthorizationType;
@@ -949,12 +949,12 @@ export interface ApplePayButtonOptions extends ElementOptions, ApplePayRequestOp
949
949
  currency: string;
950
950
  };
951
951
  /**
952
- * Indicate whether to capture immediately when authorization succeeds.
952
+ * Specifies whether the funds should be requested automatically after the payment is authorized. Set it to `false` if you want to capture the funds sometime later.
953
953
  * @defaultValue `true` if authorization type is `final_auth` and `false` for `pre_auth`.
954
954
  */
955
955
  autoCapture?: boolean;
956
956
  /**
957
- * The authorization type.
957
+ * The authorization type of the card payment. Set it to `pre_auth` if you want to place a hold on your customer’s card for more than 7 days. Currently it's only available when the card brand is visa or mastercard. You should also set `auto_capture` to be false if you want to enable pre-auth.
958
958
  * @defaultValue `final_auth`
959
959
  */
960
960
  authorizationType?: AuthorizationType;
package/types/fraud.d.ts CHANGED
@@ -1,7 +1,3 @@
1
- import { AirwallexEnv } from './airwallex';
2
- import { Intent } from './cardNumber';
3
- import { ExtendEventDetail } from './element';
4
-
5
1
  /**
6
2
  * The request payload for getDeviceFingerprint
7
3
  *