@paydock/client-sdk 1.123.2 → 1.124.1
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/bundles/index.cjs +116 -72
- package/bundles/index.cjs.d.ts +25 -1
- package/bundles/index.mjs +116 -72
- package/bundles/index.mjs.d.ts +25 -1
- package/bundles/types/api/api-base.d.ts +1 -1
- package/bundles/types/api/api-base.d.ts.map +1 -1
- package/bundles/types/checkout/checkout.d.ts.map +1 -1
- package/bundles/types/index-cba.d.ts +33 -0
- package/bundles/types/index-cba.d.ts.map +1 -1
- package/bundles/types/index.d.ts +33 -0
- package/bundles/types/index.d.ts.map +1 -1
- package/bundles/types/wallet-buttons/wallet-services/apple.wallet-service.d.ts +1 -0
- package/bundles/types/wallet-buttons/wallet-services/apple.wallet-service.d.ts.map +1 -1
- package/bundles/types/wallet-buttons-express/services/apple-pay/apple-pay.wallet-button-express.d.ts +1 -0
- package/bundles/types/wallet-buttons-express/services/apple-pay/apple-pay.wallet-button-express.d.ts.map +1 -1
- package/bundles/widget.umd.js +116 -72
- package/bundles/widget.umd.js.d.ts +25 -1
- package/bundles/widget.umd.js.min.d.ts +25 -1
- package/bundles/widget.umd.min.js +1 -1
- package/package.json +1 -1
package/bundles/index.cjs
CHANGED
|
@@ -954,7 +954,7 @@ SDK.headerKeys = Object.freeze({
|
|
|
954
954
|
version: 'x-sdk-version',
|
|
955
955
|
type: 'x-sdk-type'
|
|
956
956
|
});
|
|
957
|
-
SDK._version = 'v1.
|
|
957
|
+
SDK._version = 'v1.124.1';
|
|
958
958
|
|
|
959
959
|
/******************************************************************************
|
|
960
960
|
Copyright (c) Microsoft Corporation.
|
|
@@ -4235,11 +4235,11 @@ function createNewrelicConfig() {
|
|
|
4235
4235
|
var gateway = 'bam.nr-data.net';
|
|
4236
4236
|
var params = {
|
|
4237
4237
|
enabled: 'true',
|
|
4238
|
-
accountId: '
|
|
4239
|
-
agentId: '
|
|
4240
|
-
applicationId: '
|
|
4241
|
-
licenseKey: '
|
|
4242
|
-
trustKey: '
|
|
4238
|
+
accountId: '',
|
|
4239
|
+
agentId: '',
|
|
4240
|
+
applicationId: '',
|
|
4241
|
+
licenseKey: '',
|
|
4242
|
+
trustKey: ''
|
|
4243
4243
|
};
|
|
4244
4244
|
var disabled = function disabled() {
|
|
4245
4245
|
return {
|
|
@@ -13201,10 +13201,13 @@ var AppleWalletService = /*#__PURE__*/function (_WalletService) {
|
|
|
13201
13201
|
var _a, _b, _c;
|
|
13202
13202
|
if (((_a = this.meta) === null || _a === void 0 ? void 0 : _a.style) && _typeof$1((_b = this.meta) === null || _b === void 0 ? void 0 : _b.style) === 'object') {
|
|
13203
13203
|
var metaStyles = JSON.parse(JSON.stringify((_c = this.meta) === null || _c === void 0 ? void 0 : _c.style));
|
|
13204
|
-
if ('google' in metaStyles)
|
|
13204
|
+
if ('google' in metaStyles) {
|
|
13205
13205
|
// biome-ignore lint/performance/noDelete: <explanation>
|
|
13206
13206
|
metaStyles === null || metaStyles === void 0 ? true : delete metaStyles.google; // to offer backward compatibility
|
|
13207
|
-
|
|
13207
|
+
}
|
|
13208
|
+
if ('apple' in metaStyles) {
|
|
13209
|
+
return metaStyles === null || metaStyles === void 0 ? void 0 : metaStyles.apple;
|
|
13210
|
+
}
|
|
13208
13211
|
return metaStyles; // to offer backward compatibility
|
|
13209
13212
|
}
|
|
13210
13213
|
return null;
|
|
@@ -13215,10 +13218,13 @@ var AppleWalletService = /*#__PURE__*/function (_WalletService) {
|
|
|
13215
13218
|
var _a, _b, _c, _d;
|
|
13216
13219
|
if (((_a = this.meta) === null || _a === void 0 ? void 0 : _a.raw_data_initialization) && ((_b = this.meta) === null || _b === void 0 ? void 0 : _b.raw_data_initialization) && _typeof$1((_c = this.meta) === null || _c === void 0 ? void 0 : _c.raw_data_initialization) === 'object') {
|
|
13217
13220
|
var metaRawDataInit = JSON.parse(JSON.stringify((_d = this.meta) === null || _d === void 0 ? void 0 : _d.raw_data_initialization));
|
|
13218
|
-
if ('google' in metaRawDataInit)
|
|
13221
|
+
if ('google' in metaRawDataInit) {
|
|
13219
13222
|
// biome-ignore lint/performance/noDelete: <explanation>
|
|
13220
13223
|
metaRawDataInit === null || metaRawDataInit === void 0 ? true : delete metaRawDataInit.google; // to offer backward compatibility
|
|
13221
|
-
|
|
13224
|
+
}
|
|
13225
|
+
if ('apple' in metaRawDataInit) {
|
|
13226
|
+
return metaRawDataInit === null || metaRawDataInit === void 0 ? void 0 : metaRawDataInit.apple;
|
|
13227
|
+
}
|
|
13222
13228
|
return metaRawDataInit; // to offer backward compatibility
|
|
13223
13229
|
}
|
|
13224
13230
|
return null;
|
|
@@ -13246,28 +13252,16 @@ var AppleWalletService = /*#__PURE__*/function (_WalletService) {
|
|
|
13246
13252
|
});
|
|
13247
13253
|
return;
|
|
13248
13254
|
}
|
|
13255
|
+
if (customElements === null || customElements === void 0 ? void 0 : customElements.get('apple-pay-button')) {
|
|
13256
|
+
this.onScriptLoaded(container);
|
|
13257
|
+
return;
|
|
13258
|
+
}
|
|
13249
13259
|
var applePayScript = document.createElement('script');
|
|
13250
13260
|
applePayScript.src = "https://applepay.cdn-apple.com/jsapi/1.latest/apple-pay-sdk.js";
|
|
13251
13261
|
applePayScript.type = "text/javascript";
|
|
13252
13262
|
applePayScript.crossOrigin = 'anonymous';
|
|
13253
13263
|
applePayScript.onload = function () {
|
|
13254
|
-
_this2.
|
|
13255
|
-
var _a;
|
|
13256
|
-
if (!available) {
|
|
13257
|
-
_this2.eventEmitter.emit(WALLET_EVENT.UNAVAILABLE, {
|
|
13258
|
-
wallet: WALLET_TYPE.APPLE
|
|
13259
|
-
});
|
|
13260
|
-
return;
|
|
13261
|
-
}
|
|
13262
|
-
// Store default shipping option
|
|
13263
|
-
if (_this2.isShippingRequired() && _this2.hasShippingOptions()) {
|
|
13264
|
-
_this2.selectedShippingOption = (_a = _this2.meta) === null || _a === void 0 ? void 0 : _a.shipping_options[0];
|
|
13265
|
-
_this2.latestShippingData.shippingMethod = _this2.formatShippingOptions([_this2.selectedShippingOption])[0];
|
|
13266
|
-
}
|
|
13267
|
-
_this2.mount(container);
|
|
13268
|
-
})["catch"](function (err) {
|
|
13269
|
-
return console.error("Error checking ApplePay availability", err);
|
|
13270
|
-
});
|
|
13264
|
+
_this2.onScriptLoaded(container);
|
|
13271
13265
|
};
|
|
13272
13266
|
applePayScript.onerror = function (err) {
|
|
13273
13267
|
console.error("AppleWalletService: Error loading ApplePay script", err);
|
|
@@ -13278,15 +13272,43 @@ var AppleWalletService = /*#__PURE__*/function (_WalletService) {
|
|
|
13278
13272
|
};
|
|
13279
13273
|
document.head.appendChild(applePayScript);
|
|
13280
13274
|
}
|
|
13275
|
+
}, {
|
|
13276
|
+
key: "onScriptLoaded",
|
|
13277
|
+
value: function onScriptLoaded(container) {
|
|
13278
|
+
var _this3 = this;
|
|
13279
|
+
this.checkAvailability().then(function (available) {
|
|
13280
|
+
var _a;
|
|
13281
|
+
if (!available) {
|
|
13282
|
+
_this3.eventEmitter.emit(WALLET_EVENT.UNAVAILABLE, {
|
|
13283
|
+
wallet: WALLET_TYPE.APPLE
|
|
13284
|
+
});
|
|
13285
|
+
return;
|
|
13286
|
+
}
|
|
13287
|
+
// Store default shipping option
|
|
13288
|
+
if (_this3.isShippingRequired() && _this3.hasShippingOptions()) {
|
|
13289
|
+
_this3.selectedShippingOption = (_a = _this3.meta) === null || _a === void 0 ? void 0 : _a.shipping_options[0];
|
|
13290
|
+
_this3.latestShippingData.shippingMethod = _this3.formatShippingOptions([_this3.selectedShippingOption])[0];
|
|
13291
|
+
}
|
|
13292
|
+
_this3.mount(container);
|
|
13293
|
+
})["catch"](function (err) {
|
|
13294
|
+
return console.error("Error checking ApplePay availability", err);
|
|
13295
|
+
});
|
|
13296
|
+
}
|
|
13281
13297
|
}, {
|
|
13282
13298
|
key: "update",
|
|
13283
13299
|
value: function update(data) {
|
|
13284
13300
|
var _a, _b, _c;
|
|
13285
|
-
if (!this.latestShippingChangePromiseResolve || !this.latestShippingChangePromiseReject)
|
|
13286
|
-
|
|
13301
|
+
if (!this.latestShippingChangePromiseResolve || !this.latestShippingChangePromiseReject) {
|
|
13302
|
+
return;
|
|
13303
|
+
}
|
|
13304
|
+
if (!data.success || !data.body) {
|
|
13305
|
+
return this.latestShippingChangePromiseReject();
|
|
13306
|
+
}
|
|
13287
13307
|
var newAmount = (_a = data === null || data === void 0 ? void 0 : data.body) === null || _a === void 0 ? void 0 : _a.amount;
|
|
13288
13308
|
var newShippingOptions = (_b = data === null || data === void 0 ? void 0 : data.body) === null || _b === void 0 ? void 0 : _b.shipping_options;
|
|
13289
|
-
if (newAmount)
|
|
13309
|
+
if (newAmount) {
|
|
13310
|
+
this.meta.amount = newAmount;
|
|
13311
|
+
}
|
|
13290
13312
|
if (newShippingOptions) {
|
|
13291
13313
|
this.meta.shipping_options = newShippingOptions;
|
|
13292
13314
|
this.selectedShippingOption = newShippingOptions ? newShippingOptions[0] : undefined;
|
|
@@ -13306,17 +13328,17 @@ var AppleWalletService = /*#__PURE__*/function (_WalletService) {
|
|
|
13306
13328
|
}, {
|
|
13307
13329
|
key: "checkAvailability",
|
|
13308
13330
|
value: function checkAvailability() {
|
|
13309
|
-
var
|
|
13331
|
+
var _this4 = this;
|
|
13310
13332
|
return new Promise(function (resolve, _reject) {
|
|
13311
13333
|
var _a;
|
|
13312
13334
|
if (!window.ApplePaySession || !ApplePaySession) {
|
|
13313
13335
|
resolve(false);
|
|
13314
13336
|
}
|
|
13315
13337
|
var formattedCapabilities = DEFAULT_APPLE_PAY_CAPABILITIES$1;
|
|
13316
|
-
if (((_a =
|
|
13317
|
-
formattedCapabilities =
|
|
13338
|
+
if (((_a = _this4.meta.apple_pay_capabilities) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
13339
|
+
formattedCapabilities = _this4.formatCapabilities(_this4.meta.apple_pay_capabilities);
|
|
13318
13340
|
}
|
|
13319
|
-
ApplePaySession.applePayCapabilities(
|
|
13341
|
+
ApplePaySession.applePayCapabilities(_this4.getMerchantId()).then(function (capabilities) {
|
|
13320
13342
|
var canMakePayment = formattedCapabilities.includes(capabilities === null || capabilities === void 0 ? void 0 : capabilities.paymentCredentialStatus);
|
|
13321
13343
|
resolve(canMakePayment);
|
|
13322
13344
|
})["catch"](function (_err) {
|
|
@@ -13364,11 +13386,17 @@ var AppleWalletService = /*#__PURE__*/function (_WalletService) {
|
|
|
13364
13386
|
var _a;
|
|
13365
13387
|
var rawDataInitialization = this.getMetaRawDataInitialization();
|
|
13366
13388
|
if (rawDataInitialization && _typeof$1(rawDataInitialization) === 'object') {
|
|
13367
|
-
if (_typeof$1(rawDataInitialization.total) === 'object')
|
|
13368
|
-
|
|
13369
|
-
|
|
13370
|
-
|
|
13371
|
-
|
|
13389
|
+
if (_typeof$1(rawDataInitialization.total) === 'object') {
|
|
13390
|
+
rawDataInitialization.total.amount = this.meta.amount.toString();
|
|
13391
|
+
} else {
|
|
13392
|
+
rawDataInitialization.total = {
|
|
13393
|
+
label: ((_a = this.meta) === null || _a === void 0 ? void 0 : _a.amount_label) || '',
|
|
13394
|
+
amount: this.meta.amount.toString()
|
|
13395
|
+
};
|
|
13396
|
+
}
|
|
13397
|
+
if (this.isShippingRequired() && this.hasShippingOptions()) {
|
|
13398
|
+
rawDataInitialization.shippingMethods = this.formatShippingOptions(this.meta.shipping_options);
|
|
13399
|
+
}
|
|
13372
13400
|
}
|
|
13373
13401
|
return rawDataInitialization || _extends(_extends(_extends({
|
|
13374
13402
|
countryCode: this.meta.country.toUpperCase(),
|
|
@@ -13392,22 +13420,22 @@ var AppleWalletService = /*#__PURE__*/function (_WalletService) {
|
|
|
13392
13420
|
}, {
|
|
13393
13421
|
key: "getMerchantSession",
|
|
13394
13422
|
value: function getMerchantSession() {
|
|
13395
|
-
var
|
|
13423
|
+
var _this5 = this;
|
|
13396
13424
|
return new Promise(function (resolve, reject) {
|
|
13397
|
-
return
|
|
13425
|
+
return _this5.eventEmitter.emit(WALLET_EVENT.CALLBACK, {
|
|
13398
13426
|
data: _extends({
|
|
13399
13427
|
request_type: "CREATE_SESSION",
|
|
13400
13428
|
wallet_type: WALLET_TYPE.APPLE,
|
|
13401
13429
|
session_id: window.location.hostname
|
|
13402
|
-
},
|
|
13403
|
-
request_shipping:
|
|
13430
|
+
}, _this5.isShippingRequired() && {
|
|
13431
|
+
request_shipping: _this5.meta.request_shipping
|
|
13404
13432
|
}),
|
|
13405
13433
|
onSuccess: function onSuccess(res) {
|
|
13406
13434
|
return resolve(res);
|
|
13407
13435
|
},
|
|
13408
13436
|
onError: function onError(message) {
|
|
13409
13437
|
console.error('Error generating order id', message);
|
|
13410
|
-
|
|
13438
|
+
_this5.eventEmitter.emit(WALLET_EVENT.PAYMENT_ERROR, {
|
|
13411
13439
|
message: message
|
|
13412
13440
|
});
|
|
13413
13441
|
reject(message);
|
|
@@ -13418,10 +13446,10 @@ var AppleWalletService = /*#__PURE__*/function (_WalletService) {
|
|
|
13418
13446
|
}, {
|
|
13419
13447
|
key: "handleMerchantOnButtonClickEvent",
|
|
13420
13448
|
value: function handleMerchantOnButtonClickEvent() {
|
|
13421
|
-
var
|
|
13449
|
+
var _this6 = this;
|
|
13422
13450
|
return new Promise(function (resolve, reject) {
|
|
13423
13451
|
var merchantResult;
|
|
13424
|
-
|
|
13452
|
+
_this6.eventEmitter.emit(WALLET_EVENT.BUTTON_CLICK, {
|
|
13425
13453
|
attachResult: function attachResult(value) {
|
|
13426
13454
|
merchantResult = value;
|
|
13427
13455
|
}
|
|
@@ -18603,7 +18631,8 @@ var Checkout = /*#__PURE__*/function () {
|
|
|
18603
18631
|
this.checkoutApi.callback({
|
|
18604
18632
|
event: 'callback.generic.ready',
|
|
18605
18633
|
payload: {
|
|
18606
|
-
platform: 'web'
|
|
18634
|
+
platform: 'web',
|
|
18635
|
+
sdk_version: this.api.ctx.sdkVersion
|
|
18607
18636
|
}
|
|
18608
18637
|
}).then(function () {
|
|
18609
18638
|
return Spinner.hide();
|
|
@@ -19289,17 +19318,13 @@ var ApplePayWalletButtonExpress = /*#__PURE__*/function (_BaseWalletButton) {
|
|
|
19289
19318
|
_classCallCheck(this, ApplePayWalletButtonExpress);
|
|
19290
19319
|
_this = _callSuper(this, ApplePayWalletButtonExpress, [selector, publicKeyOrAccessToken, gatewayId, meta, ['amount_label', 'country']]);
|
|
19291
19320
|
_this.onApplePayButtonClicked = function () {
|
|
19292
|
-
|
|
19293
|
-
|
|
19294
|
-
|
|
19295
|
-
|
|
19296
|
-
|
|
19297
|
-
|
|
19298
|
-
|
|
19299
|
-
_this.paymentSession.begin();
|
|
19300
|
-
})["catch"](function () {
|
|
19301
|
-
_this.handleCheckoutClose();
|
|
19302
|
-
});
|
|
19321
|
+
_this.paymentSession = new ApplePaySession(14, _this.createRequest());
|
|
19322
|
+
_this.paymentSession.onvalidatemerchant = _this.onValidateMerchant;
|
|
19323
|
+
_this.paymentSession.onpaymentauthorized = _this.onPaymentAuthorized;
|
|
19324
|
+
_this.paymentSession.oncancel = _this.onCancelPayment;
|
|
19325
|
+
_this.paymentSession.onshippingmethodselected = _this.onApplePayShippingMethodUpdate;
|
|
19326
|
+
_this.paymentSession.onshippingcontactselected = _this.onApplePayShippingContactUpdate;
|
|
19327
|
+
_this.paymentSession.begin();
|
|
19303
19328
|
};
|
|
19304
19329
|
_this.onValidateMerchant = function (event) {
|
|
19305
19330
|
_this.handleMerchantOnExpressButtonClickEvent().then(function () {
|
|
@@ -19425,22 +19450,18 @@ var ApplePayWalletButtonExpress = /*#__PURE__*/function (_BaseWalletButton) {
|
|
|
19425
19450
|
key: "load",
|
|
19426
19451
|
value: function load() {
|
|
19427
19452
|
var _this4 = this;
|
|
19428
|
-
if (!window.Promise)
|
|
19453
|
+
if (!window.Promise) {
|
|
19454
|
+
return this.handleOnUnavailable();
|
|
19455
|
+
}
|
|
19456
|
+
if (customElements === null || customElements === void 0 ? void 0 : customElements.get('apple-pay-button')) {
|
|
19457
|
+
return this.onScriptLoaded();
|
|
19458
|
+
}
|
|
19429
19459
|
var applePayScript = document.createElement('script');
|
|
19430
19460
|
applePayScript.src = "https://applepay.cdn-apple.com/jsapi/1.latest/apple-pay-sdk.js";
|
|
19431
19461
|
applePayScript.type = "text/javascript";
|
|
19432
19462
|
applePayScript.crossOrigin = 'anonymous';
|
|
19433
19463
|
applePayScript.onload = function () {
|
|
19434
|
-
_this4.
|
|
19435
|
-
if (!config || config.type !== 'MasterCard' || !config.credentials || !config.credentials.apple || !config.credentials.apple.merchant) throw new Error('Invalid configuration');
|
|
19436
|
-
return _this4.checkAvailability(config);
|
|
19437
|
-
}).then(function (available) {
|
|
19438
|
-
if (!available) return _this4.handleOnUnavailable();
|
|
19439
|
-
return _this4.mount();
|
|
19440
|
-
})["catch"](function (err) {
|
|
19441
|
-
if (err) _this4.handleOnError(err);
|
|
19442
|
-
_this4.handleOnUnavailable();
|
|
19443
|
-
});
|
|
19464
|
+
_this4.onScriptLoaded();
|
|
19444
19465
|
};
|
|
19445
19466
|
applePayScript.onerror = function (err) {
|
|
19446
19467
|
console.error("ApplePayWalletButtonExpress: Error loading ApplePay script", err);
|
|
@@ -19449,6 +19470,27 @@ var ApplePayWalletButtonExpress = /*#__PURE__*/function (_BaseWalletButton) {
|
|
|
19449
19470
|
};
|
|
19450
19471
|
document.head.appendChild(applePayScript);
|
|
19451
19472
|
}
|
|
19473
|
+
}, {
|
|
19474
|
+
key: "onScriptLoaded",
|
|
19475
|
+
value: function onScriptLoaded() {
|
|
19476
|
+
var _this5 = this;
|
|
19477
|
+
this.getGatewayWalletConfig().then(function (config) {
|
|
19478
|
+
if (!config || config.type !== 'MasterCard' || !config.credentials || !config.credentials.apple || !config.credentials.apple.merchant) {
|
|
19479
|
+
throw new Error('Invalid configuration');
|
|
19480
|
+
}
|
|
19481
|
+
return _this5.checkAvailability(config);
|
|
19482
|
+
}).then(function (available) {
|
|
19483
|
+
if (!available) {
|
|
19484
|
+
return _this5.handleOnUnavailable();
|
|
19485
|
+
}
|
|
19486
|
+
return _this5.mount();
|
|
19487
|
+
})["catch"](function (err) {
|
|
19488
|
+
if (err) {
|
|
19489
|
+
_this5.handleOnError(err);
|
|
19490
|
+
}
|
|
19491
|
+
_this5.handleOnUnavailable();
|
|
19492
|
+
});
|
|
19493
|
+
}
|
|
19452
19494
|
/**
|
|
19453
19495
|
* Call this method if updating the originally-provided meta object after order information changed.
|
|
19454
19496
|
* For example, if the order amount has changed from the time where the button was originally rendered.
|
|
@@ -19466,15 +19508,15 @@ var ApplePayWalletButtonExpress = /*#__PURE__*/function (_BaseWalletButton) {
|
|
|
19466
19508
|
}, {
|
|
19467
19509
|
key: "checkAvailability",
|
|
19468
19510
|
value: function checkAvailability(config) {
|
|
19469
|
-
var
|
|
19511
|
+
var _this6 = this;
|
|
19470
19512
|
return new Promise(function (resolve, _reject) {
|
|
19471
19513
|
var _a;
|
|
19472
19514
|
if (!window.ApplePaySession || !ApplePaySession) {
|
|
19473
19515
|
resolve(false);
|
|
19474
19516
|
}
|
|
19475
19517
|
var formattedCapabilities = DEFAULT_APPLE_PAY_CAPABILITIES;
|
|
19476
|
-
if (((_a =
|
|
19477
|
-
formattedCapabilities =
|
|
19518
|
+
if (((_a = _this6.meta.apple_pay_capabilities) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
19519
|
+
formattedCapabilities = _this6.formatCapabilities(_this6.meta.apple_pay_capabilities);
|
|
19478
19520
|
}
|
|
19479
19521
|
ApplePaySession.applePayCapabilities(config.credentials[WALLET_TYPE.APPLE].merchant).then(function (capabilities) {
|
|
19480
19522
|
var canMakePayment = formattedCapabilities.includes(capabilities === null || capabilities === void 0 ? void 0 : capabilities.paymentCredentialStatus);
|
|
@@ -20409,6 +20451,8 @@ var PayPalSavePaymentSourceWidget = /*#__PURE__*/function () {
|
|
|
20409
20451
|
}]);
|
|
20410
20452
|
}();
|
|
20411
20453
|
|
|
20454
|
+
window.postMessage("PAYDOCK_PAYMENTS_WIDGET_LOADED");
|
|
20455
|
+
|
|
20412
20456
|
class Timer {
|
|
20413
20457
|
constructor(opts, ms) {
|
|
20414
20458
|
if (!opts.onEnd) throw new Error('onEnd handler is required');
|
package/bundles/index.cjs.d.ts
CHANGED
|
@@ -153,7 +153,7 @@ declare class ApiBase {
|
|
|
153
153
|
reportEvent: ReportEventFn;
|
|
154
154
|
reportError: ReportErrorFn;
|
|
155
155
|
protected newApiRequest(method: Extract<HttpRequestMethod, 'GET' | 'POST'>, link: string): XMLHttpRequest;
|
|
156
|
-
|
|
156
|
+
get ctx(): {
|
|
157
157
|
sdkVersion: string;
|
|
158
158
|
className: string;
|
|
159
159
|
environment: string;
|
|
@@ -4269,6 +4269,7 @@ declare class ApplePayWalletButtonExpress extends BaseWalletButton<ApplePayWalle
|
|
|
4269
4269
|
* button.load();
|
|
4270
4270
|
*/
|
|
4271
4271
|
load(): void;
|
|
4272
|
+
private onScriptLoaded;
|
|
4272
4273
|
/**
|
|
4273
4274
|
* Call this method if updating the originally-provided meta object after order information changed.
|
|
4274
4275
|
* For example, if the order amount has changed from the time where the button was originally rendered.
|
|
@@ -4751,4 +4752,27 @@ declare class PayPalSavePaymentSourceWidget {
|
|
|
4751
4752
|
onCancel(callback?: (data?: IOnCancelEventData) => void): () => void;
|
|
4752
4753
|
}
|
|
4753
4754
|
|
|
4755
|
+
declare global {
|
|
4756
|
+
interface Window {
|
|
4757
|
+
paydock: {
|
|
4758
|
+
WalletButtons: typeof WalletButtons;
|
|
4759
|
+
PaypalCheckoutButton: typeof PaypalCheckoutButton;
|
|
4760
|
+
AfterpayCheckoutButton: typeof AfterpayCheckoutButton;
|
|
4761
|
+
ZipmoneyCheckoutButton: typeof ZipmoneyCheckoutButton;
|
|
4762
|
+
PaymentSourceWidget: typeof PaymentSourceWidget;
|
|
4763
|
+
VaultDisplayWidget: typeof VaultDisplayWidget;
|
|
4764
|
+
ClickToPay: typeof ClickToPay;
|
|
4765
|
+
ExternalCheckoutBuilder: typeof Builder$1;
|
|
4766
|
+
ExternalCheckoutChecker: typeof Checker;
|
|
4767
|
+
PaymentSourceBuilder: typeof Builder;
|
|
4768
|
+
Canvas3DS: typeof Canvas3ds;
|
|
4769
|
+
MultiWidget: typeof MultiWidget;
|
|
4770
|
+
HtmlMultiWidget: typeof HtmlMultiWidget;
|
|
4771
|
+
HtmlWidget: typeof HtmlWidget;
|
|
4772
|
+
PayPalDataCollector: typeof PayPalDataCollector;
|
|
4773
|
+
PayPalSavePaymentSource: typeof PayPalSavePaymentSourceWidget;
|
|
4774
|
+
};
|
|
4775
|
+
}
|
|
4776
|
+
}
|
|
4777
|
+
|
|
4754
4778
|
export { AfterpayCheckoutButton, Api, ApplePayWalletButtonExpress, CHECKOUT_BUTTON_EVENT, Canvas3ds, Checkout, ClickToPay, Configuration, ELEMENT, EVENT$1 as EVENT, Builder$1 as ExternalCheckoutBuilder, Checker as ExternalCheckoutChecker, FORM_FIELD, FRAUD_PREVENTION_EVENTS, type FraudPreventionEvent, type FraudPreventionEventType, type FraudPreventionProvider, FraudPreventionService, HtmlMultiWidget, HtmlPaymentSourceWidget, HtmlWidget, type ICheckout, type IClickToPayMeta, type IDetails, type IElementStyleInput, type IEventCheckoutFinishData, type IEventData, type IPayPalMeta, type IStyles$1 as IStyles, type ITexts, type IWalletMeta, type IWalletOnClickEvent, type IWalletPaymentSuccessfulEvent, type IWalletUnavailableEvent, type IWalletUpdateData, type IWalletUpdateEvent, InstructionDebugger, MultiWidget, PAYMENT_TYPE, PURPOSE, PayPalDataCollector, PayPalSavePaymentSourceWidget, Builder as PaymentSourceBuilder, PaymentSourceWidget, PaypalCheckoutButton, PaypalWalletButtonExpress, STYLABLE_ELEMENT, STYLABLE_ELEMENT_STATE, STYLE, SUPPORTED_CARD_TYPES, TEXT, TRIGGER, TYPE, VAULT_DISPLAY_STYLE, type VaultDisplayStyle, VaultDisplayWidget, WalletButtons, ZipmoneyCheckoutButton };
|