@paydock/client-sdk 1.10.81-beta → 1.10.83-beta-01

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.
Files changed (60) hide show
  1. package/README.md +19 -19
  2. package/bundles/widget.umd.js +143 -111
  3. package/bundles/widget.umd.min.js +1 -1
  4. package/inicialization-guide.md +7 -0
  5. package/lib/api/api-base.d.ts +1 -0
  6. package/lib/api/api-base.js +8 -1
  7. package/lib/api/api-base.js.map +1 -1
  8. package/lib/checkout-button/afterpay-checkout-button.d.ts +4 -4
  9. package/lib/checkout-button/afterpay-checkout-button.js +5 -5
  10. package/lib/checkout-button/afterpay-checkout-button.js.map +1 -1
  11. package/lib/checkout-button/checkout-button.d.ts +4 -4
  12. package/lib/checkout-button/checkout-button.js +10 -10
  13. package/lib/checkout-button/checkout-button.js.map +1 -1
  14. package/lib/checkout-button/runner.js +3 -0
  15. package/lib/checkout-button/runner.js.map +1 -1
  16. package/lib/checkout-button/zipmoney.runner.js +5 -1
  17. package/lib/checkout-button/zipmoney.runner.js.map +1 -1
  18. package/lib/components/dispatcher.js +3 -0
  19. package/lib/components/dispatcher.js.map +1 -1
  20. package/lib/components/env.d.ts +3 -0
  21. package/lib/components/env.js +3 -0
  22. package/lib/components/env.js.map +1 -1
  23. package/lib/components/http-core.d.ts +2 -2
  24. package/lib/components/http-core.js +8 -4
  25. package/lib/components/http-core.js.map +1 -1
  26. package/lib/components/link.js +3 -0
  27. package/lib/components/link.js.map +1 -1
  28. package/lib/components/param.d.ts +3 -0
  29. package/lib/components/param.js.map +1 -1
  30. package/lib/external-checkout/checker.d.ts +1 -1
  31. package/lib/external-checkout/checker.js +2 -2
  32. package/lib/external-checkout/checker.js.map +1 -1
  33. package/lib/helper/access-token.d.ts +5 -0
  34. package/lib/helper/access-token.js +9 -0
  35. package/lib/helper/access-token.js.map +1 -1
  36. package/lib/payment-source/builder.d.ts +1 -1
  37. package/lib/payment-source/builder.js +2 -2
  38. package/lib/payment-source/builder.js.map +1 -1
  39. package/lib/payment-source-widget/payment-source-widget.d.ts +1 -1
  40. package/lib/payment-source-widget/payment-source-widget.js +3 -2
  41. package/lib/payment-source-widget/payment-source-widget.js.map +1 -1
  42. package/lib/wallet-buttons/flypay.wallet-service.js +2 -2
  43. package/lib/wallet-buttons/flypay.wallet-service.js.map +1 -1
  44. package/lib/wallet-buttons/google.wallet-service.js +2 -3
  45. package/lib/wallet-buttons/google.wallet-service.js.map +1 -1
  46. package/lib/wallet-buttons/mastercard.wallet-service.d.ts +1 -0
  47. package/lib/wallet-buttons/mastercard.wallet-service.js +4 -0
  48. package/lib/wallet-buttons/mastercard.wallet-service.js.map +1 -1
  49. package/lib/wallet-buttons/wallet-buttons.js +2 -2
  50. package/lib/wallet-buttons/wallet-buttons.js.map +1 -1
  51. package/lib/wallet-buttons/wallet-service.d.ts +1 -0
  52. package/lib/wallet-buttons/wallet-service.js.map +1 -1
  53. package/lib/widget/configuration.d.ts +3 -3
  54. package/lib/widget/configuration.js +11 -7
  55. package/lib/widget/configuration.js.map +1 -1
  56. package/lib/widget/multi-widget.d.ts +10 -10
  57. package/lib/widget/multi-widget.js +15 -9
  58. package/lib/widget/multi-widget.js.map +1 -1
  59. package/package.json +1 -1
  60. package/slate.md +1 -1
