@paydock/client-sdk 1.140.1 → 1.141.0-beta
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 +22 -0
- package/bundles/index.cjs +2164 -97
- package/bundles/index.cjs.d.ts +24 -9
- package/bundles/index.mjs +2164 -97
- package/bundles/index.mjs.d.ts +24 -9
- package/bundles/types/checkout-button/checkout-button.d.ts.map +1 -1
- package/bundles/types/checkout-button/zipmoney/zipmoney-checkout-button.d.ts +24 -10
- package/bundles/types/checkout-button/zipmoney/zipmoney-checkout-button.d.ts.map +1 -1
- package/bundles/types/checkout-button/zipmoney/zipmoney-contextual.runner.d.ts.map +1 -1
- package/bundles/types/open-wallets/services/apple-pay/apple-pay.open-wallet.service.d.ts +1 -0
- package/bundles/types/open-wallets/services/apple-pay/apple-pay.open-wallet.service.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 +2164 -97
- package/bundles/widget.umd.js.d.ts +24 -9
- package/bundles/widget.umd.js.min.d.ts +24 -9
- package/bundles/widget.umd.min.js +1 -1
- package/docs/api-checkout-button.md +22 -0
- package/package.json +13 -3
|
@@ -330,6 +330,7 @@ Class ZipmoneyCheckoutButton is wrapper of CheckoutButton transform usual button
|
|
|
330
330
|
* [new ZipmoneyCheckoutButton(selector, publicKey, [gatewayId], [gatewayId])](#user-content-cb_new_ZipmoneyCheckoutButton_new)
|
|
331
331
|
* [.setSuspendedRedirectUri(string)](#user-content-cb_ZipmoneyCheckoutButton+setSuspendedRedirectUri)
|
|
332
332
|
* [.setRedirectUrl(string)](#user-content-cb_ZipmoneyCheckoutButton+setRedirectUrl)
|
|
333
|
+
* [.onClick(handler)](#user-content-cb_ZipmoneyCheckoutButton+onClick)
|
|
333
334
|
* [.on(eventName, cb)](#user-content-cb_CheckoutButton+on)
|
|
334
335
|
* [.close()](#user-content-cb_CheckoutButton+close)
|
|
335
336
|
* [.onFinishInsert(selector, dataType)](#user-content-cb_CheckoutButton+onFinishInsert)
|
|
@@ -388,6 +389,27 @@ The merchant's customer would be automatically redirected to this URL after the
|
|
|
388
389
|
| --- | --- | --- |
|
|
389
390
|
| string | <code>url</code> | URL for redirect |
|
|
390
391
|
|
|
392
|
+
<a name="cb_ZipmoneyCheckoutButton+onClick" id="cb_ZipmoneyCheckoutButton+onClick" href="#user-content-cb_ZipmoneyCheckoutButton+onClick"> </a>
|
|
393
|
+
|
|
394
|
+
### zipmoneyCheckoutButton.onClick(handler)
|
|
395
|
+
Subscribe to the click event with an async handler.
|
|
396
|
+
The checkout flow will wait for the async handler to complete before proceeding.
|
|
397
|
+
If the handler resolves to `false`, the checkout flow will be cancelled.
|
|
398
|
+
|
|
399
|
+
**Kind**: instance method of [<code>ZipmoneyCheckoutButton</code>](#user-content-cb_ZipmoneyCheckoutButton)
|
|
400
|
+
|
|
401
|
+
| Param | Description |
|
|
402
|
+
| --- | --- |
|
|
403
|
+
| handler | Async function to be called when the button is clicked |
|
|
404
|
+
|
|
405
|
+
**Example**
|
|
406
|
+
|
|
407
|
+
```javascript
|
|
408
|
+
button.onClick(async () => {
|
|
409
|
+
const isValid = await fetchDataFromServer();
|
|
410
|
+
return isValid; // return false to stop checkout
|
|
411
|
+
});
|
|
412
|
+
```
|
|
391
413
|
<a name="cb_CheckoutButton+on" id="cb_CheckoutButton+on" href="#user-content-cb_CheckoutButton+on"> </a>
|
|
392
414
|
|
|
393
415
|
### zipmoneyCheckoutButton.on(eventName, cb)
|
package/package.json
CHANGED
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
}
|
|
105
105
|
},
|
|
106
106
|
"name": "@paydock/client-sdk",
|
|
107
|
-
"version": "1.
|
|
107
|
+
"version": "1.141.0-beta",
|
|
108
108
|
"scripts": {
|
|
109
109
|
"build:doc": "node docs/html/marked.js",
|
|
110
110
|
"build:js": "rollup --config rollup.config.ts --configPlugin @rollup/plugin-typescript",
|
|
@@ -208,7 +208,7 @@
|
|
|
208
208
|
"npm-run-all2": "6.2.0",
|
|
209
209
|
"process": "0.11.10",
|
|
210
210
|
"rimraf": "5.0.7",
|
|
211
|
-
"rollup": "4.
|
|
211
|
+
"rollup": "4.59.0",
|
|
212
212
|
"rollup-plugin-dts": "6.1.0",
|
|
213
213
|
"rxjs": "7.8.1",
|
|
214
214
|
"tsify": "3.0.4",
|
|
@@ -221,7 +221,17 @@
|
|
|
221
221
|
"sha.js@>=2.0.0 <=2.4.11": "2.4.12",
|
|
222
222
|
"pbkdf2": ">=3.1.3",
|
|
223
223
|
"form-data": ">=4.0.4",
|
|
224
|
-
"qs": ">=6.14.1"
|
|
224
|
+
"qs": ">=6.14.1",
|
|
225
|
+
"minimatch@^3": "3.1.5",
|
|
226
|
+
"minimatch@^5": "5.1.9",
|
|
227
|
+
"minimatch@^9": "9.0.9",
|
|
228
|
+
"@isaacs/brace-expansion": ">=5.0.1",
|
|
229
|
+
"bn.js": ">=5.2.3",
|
|
230
|
+
"ajv": "8.18.0",
|
|
231
|
+
"serialize-javascript": ">=7.0.3",
|
|
232
|
+
"underscore": ">=1.13.8",
|
|
233
|
+
"dompurify": ">=3.3.2",
|
|
234
|
+
"immutable": ">=5.1.5"
|
|
225
235
|
},
|
|
226
236
|
"engines": {
|
|
227
237
|
"node": ">=16.0.0"
|