@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/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.18/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.18/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.18/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.18",
|
|
95
95
|
defaultCheckoutOrigin: 'https://buy.paypercut.io',
|
|
96
96
|
defaultApiOrigin: 'https://api.paypercut.io',
|
|
97
97
|
defaultVaultApiUrl: 'https://api.basistheory.com',
|
|
@@ -213,6 +213,7 @@ function createThreeDSFrameShell(onCancel) {
|
|
|
213
213
|
iframe.setAttribute('frameborder', '0');
|
|
214
214
|
Object.assign(iframe.style, {
|
|
215
215
|
border: 'none',
|
|
216
|
+
outline: 'none',
|
|
216
217
|
borderRadius: '6px',
|
|
217
218
|
display: 'block',
|
|
218
219
|
background: 'transparent',
|
|
@@ -536,6 +537,7 @@ exports.SdkEvent = void 0;
|
|
|
536
537
|
// Defined here as a const so the switch in index.ts is compile-checked within this repo.
|
|
537
538
|
// If a message name changes in hosted-checkout, update this map and the switch together.
|
|
538
539
|
const ApplePayBridgeMsg = {
|
|
540
|
+
CAPABILITIES: 'SDK_CAPABILITIES',
|
|
539
541
|
START: 'APPLE_PAY_START',
|
|
540
542
|
VALIDATE_MERCHANT: 'APPLE_PAY_VALIDATE_MERCHANT',
|
|
541
543
|
MERCHANT_SESSION: 'APPLE_PAY_MERCHANT_SESSION',
|
|
@@ -2027,8 +2029,6 @@ const PaypercutExpressCheckout = function (options) {
|
|
|
2027
2029
|
};
|
|
2028
2030
|
|
|
2029
2031
|
// ── Apple Pay SDK loader ──────────────────────────────────────────────────────
|
|
2030
|
-
// Tracks whether the Apple Pay CDN script has already been injected so multiple
|
|
2031
|
-
// CheckoutImpl instances don't race to add it more than once.
|
|
2032
2032
|
let _applePaySdkInjected = false;
|
|
2033
2033
|
/**
|
|
2034
2034
|
* Injects Apple's cross-browser Apple Pay JS SDK into the parent page so that
|
|
@@ -2199,6 +2199,10 @@ class CheckoutImpl {
|
|
|
2199
2199
|
switch (data.type) {
|
|
2200
2200
|
case 'CHECKOUT_LOADED':
|
|
2201
2201
|
this.emitter.emit(exports.SdkEvent.Loaded);
|
|
2202
|
+
// Declare bridge capabilities to the iframe so it can gate the Apple Pay
|
|
2203
|
+
// bridge on SDK support. Old SDKs never send this, so the iframe falls
|
|
2204
|
+
// back to native Apple Pay (same behaviour as before the bridge existed).
|
|
2205
|
+
this.postToIframe({ type: ApplePayBridgeMsg.CAPABILITIES, checkoutId: this.options.id, applePayBridge: true });
|
|
2202
2206
|
break;
|
|
2203
2207
|
case 'CHECKOUT_PROCESSING':
|
|
2204
2208
|
this.emitter.emit(exports.SdkEvent.Processing, {
|