airwallex-payment-elements
Advanced tools
Comparing version 0.2.83 to 0.2.87
@@ -1,3 +0,3 @@ | ||
/* Airwallex Checkout Component Version [0.2.83] */ | ||
/* Airwallex Checkout Component Version [0.2.87] */ | ||
"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}`,o="/assets/elements.bundle.min.js",t=e=>{const r=document.createElement("script");r.src=`${e}${o}`;const t=document.head||document.body;if(!t)throw new Error("Airwallex payment scripts requires a <head> or <body> html element in order to be loaded.");return t.appendChild(r),r};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.confirmPaymentIntentWithSavedCard=async e=>{if(window.Airwallex)return window.Airwallex.confirmPaymentIntentWithSavedCard(e);{const e="Please loadAirwallex() before confirmPaymentIntentWithSavedCard();";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.createPaymentConsent=async e=>{if(window.Airwallex)return window.Airwallex.createPaymentConsent(e);{const e="Please loadAirwallex() before createPaymentConsent();";throw console.error(e),new Error(e)}},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.get3dsReturnUrl=e=>window.Airwallex.get3dsReturnUrl(e),exports.getBrowserInfo=e=>window.Airwallex.getBrowserInfo(e),exports.getDeviceFingerprint=e=>window.Airwallex.getDeviceFingerprint(e),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.handle3ds=e=>window.Airwallex.handle3ds(e),exports.init=e=>{window.Airwallex?window.Airwallex.init(e):console.error("Please loadAirwallex() before init();")},exports.loadAirwallex=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="${o}"], script[src="${o}/"]`)||t(r((null==e?void 0:e.env)||"prod"));return new Promise(((r,o)=>{n.addEventListener("load",(()=>{window.Airwallex?(window.Airwallex.init(e),r(window.Airwallex)):o(new Error("Failed to load Airwallex on load event"))})),n.addEventListener("error",(()=>{o(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},exports.loadAirwallexJs=t,exports.redirectToCheckout=e=>{if(window.Airwallex)return window.Airwallex.redirectToCheckout(e);console.error("Please loadAirwallex() before redirectToCheckout();")}; | ||
//# sourceMappingURL=airwallex.cjs.js.map |
@@ -1,3 +0,3 @@ | ||
/* Airwallex Checkout Component Version [0.2.83] */ | ||
/* Airwallex Checkout Component Version [0.2.87] */ | ||
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",l=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},n=async e=>{if("undefined"==typeof window)return null;if(window.Airwallex)return window.Airwallex;let n=0;const i=async()=>{const n=document.querySelector(`script[src="${o}"], script[src="${o}/"]`)||l(r((null==e?void 0:e.env)||"prod"));return new Promise(((r,o)=>{n.addEventListener("load",(()=>{window.Airwallex?(window.Airwallex.init(e),r(window.Airwallex)):o(new Error("Failed to load Airwallex on load event"))})),n.addEventListener("error",(()=>{o(new Error("Failed to load Airwallex scripts")),n.remove&&n.remove()}))}))};for(;n<3;)try{return await i()}catch(e){n++,await new Promise((e=>window.setTimeout(e,500)))}return null},i=e=>{window.Airwallex?window.Airwallex.init(e):console.error("Please loadAirwallex() before init();")},t=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),a=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)}},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.getBrowserInfo(e),f=e=>window.Airwallex.getDeviceFingerprint(e),h=e=>window.Airwallex.get3dsReturnUrl(e),y=e=>window.Airwallex.handle3ds(e);export{c as confirmPaymentIntent,s as confirmPaymentIntentWithSavedCard,w as createElement,A as createPaymentConsent,x as createPaymentMethod,a as destroyElement,h as get3dsReturnUrl,u as getBrowserInfo,f as getDeviceFingerprint,d as getElement,r as getGatewayUrl,m as getPaymentIntent,y as handle3ds,i as init,n as loadAirwallex,l as loadAirwallexJs,t as redirectToCheckout}; | ||
//# sourceMappingURL=airwallex.es.js.map |
@@ -1,3 +0,3 @@ | ||
/* Airwallex Checkout Component Version [0.2.83] */ | ||
/* Airwallex Checkout Component Version [0.2.87] */ | ||
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}`,o="/assets/elements.bundle.min.js",l=e=>{const r=document.createElement("script");r.src=`${e}${o}`;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};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.confirmPaymentIntentWithSavedCard=async e=>{if(window.Airwallex)return window.Airwallex.confirmPaymentIntentWithSavedCard(e);{const e="Please loadAirwallex() before confirmPaymentIntentWithSavedCard();";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.createPaymentConsent=async e=>{if(window.Airwallex)return window.Airwallex.createPaymentConsent(e);{const e="Please loadAirwallex() before createPaymentConsent();";throw console.error(e),new Error(e)}},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.get3dsReturnUrl=e=>window.Airwallex.get3dsReturnUrl(e),e.getBrowserInfo=e=>window.Airwallex.getBrowserInfo(e),e.getDeviceFingerprint=e=>window.Airwallex.getDeviceFingerprint(e),e.getElement=e=>window.Airwallex?window.Airwallex.getElement(e):(console.error("Please loadAirwallex() before getElement();"),null),e.getGatewayUrl=n,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.handle3ds=e=>window.Airwallex.handle3ds(e),e.init=e=>{window.Airwallex?window.Airwallex.init(e):console.error("Please loadAirwallex() before init();")},e.loadAirwallex=async e=>{if("undefined"==typeof window)return null;if(window.Airwallex)return window.Airwallex;let r=0;const t=async()=>{const r=document.querySelector(`script[src="${o}"], script[src="${o}/"]`)||l(n((null==e?void 0:e.env)||"prod"));return new Promise(((n,o)=>{r.addEventListener("load",(()=>{window.Airwallex?(window.Airwallex.init(e),n(window.Airwallex)):o(new Error("Failed to load Airwallex on load event"))})),r.addEventListener("error",(()=>{o(new Error("Failed to load Airwallex scripts")),r.remove&&r.remove()}))}))};for(;r<3;)try{return await t()}catch(e){r++,await new Promise((e=>window.setTimeout(e,500)))}return null},e.loadAirwallexJs=l,e.redirectToCheckout=e=>{if(window.Airwallex)return window.Airwallex.redirectToCheckout(e);console.error("Please loadAirwallex() before redirectToCheckout();")},Object.defineProperty(e,"__esModule",{value:!0}),e}({}); | ||
//# sourceMappingURL=airwallex.iife.js.map |
{ | ||
"name": "airwallex-payment-elements", | ||
"version": "0.2.83", | ||
"version": "0.2.87", | ||
"module": "lib/bin/airwallex.es.js", | ||
@@ -5,0 +5,0 @@ "main": "lib/bin/airwallex.cjs.js", |
@@ -89,6 +89,2 @@ import { | ||
/** | ||
* Only applicable when next_triggered_by is customer and method is card. If true, the customer must provide cvc for the subsequent payment with this PaymentConsent | ||
*/ | ||
requires_cvc?: boolean; | ||
/** | ||
* Currency of the initial PaymentIntent to verify the PaymentConsent. Three-letter ISO currency code. Only applicable for card method | ||
@@ -123,6 +119,2 @@ */ | ||
/** | ||
* Only applicable when next_triggered_by is customer. If true, the customer must provide cvc for the subsequent payment with this PaymentConsent | ||
*/ | ||
requires_cvc?: boolean; | ||
/** | ||
* Currency of the initial PaymentIntent to verify the PaymentConsent. Three-letter ISO currency code | ||
@@ -504,6 +496,2 @@ */ | ||
/** | ||
* Whether the consent is required cvc. | ||
*/ | ||
requires_cvc: boolean; | ||
/** | ||
* It determines who will be the next one to trigger this consent. | ||
@@ -622,6 +610,2 @@ */ | ||
/** | ||
* `requires_cvc` used for decide whether cvc is required for subsequent transactions. Only applicable when next_triggered_by is `customer` | ||
*/ | ||
requires_cvc?: boolean; | ||
/** | ||
* The billing info for the payment consent | ||
@@ -634,2 +618,6 @@ */ | ||
connected_account_id?: string; | ||
/** | ||
* A set of key-value pairs that can be attached to this PaymentConsent | ||
*/ | ||
metadata?: Record<string, unknown>; | ||
} | ||
@@ -636,0 +624,0 @@ |
@@ -33,3 +33,2 @@ /** | ||
next_triggered_by: 'merchant' | 'customer'; | ||
requires_cvc: boolean; | ||
status: 'PENDING_VERIFICATION' | 'VERIFIED' | 'DISABLED'; | ||
@@ -51,2 +50,8 @@ payment_method: { | ||
}; | ||
card?: { | ||
brand: string; | ||
bin: string; | ||
last4: string; | ||
network_token: boolean; | ||
}; | ||
}; | ||
@@ -60,2 +65,3 @@ }[]; | ||
last4: string; | ||
network_token: boolean; | ||
}; | ||
@@ -62,0 +68,0 @@ }[]; |
@@ -91,3 +91,9 @@ import { Intent, PaymentMethodBasicInfo } from './cardNumber'; | ||
| 'truemoney' | ||
| 'atome'; | ||
| 'atome' | ||
| 'duit_now' | ||
| 'pay_now' | ||
| 'prompt_pay' | ||
| 'go_pay' | ||
| 'linkaja' | ||
| 'jenius_pay'; | ||
@@ -94,0 +100,0 @@ export type DirectDebitPaymentMethod = |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
125060