@paydock/client-sdk 1.132.0-beta → 1.135.14-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 +167 -0
- package/bundles/index.cjs +13297 -11586
- package/bundles/index.cjs.d.ts +1197 -870
- package/bundles/index.mjs +13296 -11586
- package/bundles/index.mjs.d.ts +1197 -870
- package/bundles/types/afterpay-on-site-messaging/afterpay-on-site-messaging.d.ts +40 -0
- package/bundles/types/afterpay-on-site-messaging/afterpay-on-site-messaging.d.ts.map +1 -0
- package/bundles/types/afterpay-on-site-messaging/afterpay-on-site-messaging.interfaces.d.ts +29 -0
- package/bundles/types/afterpay-on-site-messaging/afterpay-on-site-messaging.interfaces.d.ts.map +1 -0
- package/bundles/types/afterpay-on-site-messaging/afterpay-on-site-messaging.service.d.ts +14 -0
- package/bundles/types/afterpay-on-site-messaging/afterpay-on-site-messaging.service.d.ts.map +1 -0
- package/bundles/types/afterpay-on-site-messaging/index.d.ts +18 -0
- package/bundles/types/afterpay-on-site-messaging/index.d.ts.map +1 -0
- package/bundles/types/api/api-checkout-internal.d.ts +2 -2
- package/bundles/types/api/api-checkout-internal.d.ts.map +1 -1
- package/bundles/types/api/api-payment-source-internal.d.ts +2 -1
- package/bundles/types/api/api-payment-source-internal.d.ts.map +1 -1
- package/bundles/types/api/api-service-internal.d.ts +13 -6
- package/bundles/types/api/api-service-internal.d.ts.map +1 -1
- package/bundles/types/checkout/images/card-icons.d.ts +2 -1
- package/bundles/types/checkout/images/card-icons.d.ts.map +1 -1
- package/bundles/types/checkout/v1/instructions/index.d.ts.map +1 -1
- package/bundles/types/checkout/v1/instructions/instruction.apple_pay_form.show.d.ts.map +1 -1
- package/bundles/types/checkout/v1/instructions/instruction.google_pay_form.show.d.ts.map +1 -1
- package/bundles/types/checkout/v1/instructions/instruction.paypal_form.show.d.ts.map +1 -1
- package/bundles/types/checkout/v3/components/go-back-to-payments-button/go-back-to-payments.d.ts +1 -0
- package/bundles/types/checkout/v3/components/go-back-to-payments-button/go-back-to-payments.d.ts.map +1 -1
- package/bundles/types/checkout/v3/instructions/instruction.apple_pay_form.show.d.ts.map +1 -1
- package/bundles/types/checkout/v3/instructions/instruction.card_form.show.d.ts +1 -0
- package/bundles/types/checkout/v3/instructions/instruction.card_form.show.d.ts.map +1 -1
- package/bundles/types/checkout/v3/instructions/instruction.google_pay_form.show.d.ts.map +1 -1
- package/bundles/types/checkout/v3/instructions/instruction.payment_methods.show.d.ts.map +1 -1
- package/bundles/types/checkout/v3/instructions/instruction.paypal_form.show.d.ts.map +1 -1
- package/bundles/types/checkout/v3/instructions/instruction.saved_card_form.show.d.ts +14 -2
- package/bundles/types/checkout/v3/instructions/instruction.saved_card_form.show.d.ts.map +1 -1
- package/bundles/types/checkout/v3/models/card.model.d.ts +3 -1
- package/bundles/types/checkout/v3/models/card.model.d.ts.map +1 -1
- package/bundles/types/checkout/v3/models/payment-methods.model.d.ts.map +1 -1
- package/bundles/types/components/param.d.ts +4 -1
- package/bundles/types/components/param.d.ts.map +1 -1
- package/bundles/types/index-cba.d.ts +9 -6
- package/bundles/types/index-cba.d.ts.map +1 -1
- package/bundles/types/index.d.ts +9 -6
- package/bundles/types/index.d.ts.map +1 -1
- package/bundles/types/open-wallets/base/open-wallet-buttons.d.ts +198 -0
- package/bundles/types/open-wallets/base/open-wallet-buttons.d.ts.map +1 -0
- package/bundles/types/open-wallets/base/open-wallet.service.d.ts +27 -0
- package/bundles/types/open-wallets/base/open-wallet.service.d.ts.map +1 -0
- package/bundles/types/open-wallets/enum/event.enum.d.ts +8 -1
- package/bundles/types/open-wallets/enum/event.enum.d.ts.map +1 -1
- package/bundles/types/open-wallets/enum/payload-format.enum.d.ts +4 -0
- package/bundles/types/open-wallets/enum/payload-format.enum.d.ts.map +1 -0
- package/bundles/types/open-wallets/enum/service-group.enum.d.ts +5 -0
- package/bundles/types/open-wallets/enum/service-group.enum.d.ts.map +1 -0
- package/bundles/types/open-wallets/index.d.ts +2 -2
- package/bundles/types/open-wallets/index.d.ts.map +1 -1
- package/bundles/types/open-wallets/interfaces/apple-pay/apple-pay-payment-request.interface.d.ts +495 -0
- package/bundles/types/open-wallets/interfaces/apple-pay/apple-pay-payment-request.interface.d.ts.map +1 -0
- package/bundles/types/open-wallets/interfaces/apple-pay/index.d.ts +2 -0
- package/bundles/types/open-wallets/interfaces/apple-pay/index.d.ts.map +1 -0
- package/bundles/types/open-wallets/interfaces/events.interface.d.ts +5 -6
- package/bundles/types/open-wallets/interfaces/events.interface.d.ts.map +1 -1
- package/bundles/types/open-wallets/interfaces/google-pay/google-pay-meta.interface.d.ts +54 -0
- package/bundles/types/open-wallets/interfaces/google-pay/google-pay-meta.interface.d.ts.map +1 -0
- package/bundles/types/open-wallets/interfaces/google-pay/index.d.ts +2 -0
- package/bundles/types/open-wallets/interfaces/google-pay/index.d.ts.map +1 -0
- package/bundles/types/open-wallets/interfaces/index.d.ts +1 -3
- package/bundles/types/open-wallets/interfaces/index.d.ts.map +1 -1
- package/bundles/types/open-wallets/interfaces/open-wallet-meta.interface.d.ts +11 -0
- package/bundles/types/open-wallets/interfaces/open-wallet-meta.interface.d.ts.map +1 -0
- package/bundles/types/open-wallets/interfaces/payment-source.interface.d.ts +0 -1
- package/bundles/types/open-wallets/interfaces/payment-source.interface.d.ts.map +1 -1
- package/bundles/types/open-wallets/services/apple-pay/apple-pay.open-wallet.service.d.ts +64 -0
- package/bundles/types/open-wallets/services/apple-pay/apple-pay.open-wallet.service.d.ts.map +1 -0
- package/bundles/types/open-wallets/services/apple-pay/index.d.ts +2 -0
- package/bundles/types/open-wallets/services/apple-pay/index.d.ts.map +1 -0
- package/bundles/types/open-wallets/services/google-pay/constants/google-pay.constants.d.ts +11 -0
- package/bundles/types/open-wallets/services/google-pay/constants/google-pay.constants.d.ts.map +1 -0
- package/bundles/types/open-wallets/services/google-pay/constants/index.d.ts +2 -0
- package/bundles/types/open-wallets/services/google-pay/constants/index.d.ts.map +1 -0
- package/bundles/types/open-wallets/services/google-pay/google-pay.open-wallet.service.d.ts +55 -0
- package/bundles/types/open-wallets/services/google-pay/google-pay.open-wallet.service.d.ts.map +1 -0
- package/bundles/types/open-wallets/services/google-pay/index.d.ts +2 -0
- package/bundles/types/open-wallets/services/google-pay/index.d.ts.map +1 -0
- package/bundles/types/open-wallets/services/google-pay/utils/google-pay.utils.d.ts +20 -0
- package/bundles/types/open-wallets/services/google-pay/utils/google-pay.utils.d.ts.map +1 -0
- package/bundles/types/open-wallets/services/google-pay/utils/index.d.ts +2 -0
- package/bundles/types/open-wallets/services/google-pay/utils/index.d.ts.map +1 -0
- package/bundles/types/open-wallets/services/google-pay/validation/google-pay.validation.d.ts +3 -0
- package/bundles/types/open-wallets/services/google-pay/validation/google-pay.validation.d.ts.map +1 -0
- package/bundles/types/open-wallets/services/google-pay/validation/index.d.ts +2 -0
- package/bundles/types/open-wallets/services/google-pay/validation/index.d.ts.map +1 -0
- package/bundles/types/open-wallets/types/apple-pay/apple-pay-button-style.type.d.ts +2 -0
- package/bundles/types/open-wallets/types/apple-pay/apple-pay-button-style.type.d.ts.map +1 -0
- package/bundles/types/open-wallets/types/apple-pay/apple-pay-button-type.type.d.ts +2 -0
- package/bundles/types/open-wallets/types/apple-pay/apple-pay-button-type.type.d.ts.map +1 -0
- package/bundles/types/open-wallets/types/apple-pay/index.d.ts +3 -0
- package/bundles/types/open-wallets/types/apple-pay/index.d.ts.map +1 -0
- package/bundles/types/open-wallets/types/base-event-data.interface.d.ts +5 -0
- package/bundles/types/open-wallets/types/base-event-data.interface.d.ts.map +1 -0
- package/bundles/types/open-wallets/types/google-pay/google-pay-button-color.type.d.ts +2 -0
- package/bundles/types/open-wallets/types/google-pay/google-pay-button-color.type.d.ts.map +1 -0
- package/bundles/types/open-wallets/types/google-pay/google-pay-button-size-mode.type.d.ts +2 -0
- package/bundles/types/open-wallets/types/google-pay/google-pay-button-size-mode.type.d.ts.map +1 -0
- package/bundles/types/open-wallets/types/google-pay/google-pay-button-type.type.d.ts +2 -0
- package/bundles/types/open-wallets/types/google-pay/google-pay-button-type.type.d.ts.map +1 -0
- package/bundles/types/open-wallets/types/google-pay/index.d.ts +4 -0
- package/bundles/types/open-wallets/types/google-pay/index.d.ts.map +1 -0
- package/bundles/types/open-wallets/types/index.d.ts +1 -2
- package/bundles/types/open-wallets/types/index.d.ts.map +1 -1
- package/bundles/types/open-wallets/types/on-shipping-address-change-event-data.interface.d.ts +21 -0
- package/bundles/types/open-wallets/types/on-shipping-address-change-event-data.interface.d.ts.map +1 -0
- package/bundles/types/open-wallets/types/on-shipping-address-change-event-response.interface.d.ts +6 -0
- package/bundles/types/open-wallets/types/on-shipping-address-change-event-response.interface.d.ts.map +1 -0
- package/bundles/types/open-wallets/types/on-shipping-option-change-event-data.interface.d.ts +13 -0
- package/bundles/types/open-wallets/types/on-shipping-option-change-event-data.interface.d.ts.map +1 -0
- package/bundles/types/open-wallets/types/on-shipping-option-change-event-response.interface.d.ts +4 -0
- package/bundles/types/open-wallets/types/on-shipping-option-change-event-response.interface.d.ts.map +1 -0
- package/bundles/types/open-wallets/types/payment-source.type.d.ts +85 -0
- package/bundles/types/open-wallets/types/payment-source.type.d.ts.map +1 -0
- package/bundles/types/open-wallets/types/shipping-event-to-response.type.d.ts +6 -0
- package/bundles/types/open-wallets/types/shipping-event-to-response.type.d.ts.map +1 -0
- package/bundles/types/open-wallets/types/wallet-type.type.d.ts +2 -2
- package/bundles/types/open-wallets/types/wallet-type.type.d.ts.map +1 -1
- package/bundles/types/paypal-save-payment-source/paypal-save-payment-source.d.ts.map +1 -1
- package/bundles/types/paypal-save-payment-source/paypal-save-payment-source.service.d.ts.map +1 -1
- package/bundles/types/secure-remote-commerce/secure-remote-commerce.d.ts +16 -16
- package/bundles/types/secure-remote-commerce/secure-remote-commerce.d.ts.map +1 -1
- package/bundles/types/shared-ui/components/modal.d.ts +18 -0
- package/bundles/types/shared-ui/components/modal.d.ts.map +1 -0
- package/bundles/types/wallet-buttons/wallet-services/paypal.wallet-service.d.ts.map +1 -1
- package/bundles/types/wallet-buttons-express/base.wallet-button-express.d.ts +9 -9
- package/bundles/types/wallet-buttons-express/base.wallet-button-express.d.ts.map +1 -1
- package/bundles/types/widget/html-multi-widget.d.ts +13 -1
- package/bundles/types/widget/html-multi-widget.d.ts.map +1 -1
- package/bundles/types/widget/index.d.ts +4 -3
- package/bundles/types/widget/index.d.ts.map +1 -1
- package/bundles/types/widget/multi-widget.d.ts +7 -4
- package/bundles/types/widget/multi-widget.d.ts.map +1 -1
- package/bundles/widget.umd.js +13297 -11586
- package/bundles/widget.umd.js.d.ts +1197 -870
- package/bundles/widget.umd.js.min.d.ts +1197 -870
- package/bundles/widget.umd.min.js +1 -1
- package/docs/afterpay-on-site-messaging-examples.md +60 -0
- package/docs/afterpay-on-site-messaging.md +104 -0
- package/docs/api-widget.md +1 -0
- package/docs/open-wallet-buttons-examples.md +1188 -0
- package/package.json +11 -4
- package/bundles/types/open-wallets/base/base-open-wallet.d.ts +0 -33
- package/bundles/types/open-wallets/base/base-open-wallet.d.ts.map +0 -1
- package/bundles/types/open-wallets/interfaces/base-service-config.interface.d.ts +0 -30
- package/bundles/types/open-wallets/interfaces/base-service-config.interface.d.ts.map +0 -1
- package/bundles/types/open-wallets/interfaces/base-wallet-meta.interface.d.ts +0 -5
- package/bundles/types/open-wallets/interfaces/base-wallet-meta.interface.d.ts.map +0 -1
- package/bundles/types/open-wallets/services/index.d.ts +0 -9
- package/bundles/types/open-wallets/services/index.d.ts.map +0 -1
- package/bundles/types/open-wallets/types/ott-backend.type.d.ts +0 -26
- package/bundles/types/open-wallets/types/ott-backend.type.d.ts.map +0 -1
- package/bundles/types/open-wallets/types/ott-response.type.d.ts +0 -8
- package/bundles/types/open-wallets/types/ott-response.type.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -730,6 +730,7 @@ The list of available parameters for showing card icons
|
|
|
730
730
|
| SOLO | <code>string</code> | <code>"solo"</code> |
|
|
731
731
|
| VISA | <code>string</code> | <code>"visa"</code> |
|
|
732
732
|
| VISA_WHITE | <code>string</code> | <code>"visa_white"</code> |
|
|
733
|
+
| UNIONPAY | <code>string</code> | <code>"unionpay"</code> |
|
|
733
734
|
|
|
734
735
|
<a name="w_STYLABLE_ELEMENT" id="w_STYLABLE_ELEMENT" href="#user-content-w_STYLABLE_ELEMENT"> </a>
|
|
735
736
|
|
|
@@ -6834,5 +6835,171 @@ Callback for onError method.
|
|
|
6834
6835
|
| data | [<code>IOnErrorEventData</code>](#IOnErrorEventData) \| <code>null</code> |
|
|
6835
6836
|
|
|
6836
6837
|
|
|
6838
|
+
## AfterpayOnSiteMessaging
|
|
6839
|
+
|
|
6840
|
+
Afterpay On-Site Messaging informs customers that Afterpay had an available payment method on the website. Allows to have this features when implemented:
|
|
6841
|
+
- An interactive icon ⓘ that shows a modal with some available information.
|
|
6842
|
+
- Shows if an instalment is available and its amount.
|
|
6843
|
+
- Displays the best payment option available on that particular product.
|
|
6844
|
+
|
|
6845
|
+
The general flow to use it is:
|
|
6846
|
+
1. Initialize the Afterpay On Site Messaging class, providing a HTML selector id, and configuration parameters that requires AfterPay. The general format is:
|
|
6847
|
+
```js
|
|
6848
|
+
var afterpayOnSiteMessaging = new paydock.AfterpayOnSiteMessaging(
|
|
6849
|
+
"#selector",
|
|
6850
|
+
configParams,
|
|
6851
|
+
);
|
|
6852
|
+
```
|
|
6853
|
+
2. Once all in place, just call load function to start the injection, like following:
|
|
6854
|
+
```js
|
|
6855
|
+
afterpayOnSiteMessaging.load();
|
|
6856
|
+
```
|
|
6857
|
+
|
|
6858
|
+
### AfterpayOnSiteMessaging example
|
|
6859
|
+
|
|
6860
|
+
A full description of the config parameters for [AfterpayOnSiteMessaging](#AfterpayOnSiteMessaging) meta parameters can be found [here](#IAfterpayOnSiteMessagingConfig). Below you will find a fully working html example.
|
|
6861
|
+
|
|
6862
|
+
```html
|
|
6863
|
+
<!DOCTYPE html>
|
|
6864
|
+
<html lang="en">
|
|
6865
|
+
<head>
|
|
6866
|
+
<meta charset="UTF-8">
|
|
6867
|
+
<title>Title</title>
|
|
6868
|
+
</head>
|
|
6869
|
+
<body>
|
|
6870
|
+
<h2>Using PayDock AfterpayOnSiteMessaging!</h2>
|
|
6871
|
+
<div id="afterpayOnSiteMessagingDiv"></div>
|
|
6872
|
+
</body>
|
|
6873
|
+
<script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js" ></script>
|
|
6874
|
+
<script>
|
|
6875
|
+
const afterpayOnSiteMessaging = new paydock.AfterpayOnSiteMessaging(
|
|
6876
|
+
'#afterpayOnSiteMessagingDiv',
|
|
6877
|
+
{
|
|
6878
|
+
mpid: "uuid-uuid-uuid-uuid-uuid",
|
|
6879
|
+
placement_id: "uuid-uuid-uuid-uuid-uuid",
|
|
6880
|
+
page_type: "product",
|
|
6881
|
+
amount: "100",
|
|
6882
|
+
currency: "AUD",
|
|
6883
|
+
consumer_locale: "AU",
|
|
6884
|
+
item_skus: "Test",
|
|
6885
|
+
item_categories: "Test",
|
|
6886
|
+
is_eligible: true
|
|
6887
|
+
}
|
|
6888
|
+
);
|
|
6889
|
+
|
|
6890
|
+
afterpayOnSiteMessaging.onError(function(error) {
|
|
6891
|
+
console.log("On Error Callback", error);
|
|
6892
|
+
});
|
|
6893
|
+
|
|
6894
|
+
afterpayOnSiteMessaging.load();
|
|
6895
|
+
</script>
|
|
6896
|
+
</html>
|
|
6897
|
+
```
|
|
6898
|
+
|
|
6899
|
+
## Classes
|
|
6900
|
+
|
|
6901
|
+
<dl>
|
|
6902
|
+
<dt><a href="#AfterpayOnSiteMessaging">AfterpayOnSiteMessaging</a></dt>
|
|
6903
|
+
<dd><p>Afterpay On Site Messaging constructor</p>
|
|
6904
|
+
</dd>
|
|
6905
|
+
</dl>
|
|
6906
|
+
|
|
6907
|
+
## Typedefs
|
|
6908
|
+
|
|
6909
|
+
<dl>
|
|
6910
|
+
<dt><a href="#OnErrorCallback">OnErrorCallback</a> : <code>function</code></dt>
|
|
6911
|
+
<dd><p>Callback for onError method.</p>
|
|
6912
|
+
</dd>
|
|
6913
|
+
</dl>
|
|
6914
|
+
|
|
6915
|
+
## Interfaces
|
|
6916
|
+
|
|
6917
|
+
<dl>
|
|
6918
|
+
<dt><a href="#IAfterpayOnSiteMessagingConfig">IAfterpayOnSiteMessagingConfig</a> : <code>object</code></dt>
|
|
6919
|
+
<dd><p>Interface of data used for Afterpay On Site Messaging configuration.
|
|
6920
|
+
For further information refer to <a href="https://developers.afterpay.com/docs/api/afterpay-messaging/getting-started-with-afterpay-on-site-messaging">the documentation</a>.</p>
|
|
6921
|
+
</dd>
|
|
6922
|
+
</dl>
|
|
6923
|
+
|
|
6924
|
+
<a name="IAfterpayOnSiteMessagingConfig" id="IAfterpayOnSiteMessagingConfig" href="#IAfterpayOnSiteMessagingConfig"> </a>
|
|
6925
|
+
|
|
6926
|
+
## IAfterpayOnSiteMessagingConfig : <code>object</code>
|
|
6927
|
+
Interface of data used for Afterpay On Site Messaging configuration.
|
|
6928
|
+
For further information refer to [the documentation](https://developers.afterpay.com/docs/api/afterpay-messaging/getting-started-with-afterpay-on-site-messaging).
|
|
6929
|
+
|
|
6930
|
+
**Kind**: global interface
|
|
6931
|
+
|
|
6932
|
+
| Param | Type | Description |
|
|
6933
|
+
| --- | --- | --- |
|
|
6934
|
+
| [mpid] | <code>string</code> | Used for indicating the MPID. |
|
|
6935
|
+
| [placement_id] | <code>string</code> | Used for indicating the product Placement ID. |
|
|
6936
|
+
| [page_type] | <code>'cart'</code> \| <code>'product'</code> | Used for indicating the page type. Allowed values are: cart, product. |
|
|
6937
|
+
| [amount] | <code>string</code> | Used for indicating the amount. |
|
|
6938
|
+
| [currency] | <code>string</code> | Used for indicating the currency. |
|
|
6939
|
+
| [consumer_locale] | <code>string</code> | Used for indicating the consumer locale. |
|
|
6940
|
+
| [item_skus] | <code>string</code> | Used for indicating the SKU. |
|
|
6941
|
+
| [item_categories] | <code>string</code> | Used for indicating the category. |
|
|
6942
|
+
| [is_eligible] | <code>boolean</code> | Used for indicating if the user is eligible. |
|
|
6943
|
+
|
|
6944
|
+
<a name="AfterpayOnSiteMessaging" id="AfterpayOnSiteMessaging" href="#AfterpayOnSiteMessaging"> </a>
|
|
6945
|
+
|
|
6946
|
+
## AfterpayOnSiteMessaging
|
|
6947
|
+
Afterpay On Site Messaging constructor
|
|
6948
|
+
|
|
6949
|
+
**Kind**: global class
|
|
6950
|
+
|
|
6951
|
+
* [AfterpayOnSiteMessaging](#AfterpayOnSiteMessaging)
|
|
6952
|
+
* [new exports.AfterpayOnSiteMessaging(selector, config)](#new_AfterpayOnSiteMessaging_new)
|
|
6953
|
+
* [.load()](#AfterpayOnSiteMessaging+load)
|
|
6954
|
+
* [.onError([callback])](#AfterpayOnSiteMessaging+onError)
|
|
6955
|
+
|
|
6956
|
+
<a name="new_AfterpayOnSiteMessaging_new" id="new_AfterpayOnSiteMessaging_new" href="#new_AfterpayOnSiteMessaging_new"> </a>
|
|
6957
|
+
|
|
6958
|
+
### new exports.AfterpayOnSiteMessaging(selector, config)
|
|
6959
|
+
|
|
6960
|
+
| Param | Type | Description |
|
|
6961
|
+
| --- | --- | --- |
|
|
6962
|
+
| selector | <code>string</code> | Selector of html element. Container for Afterpay On Site Messaging. |
|
|
6963
|
+
| config | [<code>IAfterpayOnSiteMessagingConfig</code>](#IAfterpayOnSiteMessagingConfig) | Required configuration for the Afterpay On Site Messaging. |
|
|
6964
|
+
|
|
6965
|
+
**Example**
|
|
6966
|
+
```js
|
|
6967
|
+
var afterpayOnSiteMessaging = new AfterpayOnSiteMessaging('#afterpayButton', config);
|
|
6968
|
+
```
|
|
6969
|
+
<a name="AfterpayOnSiteMessaging+load" id="AfterpayOnSiteMessaging+load" href="#AfterpayOnSiteMessaging+load"> </a>
|
|
6970
|
+
|
|
6971
|
+
### afterpayOnSiteMessaging.load()
|
|
6972
|
+
The final method after configuring the AfterpayOnSiteMessaging to
|
|
6973
|
+
start the load process.
|
|
6974
|
+
|
|
6975
|
+
**Kind**: instance method of [<code>AfterpayOnSiteMessaging</code>](#AfterpayOnSiteMessaging)
|
|
6976
|
+
<a name="AfterpayOnSiteMessaging+onError" id="AfterpayOnSiteMessaging+onError" href="#AfterpayOnSiteMessaging+onError"> </a>
|
|
6977
|
+
|
|
6978
|
+
### afterpayOnSiteMessaging.onError([callback])
|
|
6979
|
+
If the process fails, the function passed as parameter will be called.
|
|
6980
|
+
Important: Do not perform thread blocking operations in callback such as window.alert() calls.
|
|
6981
|
+
|
|
6982
|
+
**Kind**: instance method of [<code>AfterpayOnSiteMessaging</code>](#AfterpayOnSiteMessaging)
|
|
6983
|
+
|
|
6984
|
+
| Param | Type | Description |
|
|
6985
|
+
| --- | --- | --- |
|
|
6986
|
+
| [callback] | [<code>OnErrorCallback</code>](#OnErrorCallback) | Function to be called when there is an error in the flow. |
|
|
6987
|
+
|
|
6988
|
+
**Example**
|
|
6989
|
+
```js
|
|
6990
|
+
AfterpayOnSiteMessaging.onError((eventData) => console.log('Some error occur'));
|
|
6991
|
+
```
|
|
6992
|
+
<a name="OnErrorCallback" id="OnErrorCallback" href="#OnErrorCallback"> </a>
|
|
6993
|
+
|
|
6994
|
+
## OnErrorCallback : <code>function</code>
|
|
6995
|
+
Callback for onError method.
|
|
6996
|
+
|
|
6997
|
+
**Kind**: global typedef
|
|
6998
|
+
|
|
6999
|
+
| Param | Type |
|
|
7000
|
+
| --- | --- |
|
|
7001
|
+
| data | <code>unknown</code> \| <code>null</code> |
|
|
7002
|
+
|
|
7003
|
+
|
|
6837
7004
|
## License
|
|
6838
7005
|
Copyright (c) 2025 paydock
|