@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/README.md
CHANGED
|
@@ -67,12 +67,12 @@ pnpm add @paypercut/checkout-js
|
|
|
67
67
|
|
|
68
68
|
```html
|
|
69
69
|
<!-- jsDelivr (recommended with SRI) -->
|
|
70
|
-
<script src="https://cdn.jsdelivr.net/npm/@paypercut/checkout-js@1.2.
|
|
70
|
+
<script src="https://cdn.jsdelivr.net/npm/@paypercut/checkout-js@1.2.12/dist/paypercut-checkout.iife.min.js"
|
|
71
71
|
integrity="sha384-..."
|
|
72
72
|
crossorigin="anonymous"></script>
|
|
73
73
|
|
|
74
74
|
<!-- or UNPKG -->
|
|
75
|
-
<script src="https://unpkg.com/@paypercut/checkout-js@1.2.
|
|
75
|
+
<script src="https://unpkg.com/@paypercut/checkout-js@1.2.12/dist/paypercut-checkout.iife.min.js"></script>
|
|
76
76
|
```
|
|
77
77
|
|
|
78
78
|
---
|
|
@@ -871,7 +871,7 @@ Tip: Prefer subscribing with the SdkEvent enum for stronger typing.
|
|
|
871
871
|
<body>
|
|
872
872
|
<div id="checkout"></div>
|
|
873
873
|
|
|
874
|
-
<script src="https://cdn.jsdelivr.net/npm/@paypercut/checkout-js@1.2.
|
|
874
|
+
<script src="https://cdn.jsdelivr.net/npm/@paypercut/checkout-js@1.2.12/dist/paypercut-checkout.iife.min.js"></script>
|
|
875
875
|
<script>
|
|
876
876
|
const checkout = PaypercutCheckout({
|
|
877
877
|
id: '01KB23M9EC960C50G3AH14FTTT',
|
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.2.
|
|
94
|
+
version: "1.2.12",
|
|
95
95
|
defaultCheckoutOrigin: 'https://buy.paypercut.io',
|
|
96
96
|
defaultApiOrigin: 'https://api.paypercut.io',
|
|
97
97
|
defaultVaultApiUrl: 'https://api.basistheory.com',
|
|
@@ -536,6 +536,7 @@ exports.SdkEvent = void 0;
|
|
|
536
536
|
// Defined here as a const so the switch in index.ts is compile-checked within this repo.
|
|
537
537
|
// If a message name changes in hosted-checkout, update this map and the switch together.
|
|
538
538
|
const ApplePayBridgeMsg = {
|
|
539
|
+
CAPABILITIES: 'SDK_CAPABILITIES',
|
|
539
540
|
START: 'APPLE_PAY_START',
|
|
540
541
|
VALIDATE_MERCHANT: 'APPLE_PAY_VALIDATE_MERCHANT',
|
|
541
542
|
MERCHANT_SESSION: 'APPLE_PAY_MERCHANT_SESSION',
|
|
@@ -2199,6 +2200,10 @@ class CheckoutImpl {
|
|
|
2199
2200
|
switch (data.type) {
|
|
2200
2201
|
case 'CHECKOUT_LOADED':
|
|
2201
2202
|
this.emitter.emit(exports.SdkEvent.Loaded);
|
|
2203
|
+
// Declare bridge capabilities to the iframe so it can gate the Apple Pay
|
|
2204
|
+
// bridge on SDK support. Old SDKs never send this, so the iframe falls
|
|
2205
|
+
// back to native Apple Pay (same behaviour as before the bridge existed).
|
|
2206
|
+
this.postToIframe({ type: ApplePayBridgeMsg.CAPABILITIES, checkoutId: this.options.id, applePayBridge: true });
|
|
2202
2207
|
break;
|
|
2203
2208
|
case 'CHECKOUT_PROCESSING':
|
|
2204
2209
|
this.emitter.emit(exports.SdkEvent.Processing, {
|