@paydock/client-sdk 1.104.3-beta → 1.104.7-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 +729 -405
- package/bundles/index.cjs +29624 -8753
- package/bundles/index.cjs.d.ts +484 -381
- package/bundles/index.cjs.map +1 -1
- package/bundles/index.mjs +29624 -8753
- package/bundles/index.mjs.d.ts +484 -381
- package/bundles/index.mjs.map +1 -1
- package/bundles/types/api/api-base.d.ts +14 -6
- package/bundles/types/api/api-base.d.ts.map +1 -1
- package/bundles/types/api/api-service-internal.d.ts +2 -1
- package/bundles/types/api/api-service-internal.d.ts.map +1 -1
- package/bundles/types/api/api.d.ts +1 -1
- package/bundles/types/api/api.d.ts.map +1 -1
- package/bundles/types/canvas-3ds/canvas-3ds.d.ts +1 -1
- package/bundles/types/canvas-3ds/canvas-3ds.d.ts.map +1 -1
- package/bundles/types/canvas-3ds/services/gpayments-service.d.ts +3 -3
- package/bundles/types/canvas-3ds/services/gpayments-service.d.ts.map +1 -1
- package/bundles/types/checkout-button/afterpay/afterpay-checkout-button.d.ts +1 -1
- package/bundles/types/checkout-button/afterpay/afterpay-checkout-button.d.ts.map +1 -1
- package/bundles/types/checkout-button/checkout-button.d.ts +1 -1
- package/bundles/types/checkout-button/checkout-button.d.ts.map +1 -1
- package/bundles/types/checkout-button/paypal/paypal-checkout-button.d.ts +1 -1
- package/bundles/types/checkout-button/paypal/paypal-checkout-button.d.ts.map +1 -1
- package/bundles/types/checkout-button/runner/popup.runner.d.ts +1 -1
- package/bundles/types/checkout-button/zipmoney/zipmoney-checkout-button.d.ts +1 -1
- package/bundles/types/checkout-button/zipmoney/zipmoney-checkout-button.d.ts.map +1 -1
- package/bundles/types/components/container.d.ts +1 -0
- package/bundles/types/components/container.d.ts.map +1 -1
- package/bundles/types/components/http-core.d.ts.map +1 -1
- package/bundles/types/components/iframe-event.d.ts +17 -11
- package/bundles/types/components/iframe-event.d.ts.map +1 -1
- package/bundles/types/components/link.d.ts +3 -2
- package/bundles/types/components/link.d.ts.map +1 -1
- package/bundles/types/components/param.d.ts +6 -8
- package/bundles/types/components/param.d.ts.map +1 -1
- package/bundles/types/components/wallet-background.d.ts +2 -1
- package/bundles/types/components/wallet-background.d.ts.map +1 -1
- package/bundles/types/configs/env/environment.cba.d.ts +1 -1
- package/bundles/types/configs/env/environment.cba.d.ts.map +1 -1
- package/bundles/types/configs/env/environment.paydock.d.ts +1 -1
- package/bundles/types/configs/env/environment.paydock.d.ts.map +1 -1
- package/bundles/types/constants/validators.d.ts +45 -0
- package/bundles/types/constants/validators.d.ts.map +1 -0
- package/bundles/types/payment-source-widget/html-payment-source-widget.d.ts +17 -13
- package/bundles/types/payment-source-widget/html-payment-source-widget.d.ts.map +1 -1
- package/bundles/types/payment-source-widget/payment-source-widget.d.ts +1 -1
- package/bundles/types/payment-source-widget/payment-source-widget.d.ts.map +1 -1
- package/bundles/types/secure-remote-commerce/index.d.ts +102 -1
- package/bundles/types/secure-remote-commerce/index.d.ts.map +1 -1
- package/bundles/types/secure-remote-commerce/interfaces.d.ts +109 -32
- package/bundles/types/secure-remote-commerce/interfaces.d.ts.map +1 -1
- package/bundles/types/secure-remote-commerce/mastercard-secure-remote-commerce.d.ts +31 -0
- package/bundles/types/secure-remote-commerce/mastercard-secure-remote-commerce.d.ts.map +1 -0
- package/bundles/types/secure-remote-commerce/providers/mastercard-src/index.d.ts +2 -0
- package/bundles/types/secure-remote-commerce/providers/mastercard-src/index.d.ts.map +1 -0
- package/bundles/types/secure-remote-commerce/providers/{visa-src/visa-src.d.ts → mastercard-src/mastercard-src.d.ts} +5 -8
- package/bundles/types/secure-remote-commerce/providers/mastercard-src/mastercard-src.d.ts.map +1 -0
- package/bundles/types/secure-remote-commerce/secure-remote-commerce.d.ts +13 -91
- package/bundles/types/secure-remote-commerce/secure-remote-commerce.d.ts.map +1 -1
- package/bundles/types/shared/http/http-request.d.ts +14 -0
- package/bundles/types/shared/http/http-request.d.ts.map +1 -0
- package/bundles/types/shared/http/index.d.ts +2 -0
- package/bundles/types/shared/http/index.d.ts.map +1 -0
- package/bundles/types/shared/services/instrumentation/instrumentation.agent.d.ts +15 -0
- package/bundles/types/shared/services/instrumentation/instrumentation.agent.d.ts.map +1 -0
- package/bundles/types/shared/services/instrumentation/instrumentation.config.d.ts +66 -0
- package/bundles/types/shared/services/instrumentation/instrumentation.config.d.ts.map +1 -0
- package/bundles/types/shared/services/instrumentation/instrumentation.types.d.ts +14 -0
- package/bundles/types/shared/services/instrumentation/instrumentation.types.d.ts.map +1 -0
- package/bundles/types/shared/services/instrumentation/repositories/action.repository.d.ts +15 -0
- package/bundles/types/shared/services/instrumentation/repositories/action.repository.d.ts.map +1 -0
- package/bundles/types/shared/services/instrumentation/repositories/error.repository.d.ts +23 -0
- package/bundles/types/shared/services/instrumentation/repositories/error.repository.d.ts.map +1 -0
- package/bundles/types/shared/services/instrumentation/repositories/event.repository.d.ts +15 -0
- package/bundles/types/shared/services/instrumentation/repositories/event.repository.d.ts.map +1 -0
- package/bundles/types/shared/services/instrumentation/repositories/index.d.ts +4 -0
- package/bundles/types/shared/services/instrumentation/repositories/index.d.ts.map +1 -0
- package/bundles/types/vault-display-widget/vault-display-widget.d.ts +1 -1
- package/bundles/types/vault-display-widget/vault-display-widget.d.ts.map +1 -1
- package/bundles/types/wallet-buttons/apple.wallet-service.d.ts +2 -0
- package/bundles/types/wallet-buttons/apple.wallet-service.d.ts.map +1 -1
- package/bundles/types/wallet-buttons/flypay-v2.wallet-service.d.ts +8 -1
- package/bundles/types/wallet-buttons/flypay-v2.wallet-service.d.ts.map +1 -1
- package/bundles/types/wallet-buttons/google.wallet-service.d.ts +7 -4
- package/bundles/types/wallet-buttons/google.wallet-service.d.ts.map +1 -1
- package/bundles/types/wallet-buttons/helpers/flypay-v2.helper.d.ts +4 -0
- package/bundles/types/wallet-buttons/helpers/flypay-v2.helper.d.ts.map +1 -0
- package/bundles/types/wallet-buttons/index.d.ts +126 -0
- package/bundles/types/wallet-buttons/index.d.ts.map +1 -1
- package/bundles/types/wallet-buttons/interfaces.d.ts +3 -0
- package/bundles/types/wallet-buttons/interfaces.d.ts.map +1 -1
- package/bundles/types/wallet-buttons/paypal.wallet-service.d.ts.map +1 -1
- package/bundles/types/wallet-buttons/wallet-buttons.d.ts +63 -121
- package/bundles/types/wallet-buttons/wallet-buttons.d.ts.map +1 -1
- package/bundles/types/wallet-buttons/wallet-cba-buttons.d.ts +1 -1
- package/bundles/types/wallet-buttons/wallet-cba-buttons.d.ts.map +1 -1
- package/bundles/types/wallet-buttons/wallet-service.d.ts +7 -0
- package/bundles/types/wallet-buttons/wallet-service.d.ts.map +1 -1
- package/bundles/types/widget/configuration.d.ts +1 -1
- package/bundles/types/widget/configuration.d.ts.map +1 -1
- package/bundles/types/widget/html-multi-widget.d.ts +147 -76
- package/bundles/types/widget/html-multi-widget.d.ts.map +1 -1
- package/bundles/types/widget/html-widget.d.ts +1 -1
- package/bundles/types/widget/html-widget.d.ts.map +1 -1
- package/bundles/types/widget/multi-widget.d.ts.map +1 -1
- package/bundles/widget.umd.js +29624 -8753
- package/bundles/widget.umd.js.d.ts +484 -381
- package/bundles/widget.umd.js.map +1 -1
- package/bundles/widget.umd.js.min.d.ts +484 -381
- package/bundles/widget.umd.min.js +62 -1
- package/bundles/widget.umd.min.js.map +1 -1
- package/docs/api-ps-widget.md +12 -12
- package/docs/api-widget.md +211 -156
- package/docs/license.md +1 -1
- package/docs/secure-remote-commerce-examples.md +75 -101
- package/docs/secure-remote-commerce.md +185 -114
- package/docs/wallet-buttons-examples.md +48 -19
- package/docs/wallet-buttons.md +197 -2
- package/examples/multi-html-widget/simple.html +2 -1
- package/package.json +18 -15
- package/slate.md +123 -120
- package/bundles/types/secure-remote-commerce/providers/visa-src/helper.d.ts +0 -8
- package/bundles/types/secure-remote-commerce/providers/visa-src/helper.d.ts.map +0 -1
- package/bundles/types/secure-remote-commerce/providers/visa-src/index.d.ts +0 -2
- package/bundles/types/secure-remote-commerce/providers/visa-src/index.d.ts.map +0 -1
- package/bundles/types/secure-remote-commerce/providers/visa-src/visa-src.d.ts.map +0 -1
- package/bundles/types/secure-remote-commerce/providers/visa-src/visa-src.styles.d.ts +0 -9
- package/bundles/types/secure-remote-commerce/providers/visa-src/visa-src.styles.d.ts.map +0 -1
package/docs/wallet-buttons.md
CHANGED
|
@@ -17,6 +17,24 @@
|
|
|
17
17
|
## Interfaces
|
|
18
18
|
|
|
19
19
|
<dl>
|
|
20
|
+
<dt><a href="#IEventData">IEventData</a></dt>
|
|
21
|
+
<dd><p>Interface of data from events.</p>
|
|
22
|
+
</dd>
|
|
23
|
+
<dt><a href="#IWalletPaymentSuccessful">IWalletPaymentSuccessful</a></dt>
|
|
24
|
+
<dd><p>Interface of data from a successful payment result.</p>
|
|
25
|
+
</dd>
|
|
26
|
+
<dt><a href="#IWalletUpdate">IWalletUpdate</a></dt>
|
|
27
|
+
<dd><p>Interface of data from an update event.</p>
|
|
28
|
+
</dd>
|
|
29
|
+
<dt><a href="#IWalletOnClick">IWalletOnClick</a></dt>
|
|
30
|
+
<dd><p>Interface of data from a wallet onClick event.</p>
|
|
31
|
+
</dd>
|
|
32
|
+
<dt><a href="#IWalletUnavailable">IWalletUnavailable</a></dt>
|
|
33
|
+
<dd><p>Interface of data from an unavailable event.</p>
|
|
34
|
+
</dd>
|
|
35
|
+
<dt><a href="#IWalletUpdateData">IWalletUpdateData</a></dt>
|
|
36
|
+
<dd><p>Interface of data for wallet button <code>update</code> call.</p>
|
|
37
|
+
</dd>
|
|
20
38
|
<dt><a href="#IWalletMeta">IWalletMeta</a> : <code>object</code></dt>
|
|
21
39
|
<dd><p>Interface of data used by the wallet checkout and payment proccess.</p>
|
|
22
40
|
</dd>
|
|
@@ -31,6 +49,100 @@
|
|
|
31
49
|
</dd>
|
|
32
50
|
</dl>
|
|
33
51
|
|
|
52
|
+
<a name="IEventData" id="IEventData" href="#IEventData"> </a>
|
|
53
|
+
|
|
54
|
+
## IEventData
|
|
55
|
+
Interface of data from events.
|
|
56
|
+
|
|
57
|
+
**Kind**: global interface
|
|
58
|
+
|
|
59
|
+
| Param | Type |
|
|
60
|
+
| --- | --- |
|
|
61
|
+
| event | <code>string</code> |
|
|
62
|
+
| data | <code>void</code> \| [<code>IWalletPaymentSuccessful</code>](#IWalletPaymentSuccessful) \| [<code>IWalletUpdate</code>](#IWalletUpdate) \| [<code>IWalletUnavailable</code>](#IWalletUnavailable) \| [<code>IWalletOnClick</code>](#IWalletOnClick) \| <code>any</code> |
|
|
63
|
+
|
|
64
|
+
<a name="IWalletPaymentSuccessful" id="IWalletPaymentSuccessful" href="#IWalletPaymentSuccessful"> </a>
|
|
65
|
+
|
|
66
|
+
## IWalletPaymentSuccessful
|
|
67
|
+
Interface of data from a successful payment result.
|
|
68
|
+
|
|
69
|
+
**Kind**: global interface
|
|
70
|
+
|
|
71
|
+
| Param | Type |
|
|
72
|
+
| --- | --- |
|
|
73
|
+
| id | <code>string</code> |
|
|
74
|
+
| amount | <code>number</code> |
|
|
75
|
+
| currency | <code>string</code> |
|
|
76
|
+
| status | <code>string</code> |
|
|
77
|
+
| [payer_name] | <code>string</code> |
|
|
78
|
+
| [payer_email] | <code>string</code> |
|
|
79
|
+
| [payer_phone] | <code>string</code> |
|
|
80
|
+
|
|
81
|
+
<a name="IWalletUpdate" id="IWalletUpdate" href="#IWalletUpdate"> </a>
|
|
82
|
+
|
|
83
|
+
## IWalletUpdate
|
|
84
|
+
Interface of data from an update event.
|
|
85
|
+
|
|
86
|
+
**Kind**: global interface
|
|
87
|
+
|
|
88
|
+
| Param | Type |
|
|
89
|
+
| --- | --- |
|
|
90
|
+
| [wallet_response_code] | <code>string</code> |
|
|
91
|
+
| [wallet_session_id] | <code>string</code> |
|
|
92
|
+
| [payment_source] | <code>object</code> |
|
|
93
|
+
| [payment_source.wallet_payment_method_id] | <code>string</code> |
|
|
94
|
+
| [payment_source.card_number_last4] | <code>string</code> |
|
|
95
|
+
| [payment_source.card_scheme] | <code>string</code> |
|
|
96
|
+
| [wallet_loyalty_account] | <code>object</code> |
|
|
97
|
+
| [wallet_loyalty_account.id] | <code>string</code> |
|
|
98
|
+
| [wallet_loyalty_account.barcode] | <code>string</code> |
|
|
99
|
+
| [shipping] | <code>object</code> |
|
|
100
|
+
| [shipping.address_line1] | <code>string</code> |
|
|
101
|
+
| [shipping.address_line2] | <code>string</code> |
|
|
102
|
+
| [shipping.address_postcode] | <code>string</code> |
|
|
103
|
+
| [shipping.address_city] | <code>string</code> |
|
|
104
|
+
| [shipping.address_state] | <code>string</code> |
|
|
105
|
+
| [shipping.address_country] | <code>string</code> |
|
|
106
|
+
| [shipping.address_company] | <code>string</code> |
|
|
107
|
+
| [shipping.post_office_box_number] | <code>string</code> |
|
|
108
|
+
| [shipping.wallet_address_id] | <code>string</code> |
|
|
109
|
+
| [shipping.wallet_address_name] | <code>string</code> |
|
|
110
|
+
| [shipping.wallet_address_created_timestamp] | <code>string</code> |
|
|
111
|
+
| [shipping.wallet_address_updated_timestamp] | <code>string</code> |
|
|
112
|
+
|
|
113
|
+
<a name="IWalletOnClick" id="IWalletOnClick" href="#IWalletOnClick"> </a>
|
|
114
|
+
|
|
115
|
+
## IWalletOnClick
|
|
116
|
+
Interface of data from a wallet onClick event.
|
|
117
|
+
|
|
118
|
+
**Kind**: global interface
|
|
119
|
+
|
|
120
|
+
| Param | Description |
|
|
121
|
+
| --- | --- |
|
|
122
|
+
| attachResult | Method to be called that attaches a result to the wallet onClick operation. When handler is synchronous, this method is optionally called with a boolean flag indicating validation result. When handler executes asynchronous operations, this method must be called with the Promise to have the wallet process wait for its completion or rejection. |
|
|
123
|
+
|
|
124
|
+
<a name="IWalletUnavailable" id="IWalletUnavailable" href="#IWalletUnavailable"> </a>
|
|
125
|
+
|
|
126
|
+
## IWalletUnavailable
|
|
127
|
+
Interface of data from an unavailable event.
|
|
128
|
+
|
|
129
|
+
**Kind**: global interface
|
|
130
|
+
|
|
131
|
+
| Param | Type | Description |
|
|
132
|
+
| --- | --- | --- |
|
|
133
|
+
| [wallet] | <code>string</code> | For gateways with more than one wallet button available (e.g: MPGS with ApplePay and GooglePay). Possible values for wallet are 'apple' or 'google'. |
|
|
134
|
+
|
|
135
|
+
<a name="IWalletUpdateData" id="IWalletUpdateData" href="#IWalletUpdateData"> </a>
|
|
136
|
+
|
|
137
|
+
## IWalletUpdateData
|
|
138
|
+
Interface of data for wallet button `update` call.
|
|
139
|
+
|
|
140
|
+
**Kind**: global interface
|
|
141
|
+
|
|
142
|
+
| Param | Type |
|
|
143
|
+
| --- | --- |
|
|
144
|
+
| success | <code>boolean</code> |
|
|
145
|
+
|
|
34
146
|
<a name="IWalletMeta" id="IWalletMeta" href="#IWalletMeta"> </a>
|
|
35
147
|
|
|
36
148
|
## IWalletMeta : <code>object</code>
|
|
@@ -115,14 +227,19 @@ Class WalletButtons to work with different E-Wallets within html (currently supp
|
|
|
115
227
|
* [.load()](#WalletButtons+load)
|
|
116
228
|
* [.update()](#WalletButtons+update)
|
|
117
229
|
* [.setEnv(env, [alias])](#WalletButtons+setEnv)
|
|
230
|
+
* [.enable()](#WalletButtons+enable)
|
|
231
|
+
* [.disable()](#WalletButtons+disable)
|
|
118
232
|
* [.close()](#WalletButtons+close)
|
|
119
|
-
* [.on(eventName, [cb])](#WalletButtons+on) ⇒ <code>Promise.<IEventData></code> \| <code>void</code>
|
|
233
|
+
* [.on(eventName, [cb])](#WalletButtons+on) ⇒ [<code>Promise.<IEventData></code>](#IEventData) \| <code>void</code>
|
|
120
234
|
* [.onUnavailable([handler])](#WalletButtons+onUnavailable)
|
|
121
235
|
* [.onUpdate([handler])](#WalletButtons+onUpdate)
|
|
122
236
|
* [.onPaymentSuccessful([handler])](#WalletButtons+onPaymentSuccessful)
|
|
123
237
|
* [.onPaymentInReview([handler])](#WalletButtons+onPaymentInReview)
|
|
124
238
|
* [.onPaymentError([handler])](#WalletButtons+onPaymentError)
|
|
125
239
|
* [.onAuthTokensChanged([handler])](#WalletButtons+onAuthTokensChanged)
|
|
240
|
+
* [.onClick(handler)](#WalletButtons+onClick)
|
|
241
|
+
* [.onCheckoutOpen(handler)](#WalletButtons+onCheckoutOpen)
|
|
242
|
+
* [.onCheckoutClose(handler)](#WalletButtons+onCheckoutClose)
|
|
126
243
|
|
|
127
244
|
<a name="new_WalletButtons_new" id="new_WalletButtons_new" href="#new_WalletButtons_new"> </a>
|
|
128
245
|
|
|
@@ -233,6 +350,26 @@ Bear in mind that you must set an environment before calling `button.load()`.
|
|
|
233
350
|
```js
|
|
234
351
|
button.setEnv('production', 'paydock.com');
|
|
235
352
|
```
|
|
353
|
+
<a name="WalletButtons+enable" id="WalletButtons+enable" href="#WalletButtons+enable"> </a>
|
|
354
|
+
|
|
355
|
+
### walletButtons.enable()
|
|
356
|
+
Current method can enable the payment button. This method is only supported for Flypay V2.
|
|
357
|
+
|
|
358
|
+
**Kind**: instance method of [<code>WalletButtons</code>](#WalletButtons)
|
|
359
|
+
**Example**
|
|
360
|
+
```js
|
|
361
|
+
button.enable();
|
|
362
|
+
```
|
|
363
|
+
<a name="WalletButtons+disable" id="WalletButtons+disable" href="#WalletButtons+disable"> </a>
|
|
364
|
+
|
|
365
|
+
### walletButtons.disable()
|
|
366
|
+
Current method can disable the payment button. This method is only supported for Flypay V2.
|
|
367
|
+
|
|
368
|
+
**Kind**: instance method of [<code>WalletButtons</code>](#WalletButtons)
|
|
369
|
+
**Example**
|
|
370
|
+
```js
|
|
371
|
+
button.disable('production', 'paydock.com');
|
|
372
|
+
```
|
|
236
373
|
<a name="WalletButtons+close" id="WalletButtons+close" href="#WalletButtons+close"> </a>
|
|
237
374
|
|
|
238
375
|
### walletButtons.close()
|
|
@@ -245,7 +382,7 @@ button.close();
|
|
|
245
382
|
```
|
|
246
383
|
<a name="WalletButtons+on" id="WalletButtons+on" href="#WalletButtons+on"> </a>
|
|
247
384
|
|
|
248
|
-
### walletButtons.on(eventName, [cb]) ⇒ <code>Promise.<IEventData></code> \| <code>void</code>
|
|
385
|
+
### walletButtons.on(eventName, [cb]) ⇒ [<code>Promise.<IEventData></code>](#IEventData) \| <code>void</code>
|
|
249
386
|
Listen to events of button. `unavailable` returns no data, `paymentSuccessful` returns IWalletPaymentSuccessful
|
|
250
387
|
for Stripe or full response for Flypay, and `paymentError` an error.
|
|
251
388
|
|
|
@@ -408,6 +545,63 @@ button.onAuthTokensChanged().then((eventData) => {
|
|
|
408
545
|
console.log('Authentication tokens changed:', eventData);
|
|
409
546
|
});
|
|
410
547
|
```
|
|
548
|
+
<a name="WalletButtons+onClick" id="WalletButtons+onClick" href="#WalletButtons+onClick"> </a>
|
|
549
|
+
|
|
550
|
+
### walletButtons.onClick(handler)
|
|
551
|
+
Registers a callback function to be invoked when the wallet button gets clicked.
|
|
552
|
+
There are two operational modes supported, Synchronous and Asynchronous.
|
|
553
|
+
When asynchronous operations need to occur on the callback handler, attaching the Promise via `attachResult` is required to have the wallet wait for a result.
|
|
554
|
+
When synchronous operations occur on the callback handler, attaching a boolean result via `attachResult` is optional to control the execution flow.
|
|
555
|
+
Note this is supported for Paypal, GooglePay and ApplePay wallet buttons at the moment.
|
|
556
|
+
|
|
557
|
+
**Kind**: instance method of [<code>WalletButtons</code>](#WalletButtons)
|
|
558
|
+
|
|
559
|
+
| Param | Type | Description |
|
|
560
|
+
| --- | --- | --- |
|
|
561
|
+
| handler | <code>listener</code> | Function to be called when the wallet button is clicked. |
|
|
562
|
+
|
|
563
|
+
**Example**
|
|
564
|
+
```js
|
|
565
|
+
button.onClick((data) => {
|
|
566
|
+
performValidationLogic();
|
|
567
|
+
});
|
|
568
|
+
```
|
|
569
|
+
<a name="WalletButtons+onCheckoutOpen" id="WalletButtons+onCheckoutOpen" href="#WalletButtons+onCheckoutOpen"> </a>
|
|
570
|
+
|
|
571
|
+
### walletButtons.onCheckoutOpen(handler)
|
|
572
|
+
Registers a callback function to be invoked when the wallet checkout opens.
|
|
573
|
+
Note this is supported for FlypayV2 wallet button at the moment.
|
|
574
|
+
|
|
575
|
+
**Kind**: instance method of [<code>WalletButtons</code>](#WalletButtons)
|
|
576
|
+
|
|
577
|
+
| Param | Type | Description |
|
|
578
|
+
| --- | --- | --- |
|
|
579
|
+
| handler | <code>listener</code> | Function to be called when the wallet checkout opens. |
|
|
580
|
+
|
|
581
|
+
**Example**
|
|
582
|
+
```js
|
|
583
|
+
button.onCheckoutOpen((data) => {
|
|
584
|
+
console.log('Checkout opens');
|
|
585
|
+
});
|
|
586
|
+
```
|
|
587
|
+
<a name="WalletButtons+onCheckoutClose" id="WalletButtons+onCheckoutClose" href="#WalletButtons+onCheckoutClose"> </a>
|
|
588
|
+
|
|
589
|
+
### walletButtons.onCheckoutClose(handler)
|
|
590
|
+
Registers a callback function to be invoked when the wallet checkout closes.
|
|
591
|
+
Note this is supported for FlypayV2 wallet button at the moment.
|
|
592
|
+
|
|
593
|
+
**Kind**: instance method of [<code>WalletButtons</code>](#WalletButtons)
|
|
594
|
+
|
|
595
|
+
| Param | Type | Description |
|
|
596
|
+
| --- | --- | --- |
|
|
597
|
+
| handler | <code>listener</code> | Function to be called when the wallet checkout closes. |
|
|
598
|
+
|
|
599
|
+
**Example**
|
|
600
|
+
```js
|
|
601
|
+
button.onCheckoutClose(() => {
|
|
602
|
+
console.log('Wallet checkout closes');
|
|
603
|
+
});
|
|
604
|
+
```
|
|
411
605
|
<a name="EVENT" id="EVENT" href="#EVENT"> </a>
|
|
412
606
|
|
|
413
607
|
## EVENT : <code>object</code>
|
|
@@ -421,4 +615,5 @@ List of available event's name in the wallet button lifecycle
|
|
|
421
615
|
| UPDATE | <code>string</code> | <code>"update"</code> |
|
|
422
616
|
| PAYMENT_SUCCESSFUL | <code>string</code> | <code>"paymentSuccessful"</code> |
|
|
423
617
|
| PAYMENT_ERROR | <code>string</code> | <code>"paymentError"</code> |
|
|
618
|
+
| ON_CLICK | <code>string</code> | <code>"onClick"</code> |
|
|
424
619
|
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
|
|
17
17
|
<div id="widget"></div>
|
|
18
18
|
|
|
19
|
-
<script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js" ></script>
|
|
19
|
+
<!-- <script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js" ></script> -->
|
|
20
|
+
<script src="../../bundles/widget.umd.js" ></script>
|
|
20
21
|
|
|
21
22
|
<script>
|
|
22
23
|
var card = new paydock.Configuration('5c77d21fb8d0ce13df9bce3f');
|
package/package.json
CHANGED
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
}
|
|
105
105
|
},
|
|
106
106
|
"name": "@paydock/client-sdk",
|
|
107
|
-
"version": "1.104.
|
|
107
|
+
"version": "1.104.7-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",
|
|
@@ -128,10 +128,14 @@
|
|
|
128
128
|
"test": "run-s test:chromium",
|
|
129
129
|
"tsc:cba": "tsc --project tsconfig.cba.json",
|
|
130
130
|
"tsc:paydock": "tsc --project tsconfig.paydock.json",
|
|
131
|
-
"
|
|
131
|
+
"tidy:ci": "biome ci --no-errors-on-unmatched .",
|
|
132
|
+
"tidy:precommit": "biome ci --no-errors-on-unmatched --changed .",
|
|
133
|
+
"tidy": "biome check --apply --formatter-enabled=true --linter-enabled=true --organize-imports-enabled=true --no-errors-on-unmatched .",
|
|
134
|
+
"typecheck": "tsc --project tsconfig.json --noEmit"
|
|
132
135
|
},
|
|
133
136
|
"dependencies": {
|
|
134
137
|
"@auspayplus/open-payments-checkout": "1.7.3",
|
|
138
|
+
"@newrelic/browser-agent": "^1.259.0",
|
|
135
139
|
"@stripe/stripe-js": "^1.11.0"
|
|
136
140
|
},
|
|
137
141
|
"devDependencies": {
|
|
@@ -145,6 +149,7 @@
|
|
|
145
149
|
"@babel/preset-env": "^7.24.0",
|
|
146
150
|
"@babel/runtime": "^7.24.0",
|
|
147
151
|
"@babel/runtime-corejs2": "^7.24.0",
|
|
152
|
+
"@biomejs/biome": "^1.7.3",
|
|
148
153
|
"@rollup/plugin-babel": "^6.0.4",
|
|
149
154
|
"@rollup/plugin-commonjs": "^25.0.7",
|
|
150
155
|
"@rollup/plugin-json": "^6.1.0",
|
|
@@ -162,9 +167,10 @@
|
|
|
162
167
|
"babelify": "^10.0.0",
|
|
163
168
|
"base64-js": "^1.2.0",
|
|
164
169
|
"browser-resolve": "^1.11.2",
|
|
165
|
-
"browserify": "^
|
|
170
|
+
"browserify": "^17.0.0",
|
|
166
171
|
"browserify-istanbul": "^2.0.0",
|
|
167
172
|
"buffer": "^5.0.5",
|
|
173
|
+
"dotenv": "^16.4.5",
|
|
168
174
|
"fs": "0.0.2",
|
|
169
175
|
"grunt": "^1.6.1",
|
|
170
176
|
"grunt-cli": "^1.2.0",
|
|
@@ -187,33 +193,30 @@
|
|
|
187
193
|
"karma-jasmine-ajax": "^0.1.13",
|
|
188
194
|
"karma-mocha-reporter": "^2.2.2",
|
|
189
195
|
"marked": "^4.0.14",
|
|
190
|
-
"npm-run-
|
|
196
|
+
"npm-run-all2": "^6.2.0",
|
|
191
197
|
"process": "^0.11.9",
|
|
192
198
|
"rimraf": "^5.0.5",
|
|
193
|
-
"rollup": "^4.
|
|
199
|
+
"rollup": "^4.17.2",
|
|
194
200
|
"rollup-plugin-dts": "^6.1.0",
|
|
195
201
|
"tsify": "^3.0.1",
|
|
196
202
|
"tslib": "^2.6.2",
|
|
197
203
|
"tslint": "^5.8.0",
|
|
198
|
-
"typescript": "^4.
|
|
204
|
+
"typescript": "^5.4.5",
|
|
199
205
|
"zod": "^3.22.4"
|
|
200
206
|
},
|
|
201
|
-
"
|
|
202
|
-
"
|
|
203
|
-
"chokidar": {
|
|
204
|
-
"fsevents": {
|
|
205
|
-
"minimist": "^1.2.6"
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
}
|
|
207
|
+
"engines": {
|
|
208
|
+
"node": ">=16.0.0"
|
|
209
209
|
},
|
|
210
210
|
"license": "UNLICENSED",
|
|
211
211
|
"keywords": [
|
|
212
212
|
"client-sdk",
|
|
213
213
|
"es2015",
|
|
214
|
+
"umd",
|
|
215
|
+
"cjs",
|
|
216
|
+
"esm",
|
|
214
217
|
"paydock",
|
|
215
218
|
"sdk",
|
|
216
|
-
"
|
|
219
|
+
"typescript",
|
|
217
220
|
"widget"
|
|
218
221
|
]
|
|
219
222
|
}
|