@paydock/client-sdk 1.10.72-beta → 1.10.73-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.
Files changed (28) hide show
  1. package/README.md +53 -13
  2. package/bundles/widget.umd.js +412 -61
  3. package/bundles/widget.umd.min.js +1 -1
  4. package/lib/components/param.d.ts +19 -3
  5. package/lib/components/param.js +2 -0
  6. package/lib/components/param.js.map +1 -1
  7. package/lib/wallet-buttons/apple.wallet-service.d.ts +13 -1
  8. package/lib/wallet-buttons/apple.wallet-service.js +67 -41
  9. package/lib/wallet-buttons/apple.wallet-service.js.map +1 -1
  10. package/lib/wallet-buttons/flypay.wallet-service.js +1 -4
  11. package/lib/wallet-buttons/flypay.wallet-service.js.map +1 -1
  12. package/lib/wallet-buttons/google.wallet-service.d.ts +29 -0
  13. package/lib/wallet-buttons/google.wallet-service.js +240 -0
  14. package/lib/wallet-buttons/google.wallet-service.js.map +1 -0
  15. package/lib/wallet-buttons/interfaces.d.ts +4 -1
  16. package/lib/wallet-buttons/mastercard.wallet-service.js +7 -1
  17. package/lib/wallet-buttons/mastercard.wallet-service.js.map +1 -1
  18. package/lib/wallet-buttons/paypal.wallet-service.js +3 -3
  19. package/lib/wallet-buttons/paypal.wallet-service.js.map +1 -1
  20. package/lib/wallet-buttons/stripe.wallet-service.d.ts +1 -0
  21. package/lib/wallet-buttons/stripe.wallet-service.js +9 -3
  22. package/lib/wallet-buttons/stripe.wallet-service.js.map +1 -1
  23. package/lib/wallet-buttons/wallet-buttons.d.ts +44 -13
  24. package/lib/wallet-buttons/wallet-buttons.js +37 -12
  25. package/lib/wallet-buttons/wallet-buttons.js.map +1 -1
  26. package/lib/wallet-buttons/wallet-service.d.ts +2 -1
  27. package/lib/wallet-buttons/wallet-service.js.map +1 -1
  28. package/package.json +2 -1
package/README.md CHANGED
@@ -4858,8 +4858,14 @@ The final method to beginning, the load process of widget to html
4858
4858
  <dt><a href="#IWalletMeta">IWalletMeta</a> : <code>object</code></dt>
4859
4859
  <dd><p>Interface of data used by the wallet checkout and payment proccess.</p>
4860
4860
  </dd>
4861
- <dt><a href="#IShippingOption">IShippingOption</a> : <code>object</code></dt>
4862
- <dd><p>Interface of Shipping Options.</p>
4861
+ <dt><a href="#IApplePayShippingOption">IApplePayShippingOption</a> : <code>object</code></dt>
4862
+ <dd><p>Interface of Shipping Options for ApplePay</p>
4863
+ </dd>
4864
+ <dt><a href="#IGooglePayShippingOption">IGooglePayShippingOption</a> : <code>object</code></dt>
4865
+ <dd><p>Interface of Shipping Options for GooglePay</p>
4866
+ </dd>
4867
+ <dt><a href="#IPayPalShippingOption">IPayPalShippingOption</a> : <code>object</code></dt>
4868
+ <dd><p>Interface of Shipping Options for PayPal</p>
4863
4869
  </dd>
4864
4870
  </dl>
4865
4871
 
@@ -4872,23 +4878,24 @@ Interface of data used by the wallet checkout and payment proccess.
4872
4878
 
4873
4879
  | Param | Type | Description |
4874
4880
  | --- | --- | --- |
4875
- | [amount_label] | <code>string</code> | Label shown next to the total amount to be paid. Required for [Stripe, ApplePay]. N/A for [FlyPay, PayPal]. |
4876
- | [country] | <code>string</code> | Country of the user. 2 letter ISO code format. Required for [Stripe, ApplePay]. N/A for [FlyPay, PayPal]. |
4881
+ | [amount_label] | <code>string</code> | Label shown next to the total amount to be paid. Required for [Stripe, ApplePay, GooglePay]. N/A for [FlyPay, PayPal]. |
4882
+ | [country] | <code>string</code> | Country of the user. 2 letter ISO code format. Required for [Stripe, ApplePay, GooglePay]. N/A for [FlyPay, PayPal]. |
4877
4883
  | [pay_later] | <code>string</code> | Used to enable Pay Later feature in PayPal Smart Checkout WalletButton integration when available. Optional for [PayPal]. N/A for other wallets. |
