@paypercut/checkout-js 1.2.11 → 1.2.18

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.2.11",
90
+ version: "1.2.18",
91
91
  defaultCheckoutOrigin: 'https://buy.paypercut.io',
92
92
  defaultApiOrigin: 'https://api.paypercut.io',
93
93
  defaultVaultApiUrl: 'https://api.basistheory.com',
@@ -209,6 +209,7 @@ function createThreeDSFrameShell(onCancel) {
209
209
  iframe.setAttribute('frameborder', '0');
210
210
  Object.assign(iframe.style, {
211
211
  border: 'none',
212
+ outline: 'none',
212
213
  borderRadius: '6px',
213
214
  display: 'block',
214
215
  background: 'transparent',
@@ -532,6 +533,7 @@ var SdkEvent;
532
533
  // Defined here as a const so the switch in index.ts is compile-checked within this repo.
533
534
  // If a message name changes in hosted-checkout, update this map and the switch together.
534
535
  const ApplePayBridgeMsg = {
536
+ CAPABILITIES: 'SDK_CAPABILITIES',
535
537
  START: 'APPLE_PAY_START',
536
538
  VALIDATE_MERCHANT: 'APPLE_PAY_VALIDATE_MERCHANT',
537
539
  MERCHANT_SESSION: 'APPLE_PAY_MERCHANT_SESSION',
@@ -2023,8 +2025,6 @@ const PaypercutExpressCheckout = function (options) {
2023
2025
  };
2024
2026
 
2025
2027
  // ── Apple Pay SDK loader ──────────────────────────────────────────────────────
2026
- // Tracks whether the Apple Pay CDN script has already been injected so multiple
2027
- // CheckoutImpl instances don't race to add it more than once.
2028
2028
  let _applePaySdkInjected = false;
2029
2029
  /**
2030
2030
  * Injects Apple's cross-browser Apple Pay JS SDK into the parent page so that
@@ -2195,6 +2195,10 @@ class CheckoutImpl {
2195
2195
  switch (data.type) {
2196
2196
  case 'CHECKOUT_LOADED':
2197
2197
  this.emitter.emit(SdkEvent.Loaded);
2198
+ // Declare bridge capabilities to the iframe so it can gate the Apple Pay
2199
+ // bridge on SDK support. Old SDKs never send this, so the iframe falls
2200
+ // back to native Apple Pay (same behaviour as before the bridge existed).
2201
+ this.postToIframe({ type: ApplePayBridgeMsg.CAPABILITIES, checkoutId: this.options.id, applePayBridge: true });
2198
2202
  break;
2199
2203
  case 'CHECKOUT_PROCESSING':
2200
2204
  this.emitter.emit(SdkEvent.Processing, {