@paydock/client-sdk 1.117.0 → 1.118.0
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 +14 -11
- package/bundles/index.cjs +373 -68
- package/bundles/index.cjs.d.ts +46 -13
- package/bundles/index.mjs +373 -68
- package/bundles/index.mjs.d.ts +46 -13
- package/bundles/types/api/api-checkout-internal.d.ts +1 -0
- package/bundles/types/api/api-checkout-internal.d.ts.map +1 -1
- package/bundles/types/checkout/layout-widgets/payment-methods-template.d.ts.map +1 -1
- package/bundles/types/checkout/layout-widgets/payment-methods.d.ts +1 -0
- package/bundles/types/checkout/layout-widgets/payment-methods.d.ts.map +1 -1
- package/bundles/types/components/param.d.ts +2 -0
- package/bundles/types/components/param.d.ts.map +1 -1
- package/bundles/types/configs/env/environment.paydock.d.ts.map +1 -1
- package/bundles/types/index-cba.d.ts +2 -1
- package/bundles/types/index-cba.d.ts.map +1 -1
- package/bundles/types/index.d.ts +1 -1
- package/bundles/types/index.d.ts.map +1 -1
- package/bundles/types/paypal-data-collector/paypal-data-collector.d.ts +4 -4
- package/bundles/types/secure-remote-commerce/index.d.ts +1 -0
- package/bundles/types/secure-remote-commerce/index.d.ts.map +1 -1
- package/bundles/types/shared/services/configuration-validation/configuration-validation.d.ts +12 -0
- package/bundles/types/shared/services/configuration-validation/configuration-validation.d.ts.map +1 -0
- package/bundles/types/shared/services/configuration-validation/types.d.ts +73 -0
- package/bundles/types/shared/services/configuration-validation/types.d.ts.map +1 -0
- package/bundles/types/wallet-buttons/enums.d.ts +12 -0
- package/bundles/types/wallet-buttons/enums.d.ts.map +1 -0
- package/bundles/types/wallet-buttons/index.d.ts +2 -1
- package/bundles/types/wallet-buttons/index.d.ts.map +1 -1
- package/bundles/types/wallet-buttons/wallet-buttons.d.ts +28 -15
- package/bundles/types/wallet-buttons/wallet-buttons.d.ts.map +1 -1
- package/bundles/types/wallet-buttons-express/index.d.ts +1 -0
- package/bundles/types/wallet-buttons-express/index.d.ts.map +1 -1
- package/bundles/types/wallet-buttons-express/services/paypal/interfaces/paypal-wallet-meta.interface.d.ts +1 -0
- package/bundles/types/wallet-buttons-express/services/paypal/interfaces/paypal-wallet-meta.interface.d.ts.map +1 -1
- package/bundles/types/widget/configuration.d.ts +6 -2
- package/bundles/types/widget/configuration.d.ts.map +1 -1
- package/bundles/types/widget/multi-widget.d.ts +1 -0
- package/bundles/types/widget/multi-widget.d.ts.map +1 -1
- package/bundles/widget.umd.js +373 -68
- package/bundles/widget.umd.js.d.ts +46 -13
- package/bundles/widget.umd.js.min.d.ts +46 -13
- package/bundles/widget.umd.min.js +1 -61
- package/docs/paypal-data-collector-examples.md +6 -5
- package/docs/paypal-data-collector.md +6 -6
- package/docs/wallet-buttons-express.md +1 -0
- package/docs/wallet-buttons.md +1 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -5944,6 +5944,7 @@ Interface of data used by the wallet checkout and payment proccess.
|
|
|
5944
5944
|
| [amount_label] | <code>string</code> | Label shown next to the total amount to be paid. Required for [Stripe, ApplePay, GooglePay]. N/A for [FlyPay, Flypay V2, PayPal, Afterpay]. |
|
|
5945
5945
|
| [country] | <code>string</code> | Country of the user. 2 letter ISO code format. Required for [Stripe, ApplePay, GooglePay, Afterpay]. N/A for [FlyPay, Flypay V2, PayPal]. |
|
|
5946
5946
|
| [pay_later] | <code>boolean</code> | Used to enable Pay Later feature in PayPal Smart Checkout WalletButton integration when available. Optional for [PayPal]. N/A for other wallets. |
|
|
5947
|
+
| [hide_message] | <code>boolean</code> | Used to hide Pay Later message in PayPal Smart Checkout WalletButton integration. Optional for [PayPal]. N/A for other wallets. |
|
|
5947
5948
|
| [standalone] | <code>boolean</code> | Used to enable Standalone Buttons feature in PayPal Smart Checkout WalletButton integration. Used together with `pay_later`. Optional for [PayPal]. N/A for other wallets. |
|
|
5948
5949
|
| [show_billing_address] | <code>boolean</code> | Used to hide/show the billing address on ApplePay and GooglePay popups. Default value is false. Optional for [ApplePay, GooglePay]. N/A for other wallets. |
|
|
5949
5950
|
| [request_payer_name] | <code>boolean</code> | Used mainly for fraud purposes - recommended set to true. Optional for [Stripe]. N/A for other wallets. |
|
|
@@ -6723,6 +6724,7 @@ For in-depth information, please refer to the [Paypal documentation](https://dev
|
|
|
6723
6724
|
| amount | <code>number</code> | Total amount of the transaction. Represents the money to be charged. |
|
|
6724
6725
|
| currency | <code>string</code> | Currency of the transaction in ISO 4217 currency code format. |
|
|
6725
6726
|
| [pay_later] | <code>boolean</code> | Flag to enable Pay Later feature of PayPal, allowing Pay in 4. Default false. |
|
|
6727
|
+
| [hide_message] | <code>boolean</code> | Used to hide Pay Later message in PayPal Smart Checkout WalletButton integration. Optional for [PayPal]. N/A for other wallets. |
|
|
6726
6728
|
| [standalone] | <code>boolean</code> | Flag to specify if the PayPal standalone button should be used. Default false. |
|
|
6727
6729
|
| [capture] | <code>boolean</code> | Flag to specify if the transaction amount should be captured immediately or authorized for later capture. Default false. |
|
|
6728
6730
|
| [style] | <code>object</code> | Styling configurations for the PayPal widget. |
|
|
@@ -8326,7 +8328,7 @@ A full description of the config parameters for [PayPalDataCollector](#PayPalDat
|
|
|
8326
8328
|
<script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js" ></script>
|
|
8327
8329
|
<script>
|
|
8328
8330
|
let payPalDataCollector = new paydock.PayPalDataCollector(
|
|
8329
|
-
|
|
8331
|
+
'FLOW_ID',
|
|
8330
8332
|
{
|
|
8331
8333
|
mouse_movement: true
|
|
8332
8334
|
}
|
|
@@ -8338,10 +8340,11 @@ A full description of the config parameters for [PayPalDataCollector](#PayPalDat
|
|
|
8338
8340
|
console.log("On Error Callback", error);
|
|
8339
8341
|
});
|
|
8340
8342
|
|
|
8341
|
-
|
|
8342
|
-
|
|
8343
|
-
|
|
8344
|
-
|
|
8343
|
+
payPalDataCollector.collectDeviceData().then(function(collectedDeviceData) {
|
|
8344
|
+
//Here when the promise is resolved, it should be able to see the correlation_id.
|
|
8345
|
+
const correlationId = collectedDeviceData.correlation_id;
|
|
8346
|
+
console.log("On Success", correlationId);
|
|
8347
|
+
});
|
|
8345
8348
|
</script>
|
|
8346
8349
|
</html>
|
|
8347
8350
|
```
|
|
@@ -8417,19 +8420,19 @@ PayPal Data Collector Widget constructor
|
|
|
8417
8420
|
**Kind**: global class
|
|
8418
8421
|
|
|
8419
8422
|
* [PayPalDataCollector](#PayPalDataCollector)
|
|
8420
|
-
* [new PayPalDataCollector(flowId, config)](#new_PayPalDataCollector_new)
|
|
8423
|
+
* [new PayPalDataCollector([flowId], [config])](#new_PayPalDataCollector_new)
|
|
8421
8424
|
* [.collectDeviceData()](#PayPalDataCollector+collectDeviceData) ⇒ [<code>Promise.<CollectedDeviceData></code>](#CollectedDeviceData)
|
|
8422
8425
|
* [.onError([callback])](#PayPalDataCollector+onError)
|
|
8423
8426
|
* [.setEnv(env)](#PayPalDataCollector+setEnv)
|
|
8424
8427
|
|
|
8425
8428
|
<a name="new_PayPalDataCollector_new" id="new_PayPalDataCollector_new" href="#new_PayPalDataCollector_new"> </a>
|
|
8426
8429
|
|
|
8427
|
-
### new PayPalDataCollector(flowId, config)
|
|
8430
|
+
### new PayPalDataCollector([flowId], [config])
|
|
8428
8431
|
|
|
8429
8432
|
| Param | Type | Description |
|
|
8430
8433
|
| --- | --- | --- |
|
|
8431
|
-
| flowId | <code>string</code> | This string identifies the source website of the FraudNet request. |
|
|
8432
|
-
| config | [<code>PayPalDataCollectorConfig</code>](#PayPalDataCollectorConfig) | Extra configuration for the widget. |
|
|
8434
|
+
| [flowId] | <code>string</code> | This string identifies the source website of the FraudNet request. |
|
|
8435
|
+
| [config] | [<code>PayPalDataCollectorConfig</code>](#PayPalDataCollectorConfig) | Extra configuration for the widget. |
|
|
8433
8436
|
|
|
8434
8437
|
**Example**
|
|
8435
8438
|
```js
|
|
@@ -8439,10 +8442,10 @@ var payPalDataCollector = new PayPalDataCollector('FLOW_ID', {});
|
|
|
8439
8442
|
|
|
8440
8443
|
### payPalDataCollector.collectDeviceData() ⇒ [<code>Promise.<CollectedDeviceData></code>](#CollectedDeviceData)
|
|
8441
8444
|
After configuring the PayPalDataCollector Widget, starts the process and returns
|
|
8442
|
-
the correlation id used among the requests.
|
|
8445
|
+
the correlation id used among the requests asynchronously.
|
|
8443
8446
|
|
|
8444
8447
|
**Kind**: instance method of [<code>PayPalDataCollector</code>](#PayPalDataCollector)
|
|
8445
|
-
**Returns**: [<code>Promise.<CollectedDeviceData></code>](#CollectedDeviceData) - Promise when resolved,
|
|
8448
|
+
**Returns**: [<code>Promise.<CollectedDeviceData></code>](#CollectedDeviceData) - Promise when resolved, returns an object
|
|
8446
8449
|
that contains the `correlation_id` key.
|
|
8447
8450
|
**Example**
|
|
8448
8451
|
```js
|