4878
4884
  | [request_payer_name] | <code>boolean</code> | Used mainly for fraud purposes - recommended set to true. Optional for [Stripe]. N/A for other wallets. |
4879
4885
  | [request_payer_email] | <code>boolean</code> | Used mainly for fraud purposes - recommended set to true. Optional for [Stripe]. N/A for other wallets. |
4880
4886
  | [request_payer_phone] | <code>boolean</code> | Used mainly for fraud purposes - recommended set to true. Optional for [Stripe]. N/A for other wallets. |
4881
- | [request_shipping] | <code>boolean</code> | Used to request or not shipping address in the Wallet checkout, being able to handle amount changes via the `update` event. Optional for [FlyPay, PayPal, ApplePay]. N/A for [Stripe]. |
4882
- | [shipping_options] | [<code>[ &#x27;Array&#x27; ].&lt;IShippingOption&gt;</code>](#IShippingOption) | Used to provide available shipping options. Optional for [ApplePay]. N/A for the other wallets. |
4887
+ | [request_shipping] | <code>boolean</code> | Used to request or not shipping address in the Wallet checkout, being able to handle amount changes via the `update` event. Optional for [FlyPay, PayPal, ApplePay, GooglePay]. N/A for [Stripe]. |
4888
+ | [shipping_options] | [<code>Array.&lt;IApplePayShippingOption&gt;</code>](#IApplePayShippingOption) \| [<code>Array.&lt;IPayPalShippingOption&gt;</code>](#IPayPalShippingOption) | Used to provide available shipping options.(To use shipping_options the request_shipping flag should be true). Optional for [ApplePay]. N/A for the other wallets. |
4889
+ | [merchant_name] | <code>string</code> | Merchant Name used for GooglePay integration via MPGS. Required for [GooglePay]. N/A for other wallets. |
4883
4890
  | [raw_data_initialization] | <code>object</code> | Used to provide values to initialize wallet with raw data. Optional for [ApplePay]. N/A for the other wallets. |
4884
4891
  | [style] | <code>object</code> | Used to style PayPal buttons, check possible values at https://developer.paypal.com/docs/business/checkout/reference/style-guide. Also used at ApplePay to select button type. Optional for [PayPal, ApplePay]. N/A for [Stripe, FlyPay]. |
4885
4892
  | [style.button_type] | <code>object</code> | Used to select ApplePay button type (e.g: 'buy','donate', etc), check possible values at https://developer.apple.com/documentation/apple_pay_on_the_web/displaying_apple_pay_buttons_using_css. Optional for [ApplePay]. N/A for other wallets. |
4886
- | [wallets] | <code>array</code> | By default if this is not sent or empty, we will try to show either Apple Pay or Google Pay buttons. This can be limited sending the following array in this field: ['apple','google]. Optional for [Stripe]. N/A for other wallets. |
4893
+ | [wallets] | <code>array</code> | By default if this is not sent or empty, we will try to show either Apple Pay or Google Pay buttons. This can be limited sending the following array in this field: ['apple','google]. Optional for [Stripe, ApplePay, GooglePay]. N/A for other wallets. |
4887
4894
 
4888
- <a name="IShippingOption" id="IShippingOption"></a>
4895
+ <a name="IApplePayShippingOption" id="IApplePayShippingOption"></a>
4889
4896
 
4890
- ## IShippingOption : <code>object</code>
4891
- Interface of Shipping Options.
4897
+ ## IApplePayShippingOption : <code>object</code>
4898
+ Interface of Shipping Options for ApplePay
4892
4899
 
4893
4900
  **Kind**: global interface
4894
4901
 
@@ -4897,9 +4904,37 @@ Interface of Shipping Options.
4897
4904
  | [id] | <code>string</code> | Identifier of the Shipping Option. Required. |
4898
4905
  | [label] | <code>string</code> | Identifier of the Shipping Option. Required. |
4899
4906
  | [amount] | <code>string</code> | Amount of the Shipping Option. Required. |
4907
+ | [detail] | <code>string</code> | Details of the Shipping Option. Required. |
4908
+ | [type] | <code>string</code> | Type of the Shipping Option. Values can be 'ELECTRONIC', 'GROUND', 'NOT_SHIPPED', 'OVERNIGHT', 'PICKUP', 'PRIORITY', 'SAME_DAY'. Optional. |
4909
+
4910
+ <a name="IGooglePayShippingOption" id="IGooglePayShippingOption"></a>
4911
+
4912
+ ## IGooglePayShippingOption : <code>object</code>
4913
+ Interface of Shipping Options for GooglePay
4914
+
4915
+ **Kind**: global interface
4916
+
4917
+ | Param | Type | Description |
4918
+ | --- | --- | --- |
4919
+ | [id] | <code>string</code> | Identifier of the Shipping Option. Required. |
4920
+ | [label] | <code>string</code> | Identifier of the Shipping Option. Required. |
4900
4921
  | [detail] | <code>string</code> | Details of the Shipping Option. Optional. |
4901
- | [currency] | <code>string</code> | Currency of the Shipping Option. Optional. |
4902
- | [type] | <code>string</code> | Type of the Shipping Option. Optional. |
4922
+ | [type] | <code>string</code> | Type of the Shipping Option. Values can be 'ELECTRONIC', 'GROUND', 'NOT_SHIPPED', 'OVERNIGHT', 'PICKUP', 'PRIORITY', 'SAME_DAY'. Optional. |
4923
+
4924
+ <a name="IPayPalShippingOption" id="IPayPalShippingOption"></a>
4925
+
4926
+ ## IPayPalShippingOption : <code>object</code>
4927
+ Interface of Shipping Options for PayPal
4928
+
4929
+ **Kind**: global interface
4930
+
4931
+ | Param | Type | Description |
4932
+ | --- | --- | --- |
4933
+ | [id] | <code>string</code> | Identifier of the Shipping Option. Required. |
4934
+ | [label] | <code>string</code> | Identifier of the Shipping Option. Required. |
4935
+ | [amount] | <code>string</code> | Amount of the Shipping Option. Required. |
4936
+ | [currency] | <code>string</code> | Currency of the Shipping Option. Required. |
4937
+ | [type] | <code>string</code> | Type of the Shipping Option. Values can be 'SHIPPING' or 'PICKUP'. Required. |
4903
4938
 
4904
4939
  <a name="WalletButtons" id="WalletButtons"></a>
4905
4940
 
@@ -4958,7 +4993,7 @@ var button = new WalletButtons(
4958
4993
 
4959
4994
  ### walletButtons.update()
4960
4995
  Triggers the update process of the wallet, if available.
4961
- Currently supported by Flypay, Paypal and ApplePay via MPGS Wallets.
4996
+ Currently supported by Flypay, Paypal and ApplePay/GooglePay via MPGS Wallets.
4962
4997
 
4963
4998
  **Kind**: instance method of [<code>WalletButtons</code>](#WalletButtons)
4964
4999
  **Example**
@@ -5069,6 +5104,7 @@ button.on('unavailable').then(function () {
5069
5104
 
5070
5105
  ### walletButtons.onUnavailable([handler])
5071
5106
  User to subscribe to the no button available event. This method is used after loading when the button is not available.
5107
+ For MPGS, since can have more than one wallet button configured (ApplePay/GooglePay) you will receive a body (({ wallet: WALLET_TYPE.GOOGLE }) or ({ wallet: WALLET_TYPE.APPLE })) indicating which button is unavailable
5072
5108
  Important: Do not perform thread blocking operations in callback such as window.alert() calls.
5073
5109
 
5074
5110
  **Kind**: instance method of [<code>WalletButtons</code>](#WalletButtons)
@@ -5087,6 +5123,10 @@ button.onUnavailable(() => {
5087
5123
  ```js
5088
5124
  button.onUnavailable().then(() => console.log('No wallet buttons available'));
5089
5125
  ```
5126
+ **Example**
5127
+ ```js
5128
+ button.onUnavailable(function (data) {console.log('data.wallet :: ', data.wallet)});
5129
+ ```
5090
5130
  <a name="WalletButtons+onUpdate" id="WalletButtons+onUpdate"></a>
5091
5131
 
5092
5132
  ### walletButtons.onUpdate([handler])