@paypercut/checkout-js 1.1.7 → 1.1.9
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/dist/index.cjs
CHANGED
|
@@ -91,7 +91,7 @@ class Emitter {
|
|
|
91
91
|
* Production configuration (for merchants)
|
|
92
92
|
*/
|
|
93
93
|
const productionConfig = {
|
|
94
|
-
version: "1.1.
|
|
94
|
+
version: "1.1.9",
|
|
95
95
|
defaultCheckoutOrigin: 'https://buy.paypercut.io',
|
|
96
96
|
defaultApiOrigin: 'https://api.paypercut.io',
|
|
97
97
|
defaultVaultApiUrl: 'https://api.basistheory.com',
|
|
@@ -796,8 +796,7 @@ class ExpressCheckoutImpl {
|
|
|
796
796
|
}
|
|
797
797
|
else if (this.applePayContainer) {
|
|
798
798
|
// Apple Pay can't mount — remove its container so the remaining button fills full width
|
|
799
|
-
this.
|
|
800
|
-
this.applePayContainer = null;
|
|
799
|
+
this.removeApplePayContainer();
|
|
801
800
|
}
|
|
802
801
|
if (showGooglePay && config) {
|
|
803
802
|
this.mountGooglePayFromConfig();
|
|
@@ -1219,6 +1218,11 @@ class ExpressCheckoutImpl {
|
|
|
1219
1218
|
this.gpayContainer?.remove();
|
|
1220
1219
|
this.gpayContainer = null;
|
|
1221
1220
|
}
|
|
1221
|
+
removeApplePayContainer() {
|
|
1222
|
+
this.applePayContainer?.remove();
|
|
1223
|
+
this.applePayContainer = null;
|
|
1224
|
+
this.applePayButtonEl = null;
|
|
1225
|
+
}
|
|
1222
1226
|
mountGooglePayFromConfig() {
|
|
1223
1227
|
const config = this.expressConfig;
|
|
1224
1228
|
if (!config)
|
|
@@ -1610,7 +1614,12 @@ class ExpressCheckoutImpl {
|
|
|
1610
1614
|
catch { }
|
|
1611
1615
|
this.gpayContainer = null;
|
|
1612
1616
|
}
|
|
1613
|
-
this.
|
|
1617
|
+
if (this.applePayContainer) {
|
|
1618
|
+
try {
|
|
1619
|
+
this.removeApplePayContainer();
|
|
1620
|
+
}
|
|
1621
|
+
catch { }
|
|
1622
|
+
}
|
|
1614
1623
|
this.gpayPaymentRequest = null;
|
|
1615
1624
|
if (this.layoutResizeObserver) {
|
|
1616
1625
|
this.layoutResizeObserver.disconnect();
|
|
@@ -1901,8 +1910,8 @@ class CheckoutImpl {
|
|
|
1901
1910
|
this.emitter.emit(exports.SdkEvent.Loaded);
|
|
1902
1911
|
break;
|
|
1903
1912
|
case 'CHECKOUT_SUCCESS':
|
|
1904
|
-
const { payment_method = {} } = data;
|
|
1905
|
-
this.emitter.emit(exports.SdkEvent.Success, { payment_method });
|
|
1913
|
+
const { payment_method = {}, payment = null } = data;
|
|
1914
|
+
this.emitter.emit(exports.SdkEvent.Success, { payment_method, payment });
|
|
1906
1915
|
break;
|
|
1907
1916
|
case 'CHECKOUT_ERROR':
|
|
1908
1917
|
// Forward error payload (if provided) to SDK consumers
|