package/README.md CHANGED
@@ -8,7 +8,7 @@ The SDK supports methods for customization of widget by your needs (styling, for
8
8
 
9
9
  ## Other information
10
10
 
11
- To work with the widget you will need public_key ([see Authentication](https://docs.paydock.com/#authentication))
11
+ To work with the widget you will need public_key or access_token ([see Authentication](https://docs.paydock.com/#authentication))
12
12
 
13
13
  Also you will need added gateway ([see API Reference by gateway](https://docs.paydock.com/#gateways))
14
14
 
@@ -1901,7 +1901,7 @@ Class Configuration include methods for creating configuration token
1901
1901
  * [.setMeta(object)](#w_Configuration+setMeta)
1902
1902
  * [.setEnv(env, [alias])](#w_Configuration+setEnv)
1903
1903
  * [.setLabel(label)](#w_Configuration+setLabel)
1904
- * [.createToken(publicKey, cb, errorCb)](#w_Configuration+createToken)
1904
+ * [.createToken(accessToken, cb, errorCb)](#w_Configuration+createToken)
1905
1905
 
1906
1906
  <a name="w_new_Configuration_new" id="w_new_Configuration_new"></a>
1907
1907
 
@@ -2041,14 +2041,14 @@ config.setLabel('custom label');
2041
2041
  ```
2042
2042
  <a name="w_Configuration+createToken" id="w_Configuration+createToken"></a>
2043
2043
 
2044
- ### configuration.createToken(publicKey, cb, errorCb)
2044
+ ### configuration.createToken(accessToken, cb, errorCb)
2045
2045
  createToken - method which exactly create payment one time token
2046
2046
 
2047
2047
  **Kind**: instance method of [<code>Configuration</code>](#w_Configuration)
2048
2048
 
2049
2049
  | Param | Type | Description |
2050
2050
  | --- | --- | --- |
2051
- | publicKey | <code>string</code> | Customer public key which provided for each client |
2051
+ | accessToken | <code>string</code> | Customer access token or public key which provided for each client |
2052
2052
  | cb | <code>createToken~requestCallback</code> | The callback that handles the success response. |
2053
2053
  | errorCb | <code>createToken~requestCallback</code> | The callback that handles the failed response. |
2054
2054
 
@@ -2070,7 +2070,7 @@ Class MultiWidget include method for for creating iframe url
2070
2070
  **Kind**: global class
2071
2071
 
2072
2072
  * [MultiWidget](#w_MultiWidget)
2073
- * [new exports.MultiWidget(publicKey, conf)](#w_new_MultiWidget_new)
2073
+ * [new exports.MultiWidget(accessToken, conf)](#w_new_MultiWidget_new)
2074
2074
  * [.setStyles(fields)](#w_MultiWidget+setStyles)
2075
2075
  * [.usePhoneCountryMask([options])](#w_MultiWidget+usePhoneCountryMask)
2076
2076
  * [.setTexts(fields)](#w_MultiWidget+setTexts)
@@ -2090,23 +2090,23 @@ Class MultiWidget include method for for creating iframe url
2090
2090
 
2091
2091
  <a name="w_new_MultiWidget_new" id="w_new_MultiWidget_new"></a>
2092
2092
 
2093
- ### new exports.MultiWidget(publicKey, conf)
2093
+ ### new exports.MultiWidget(accessToken, conf)
2094
2094
 
2095
2095
  | Param | Type | Description |
2096
2096
  | --- | --- | --- |
2097
- | publicKey | <code>string</code> | PayDock users public key |
2097
+ | accessToken | <code>string</code> | PayDock users access token or public key |
2098
2098
  | conf | [<code>Configuration</code>](#w_Configuration) \| <code>string</code> \| [<code>Array.&lt;Configuration&gt;</code>](#w_Configuration) \| <code>Array.&lt;string&gt;</code> | exemplar[s] Configuration class OR configuration token |
2099
2099
 
2100
2100
  **Example**
2101
2101
 
2102
2102
  ```javascript
2103
- var widget = new MultiWidget('publicKey','configurationToken'); // With a pre-created configuration token
2103
+ var widget = new MultiWidget('accessToken','configurationToken'); // With a pre-created configuration token
2104
2104
 
2105
- var widget = new MultiWidget('publicKey',['configurationToken', 'configurationToken2']); // With pre-created configuration tokens
2105
+ var widget = new MultiWidget('accessToken',['configurationToken', 'configurationToken2']); // With pre-created configuration tokens
2106
2106
 
2107
- var widget = new MultiWidget('publicKey', new Configuration('gatewayId')); With Configuration
2107
+ var widget = new MultiWidget('accessToken', new Configuration('gatewayId')); With Configuration
2108
2108
 
2109
- var widget = new MultiWidget('publicKey',[ With Configurations
2109
+ var widget = new MultiWidget('accessToken',[ With Configurations
2110
2110
  Configuration('gatewayId'),
2111
2111
  Configuration('gatewayId', 'bank_account')
2112
2112
  ]);
@@ -3740,7 +3740,7 @@ Class CheckoutButton transform usual button into checkout
3740
3740
  **Kind**: global class
3741
3741
 
3742
3742
  * [CheckoutButton](#cb_CheckoutButton)
3743
- * [new exports.CheckoutButton(selector, publicKey, [gatewayId], [type])](#cb_new_CheckoutButton_new)
3743
+ * [new exports.CheckoutButton(selector, aceessToken, [gatewayId], [type])](#cb_new_CheckoutButton_new)
3744
3744
  * [.on(eventName, cb)](#cb_CheckoutButton+on)
3745
3745
  * [.close()](#cb_CheckoutButton+close)
3746
3746
  * [.onFinishInsert(selector, dataType)](#cb_CheckoutButton+onFinishInsert)
@@ -3752,19 +3752,19 @@ Class CheckoutButton transform usual button into checkout
3752
3752
 
3753
3753
  <a name="cb_new_CheckoutButton_new" id="cb_new_CheckoutButton_new"></a>
3754
3754
 
3755
- ### new exports.CheckoutButton(selector, publicKey, [gatewayId], [type])
3755
+ ### new exports.CheckoutButton(selector, aceessToken, [gatewayId], [type])
3756
3756
 
3757
3757
  | Param | Type | Default | Description |
3758
3758
  | --- | --- | --- | --- |
3759
3759
  | selector | <code>string</code> | | Selector of html element. |
3760
- | publicKey | <code>string</code> | | PayDock users public key |
3760
+ | aceessToken | <code>string</code> | | PayDock access token or users public key |
3761
3761
  | [gatewayId] | <code>string</code> | <code>&quot;default&quot;</code> | PayDock's gatewayId. By default or if put 'default', it will use the selected default gateway |
3762
3762
  | [type] | <code>string</code> | <code>&quot;PaypalClassic&quot;</code> | Type of gateway (PaypalClassic, Zipmoney) |
3763
3763
 
3764
3764
  **Example**
3765
3765
 
3766
3766
  ```javascript
3767
- var widget = new CheckoutButton('#button', 'publicKey','gatewayId');
3767
+ var widget = new CheckoutButton('#button', 'aceessToken','gatewayId');
3768
3768
  ```
3769
3769
  <a name="cb_CheckoutButton+on" id="cb_CheckoutButton+on"></a>
3770
3770
 
@@ -4181,7 +4181,7 @@ Class AfterpayCheckoutButton is wrapper of CheckoutButton transform usual button
4181
4181
  **Extends**: [<code>CheckoutButton</code>](#cb_CheckoutButton)
4182
4182
 
4183
4183
  * [AfterpayCheckoutButton](#cb_AfterpayCheckoutButton) ⇐ [<code>CheckoutButton</code>](#cb_CheckoutButton)
4184
- * [new exports.AfterpayCheckoutButton(selector, publicKey, [gatewayId])](#cb_new_AfterpayCheckoutButton_new)
4184
+ * [new exports.AfterpayCheckoutButton(selector, accessToken, [gatewayId])](#cb_new_AfterpayCheckoutButton_new)
4185
4185
  * [.on(eventName, cb)](#cb_CheckoutButton+on)
4186
4186
  * [.close()](#cb_CheckoutButton+close)
4187
4187
  * [.onFinishInsert(selector, dataType)](#cb_CheckoutButton+onFinishInsert)
@@ -4193,18 +4193,18 @@ Class AfterpayCheckoutButton is wrapper of CheckoutButton transform usual button
4193
4193
 
4194
4194
  <a name="cb_new_AfterpayCheckoutButton_new" id="cb_new_AfterpayCheckoutButton_new"></a>
4195
4195
 
4196
- ### new exports.AfterpayCheckoutButton(selector, publicKey, [gatewayId])
4196
+ ### new exports.AfterpayCheckoutButton(selector, accessToken, [gatewayId])
4197
4197
 
4198
4198
  | Param | Type | Default | Description |
4199
4199
  | --- | --- | --- | --- |
4200
4200
  | selector | <code>string</code> | | Selector of html element. |
4201
- | publicKey | <code>string</code> | | PayDock users public key |
4201
+ | accessToken | <code>string</code> | | PayDock access-token or users public key |
4202
4202
  | [gatewayId] | <code>string</code> | <code>&quot;default&quot;</code> | PayDock's gatewayId. By default or if put 'default', it will use the selected default gateway |
4203
4203
 
4204
4204
  **Example**
4205
4205
 
4206
4206
  ```javascript
4207
- var widget = new AfterpayCheckoutButton('#button', 'publicKey','gatewayId');
4207
+ var widget = new AfterpayCheckoutButton('#button', 'access-token','gatewayId');
4208
4208
  ```
4209
4209
  <a name="cb_CheckoutButton+on" id="cb_CheckoutButton+on"></a>
4210
4210