@paypercut/checkout-js 1.1.7 → 1.1.8

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.mjs CHANGED
@@ -87,7 +87,7 @@ class Emitter {
87
87
  * Production configuration (for merchants)
88
88
  */
89
89
  const productionConfig = {
90
- version: "1.1.7",
90
+ version: "1.1.8",
91
91
  defaultCheckoutOrigin: 'https://buy.paypercut.io',
92
92
  defaultApiOrigin: 'https://api.paypercut.io',
93
93
  defaultVaultApiUrl: 'https://api.basistheory.com',
@@ -792,8 +792,7 @@ class ExpressCheckoutImpl {
792
792
  }
793
793
  else if (this.applePayContainer) {
794
794
  // Apple Pay can't mount — remove its container so the remaining button fills full width
795
- this.applePayContainer.remove();
796
- this.applePayContainer = null;
795
+ this.removeApplePayContainer();
797
796
  }
798
797
  if (showGooglePay && config) {
799
798
  this.mountGooglePayFromConfig();
@@ -1215,6 +1214,11 @@ class ExpressCheckoutImpl {
1215
1214
  this.gpayContainer?.remove();
1216
1215
  this.gpayContainer = null;
1217
1216
  }
1217
+ removeApplePayContainer() {
1218
+ this.applePayContainer?.remove();
1219
+ this.applePayContainer = null;
1220
+ this.applePayButtonEl = null;
1221
+ }
1218
1222
  mountGooglePayFromConfig() {
1219
1223
  const config = this.expressConfig;
1220
1224
  if (!config)
@@ -1606,7 +1610,12 @@ class ExpressCheckoutImpl {
1606
1610
  catch { }
1607
1611
  this.gpayContainer = null;
1608
1612
  }
1609
- this.applePayButtonEl = null;
1613
+ if (this.applePayContainer) {
1614
+ try {
1615
+ this.removeApplePayContainer();
1616
+ }
1617
+ catch { }
1618
+ }
1610
1619
  this.gpayPaymentRequest = null;
1611
1620
  if (this.layoutResizeObserver) {
1612
1621
  this.layoutResizeObserver.disconnect();