@paypercut/checkout-js 1.2.9 → 1.2.12

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.9",
90
+ version: "1.2.12",
91
91
  defaultCheckoutOrigin: 'https://buy.paypercut.io',
92
92
  defaultApiOrigin: 'https://api.paypercut.io',
93
93
  defaultVaultApiUrl: 'https://api.basistheory.com',
@@ -532,6 +532,7 @@ var SdkEvent;
532
532
  // Defined here as a const so the switch in index.ts is compile-checked within this repo.
533
533
  // If a message name changes in hosted-checkout, update this map and the switch together.
534
534
  const ApplePayBridgeMsg = {
535
+ CAPABILITIES: 'SDK_CAPABILITIES',
535
536
  START: 'APPLE_PAY_START',
536
537
  VALIDATE_MERCHANT: 'APPLE_PAY_VALIDATE_MERCHANT',
537
538
  MERCHANT_SESSION: 'APPLE_PAY_MERCHANT_SESSION',
@@ -2195,6 +2196,10 @@ class CheckoutImpl {
2195
2196
  switch (data.type) {
2196
2197
  case 'CHECKOUT_LOADED':
2197
2198
  this.emitter.emit(SdkEvent.Loaded);
2199
+ // Declare bridge capabilities to the iframe so it can gate the Apple Pay
2200
+ // bridge on SDK support. Old SDKs never send this, so the iframe falls
2201
+ // back to native Apple Pay (same behaviour as before the bridge existed).
2202
+ this.postToIframe({ type: ApplePayBridgeMsg.CAPABILITIES, checkoutId: this.options.id, applePayBridge: true });
2198
2203
  break;
2199
2204
  case 'CHECKOUT_PROCESSING':
2200
2205
  this.emitter.emit(SdkEvent.Processing, {