@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
package/README.md
CHANGED
|
@@ -1977,6 +1977,7 @@ Class ZipmoneyCheckoutButton is wrapper of CheckoutButton transform usual button
|
|
|
1977
1977
|
* [new ZipmoneyCheckoutButton(selector, publicKey, [gatewayId], [gatewayId])](#user-content-cb_new_ZipmoneyCheckoutButton_new)
|
|
1978
1978
|
* [.setSuspendedRedirectUri(string)](#user-content-cb_ZipmoneyCheckoutButton+setSuspendedRedirectUri)
|
|
1979
1979
|
* [.setRedirectUrl(string)](#user-content-cb_ZipmoneyCheckoutButton+setRedirectUrl)
|
|
1980
|
+
* [.onClick(handler)](#user-content-cb_ZipmoneyCheckoutButton+onClick)
|
|
1980
1981
|
* [.on(eventName, cb)](#user-content-cb_CheckoutButton+on)
|
|
1981
1982
|
* [.close()](#user-content-cb_CheckoutButton+close)
|
|
1982
1983
|
* [.onFinishInsert(selector, dataType)](#user-content-cb_CheckoutButton+onFinishInsert)
|
|
@@ -2035,6 +2036,27 @@ The merchant's customer would be automatically redirected to this URL after the
|
|
|
2035
2036
|
| --- | --- | --- |
|
|
2036
2037
|
| string | <code>url</code> | URL for redirect |
|
|
2037
2038
|
|
|
2039
|
+
<a name="cb_ZipmoneyCheckoutButton+onClick" id="cb_ZipmoneyCheckoutButton+onClick" href="#user-content-cb_ZipmoneyCheckoutButton+onClick"> </a>
|
|
2040
|
+
|
|
2041
|
+
### zipmoneyCheckoutButton.onClick(handler)
|
|
2042
|
+
Subscribe to the click event with an async handler.
|
|
2043
|
+
The checkout flow will wait for the async handler to complete before proceeding.
|
|
2044
|
+
If the handler resolves to `false`, the checkout flow will be cancelled.
|
|
2045
|
+
|
|
2046
|
+
**Kind**: instance method of [<code>ZipmoneyCheckoutButton</code>](#user-content-cb_ZipmoneyCheckoutButton)
|
|
2047
|
+
|
|
2048
|
+
| Param | Description |
|
|
2049
|
+
| --- | --- |
|
|
2050
|
+
| handler | Async function to be called when the button is clicked |
|
|
2051
|
+
|
|
2052
|
+
**Example**
|
|
2053
|
+
|
|
2054
|
+
```javascript
|
|
2055
|
+
button.onClick(async () => {
|
|
2056
|
+
const isValid = await fetchDataFromServer();
|
|
2057
|
+
return isValid; // return false to stop checkout
|
|
2058
|
+
});
|
|
2059
|
+
```
|
|
2038
2060
|
<a name="cb_CheckoutButton+on" id="cb_CheckoutButton+on" href="#user-content-cb_CheckoutButton+on"> </a>
|
|
2039
2061
|
|
|
2040
2062
|
### zipmoneyCheckoutButton.on(eventName, cb)
|