@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
|
@@ -37,7 +37,7 @@ A full description of the config parameters for [PayPalDataCollector](#PayPalDat
|
|
|
37
37
|
<script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js" ></script>
|
|
38
38
|
<script>
|
|
39
39
|
let payPalDataCollector = new paydock.PayPalDataCollector(
|
|
40
|
-
|
|
40
|
+
'FLOW_ID',
|
|
41
41
|
{
|
|
42
42
|
mouse_movement: true
|
|
43
43
|
}
|
|
@@ -49,10 +49,11 @@ A full description of the config parameters for [PayPalDataCollector](#PayPalDat
|
|
|
49
49
|
console.log("On Error Callback", error);
|
|
50
50
|
});
|
|
51
51
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
52
|
+
payPalDataCollector.collectDeviceData().then(function(collectedDeviceData) {
|
|
53
|
+
//Here when the promise is resolved, it should be able to see the correlation_id.
|
|
54
|
+
const correlationId = collectedDeviceData.correlation_id;
|
|
55
|
+
console.log("On Success", correlationId);
|
|
56
|
+
});
|
|
56
57
|
</script>
|
|
57
58
|
</html>
|
|
58
59
|
```
|
|
@@ -69,19 +69,19 @@ PayPal Data Collector Widget constructor
|
|
|
69
69
|
**Kind**: global class
|
|
70
70
|
|
|
71
71
|
* [PayPalDataCollector](#PayPalDataCollector)
|
|
72
|
-
* [new PayPalDataCollector(flowId, config)](#new_PayPalDataCollector_new)
|
|
72
|
+
* [new PayPalDataCollector([flowId], [config])](#new_PayPalDataCollector_new)
|
|
73
73
|
* [.collectDeviceData()](#PayPalDataCollector+collectDeviceData) ⇒ [<code>Promise.<CollectedDeviceData></code>](#CollectedDeviceData)
|
|
74
74
|
* [.onError([callback])](#PayPalDataCollector+onError)
|
|
75
75
|
* [.setEnv(env)](#PayPalDataCollector+setEnv)
|
|
76
76
|
|
|
77
77
|
<a name="new_PayPalDataCollector_new" id="new_PayPalDataCollector_new" href="#new_PayPalDataCollector_new"> </a>
|
|
78
78
|
|
|
79
|
-
### new PayPalDataCollector(flowId, config)
|
|
79
|
+
### new PayPalDataCollector([flowId], [config])
|
|
80
80
|
|
|
81
81
|
| Param | Type | Description |
|
|
82
82
|
| --- | --- | --- |
|
|
83
|
-
| flowId | <code>string</code> | This string identifies the source website of the FraudNet request. |
|
|
84
|
-
| config | [<code>PayPalDataCollectorConfig</code>](#PayPalDataCollectorConfig) | Extra configuration for the widget. |
|
|
83
|
+
| [flowId] | <code>string</code> | This string identifies the source website of the FraudNet request. |
|
|
84
|
+
| [config] | [<code>PayPalDataCollectorConfig</code>](#PayPalDataCollectorConfig) | Extra configuration for the widget. |
|
|
85
85
|
|
|
86
86
|
**Example**
|
|
87
87
|
```js
|
|
@@ -91,10 +91,10 @@ var payPalDataCollector = new PayPalDataCollector('FLOW_ID', {});
|
|
|
91
91
|
|
|
92
92
|
### payPalDataCollector.collectDeviceData() ⇒ [<code>Promise.<CollectedDeviceData></code>](#CollectedDeviceData)
|
|
93
93
|
After configuring the PayPalDataCollector Widget, starts the process and returns
|
|
94
|
-
the correlation id used among the requests.
|
|
94
|
+
the correlation id used among the requests asynchronously.
|
|
95
95
|
|
|
96
96
|
**Kind**: instance method of [<code>PayPalDataCollector</code>](#PayPalDataCollector)
|
|
97
|
-
**Returns**: [<code>Promise.<CollectedDeviceData></code>](#CollectedDeviceData) - Promise when resolved,
|
|
97
|
+
**Returns**: [<code>Promise.<CollectedDeviceData></code>](#CollectedDeviceData) - Promise when resolved, returns an object
|
|
98
98
|
that contains the `correlation_id` key.
|
|
99
99
|
**Example**
|
|
100
100
|
```js
|
|
@@ -111,6 +111,7 @@ For in-depth information, please refer to the [Paypal documentation](https://dev
|
|
|
111
111
|
| amount | <code>number</code> | Total amount of the transaction. Represents the money to be charged. |
|
|
112
112
|
| currency | <code>string</code> | Currency of the transaction in ISO 4217 currency code format. |
|
|
113
113
|
| [pay_later] | <code>boolean</code> | Flag to enable Pay Later feature of PayPal, allowing Pay in 4. Default false. |
|
|
114
|
+
| [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. |
|
|
114
115
|
| [standalone] | <code>boolean</code> | Flag to specify if the PayPal standalone button should be used. Default false. |
|
|
115
116
|
| [capture] | <code>boolean</code> | Flag to specify if the transaction amount should be captured immediately or authorized for later capture. Default false. |
|
|
116
117
|
| [style] | <code>object</code> | Styling configurations for the PayPal widget. |
|
package/docs/wallet-buttons.md
CHANGED
|
@@ -157,6 +157,7 @@ Interface of data used by the wallet checkout and payment proccess.
|
|
|
157
157
|
| [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]. |
|
|
158
158
|
| [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]. |
|
|
159
159
|
| [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. |
|
|
160
|
+
| [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. |
|
|
160
161
|
| [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. |
|
|
161
162
|
| [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. |
|
|
162
163
|
| [request_payer_name] | <code>boolean</code> | Used mainly for fraud purposes - recommended set to true. Optional for [Stripe]. N/A for other wallets. |
|
package/package.json
CHANGED
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
}
|
|
105
105
|
},
|
|
106
106
|
"name": "@paydock/client-sdk",
|
|
107
|
-
"version": "1.
|
|
107
|
+
"version": "1.118.0",
|
|
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",
|
|
@@ -151,7 +151,7 @@
|
|
|
151
151
|
"@babel/preset-env": "7.24.5",
|
|
152
152
|
"@babel/runtime": "7.24.5",
|
|
153
153
|
"@babel/runtime-corejs2": "7.24.5",
|
|
154
|
-
"@biomejs/biome": "1.
|
|
154
|
+
"@biomejs/biome": "1.9.4",
|
|
155
155
|
"@rollup/plugin-babel": "6.0.4",
|
|
156
156
|
"@rollup/plugin-commonjs": "25.0.7",
|
|
157
157
|
"@rollup/plugin-json": "6.1.0",
|