@paydock/client-sdk 1.10.72-beta → 1.10.76-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 +90 -17
- package/bundles/widget.umd.js +414 -61
- package/bundles/widget.umd.min.js +1 -1
- package/lib/components/param.d.ts +20 -3
- package/lib/components/param.js +2 -0
- package/lib/components/param.js.map +1 -1
- package/lib/wallet-buttons/apple.wallet-service.d.ts +13 -1
- package/lib/wallet-buttons/apple.wallet-service.js +67 -41
- package/lib/wallet-buttons/apple.wallet-service.js.map +1 -1
- package/lib/wallet-buttons/flypay.wallet-service.js +1 -4
- package/lib/wallet-buttons/flypay.wallet-service.js.map +1 -1
- package/lib/wallet-buttons/google.wallet-service.d.ts +29 -0
- package/lib/wallet-buttons/google.wallet-service.js +241 -0
- package/lib/wallet-buttons/google.wallet-service.js.map +1 -0
- package/lib/wallet-buttons/interfaces.d.ts +4 -1
- package/lib/wallet-buttons/mastercard.wallet-service.js +7 -1
- package/lib/wallet-buttons/mastercard.wallet-service.js.map +1 -1
- package/lib/wallet-buttons/paypal.wallet-service.js +3 -3
- package/lib/wallet-buttons/paypal.wallet-service.js.map +1 -1
- package/lib/wallet-buttons/stripe.wallet-service.d.ts +1 -0
- package/lib/wallet-buttons/stripe.wallet-service.js +9 -3
- package/lib/wallet-buttons/stripe.wallet-service.js.map +1 -1
- package/lib/wallet-buttons/wallet-buttons.d.ts +45 -13
- package/lib/wallet-buttons/wallet-buttons.js +38 -12
- package/lib/wallet-buttons/wallet-buttons.js.map +1 -1
- package/lib/wallet-buttons/wallet-service.d.ts +2 -1
- package/lib/wallet-buttons/wallet-service.js.map +1 -1
- package/package.json +2 -1
- package/slate.md +36 -4
package/README.md
CHANGED
|
@@ -4603,10 +4603,42 @@ After you initialized the 3ds charge via `v1/charges/standalone-3ds` API endpoin
|
|
|
4603
4603
|
</html>
|
|
4604
4604
|
```
|
|
4605
4605
|
|
|
4606
|
-
|
|
4607
|
-
|
|
4608
|
-
|
|
4609
|
-
|
|
4606
|
+
The chargeAuthSuccess event is executed both for frictionless flow, or for challenge flow after the customer has correctly authenticated with the bank using whatever challenge imposed.
|
|
4607
|
+
The chargeAuthChallenge event is sent before starting a challenge flow (i.e. opening an IFrame for the customer to complete a challenge with ther bank)
|
|
4608
|
+
The chargeAuthDecoupled event is sent when the flow is a decoupled challenge, alongside a `data.result.description` field that you must show to the customer, indicating the method the user must use to authenticate. For example this may happen by having the cardholder authenticating directly with their banking app through biometrics. Once the end customer does this, the Canvas3ds will be able to recognize the challenge result is ready and will either produce a chargeAuthSuccess or chargeAuthReject event
|
|
4609
|
+
The error event is sent if an unexpected issue with the client library occurs. In such scenarios, you should consider the autentication process as interrupted
|
|
4610
|
+
|
|
4611
|
+
### Event and Values
|
|
4612
|
+
|
|
4613
|
+
| Event Value | Type | Description |
|
|
4614
|
+
| ------------------- | ------------------- | -------------------------------------------------------------- |
|
|
4615
|
+
| chargeAuthSuccess | <code>object</code> | Instance of [ChargeEventResponse](#cb_chargeEventResponse) |
|
|
4616
|
+
| chargeAuthReject | <code>object</code> | Instance of [ChargeEventResponse](#cb_chargeEventResponse) |
|
|
4617
|
+
| chargeAuthChallenge | <code>object</code> | Instance of [ChargeEventResponse](#cb_chargeEventResponse) |
|
|
4618
|
+
| chargeAuthDecoupled | <code>object</code> | Instance of [ChargeEventResponse](#cb_chargeEventResponse) |
|
|
4619
|
+
| error | <code>object</code> | Instance of [chargeError](#cb_chargeError) |
|
|
4620
|
+
|
|
4621
|
+
## Response Values
|
|
4622
|
+
|
|
4623
|
+
<a name="cb_chargeEventResponse" id="cb_chargeEventResponse"></a>
|
|
4624
|
+
|
|
4625
|
+
### ChargeEventResponse
|
|
4626
|
+
|
|
4627
|
+
| Param | Type | Description |
|
|
4628
|
+
| ------------------------------- | ------------------------------ | -------------------------------------------------------------------------------------------------- |
|
|
4629
|
+
| status | <code>string</code> | status for the event transaction |
|
|
4630
|
+
| charge_3ds_id | <code>string</code> | Universal unique transaction identifier to identify the transaction |
|
|
4631
|
+
| <code>result.description</code> | <code>string</code> [Optional] | field that you must show to the customer, indicating the method the user must use to authenticate. |
|
|
4632
|
+
|
|
4633
|
+
### ChargeError
|
|
4634
|
+
|
|
4635
|
+
<a name="cb_chargeError" id="cb_chargeError"></a>
|
|
4636
|
+
|
|
4637
|
+
| Param | Type | Description |
|
|
4638
|
+
| ------------- | ------------------- | ------------------------------------------------------------------- |
|
|
4639
|
+
| error | <code>object</code> | error response |
|
|
4640
|
+
| charge_3ds_id | <code>string</code> | Universal unique transaction identifier to identify the transaction |
|
|
4641
|
+
|
|
4610
4642
|
|
|
4611
4643
|
## Vault Display Widget
|
|
4612
4644
|
You can find description of all methods and parameters [here](https://www.npmjs.com/package/@paydock/client-sdk#vault-display-widget)
|
|
@@ -4858,8 +4890,14 @@ The final method to beginning, the load process of widget to html
|
|
|
4858
4890
|
<dt><a href="#IWalletMeta">IWalletMeta</a> : <code>object</code></dt>
|
|
4859
4891
|
<dd><p>Interface of data used by the wallet checkout and payment proccess.</p>
|
|
4860
4892
|
</dd>
|
|
4861
|
-
<dt><a href="#
|
|
4862
|
-
<dd><p>Interface of Shipping Options
|
|
4893
|
+
<dt><a href="#IApplePayShippingOption">IApplePayShippingOption</a> : <code>object</code></dt>
|
|
4894
|
+
<dd><p>Interface of Shipping Options for ApplePay</p>
|
|
4895
|
+
</dd>
|
|
4896
|
+
<dt><a href="#IGooglePayShippingOption">IGooglePayShippingOption</a> : <code>object</code></dt>
|
|
4897
|
+
<dd><p>Interface of Shipping Options for GooglePay</p>
|
|
4898
|
+
</dd>
|
|
4899
|
+
<dt><a href="#IPayPalShippingOption">IPayPalShippingOption</a> : <code>object</code></dt>
|
|
4900
|
+
<dd><p>Interface of Shipping Options for PayPal</p>
|
|
4863
4901
|
</dd>
|
|
4864
4902
|
</dl>
|
|
4865
4903
|
|
|
@@ -4872,23 +4910,25 @@ Interface of data used by the wallet checkout and payment proccess.
|
|
|
4872
4910
|
|
|
4873
4911
|
| Param | Type | Description |
|
|
4874
4912
|
| --- | --- | --- |
|
|
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]. |
|
|
4913
|
+
| [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]. |
|
|
4914
|
+
| [country] | <code>string</code> | Country of the user. 2 letter ISO code format. Required for [Stripe, ApplePay, GooglePay]. N/A for [FlyPay, PayPal]. |
|
|
4877
4915
|
| [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. |
|
|
4916
|
+
| [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. |
|
|
4878
4917
|
| [request_payer_name] | <code>boolean</code> | Used mainly for fraud purposes - recommended set to true. Optional for [Stripe]. N/A for other wallets. |
|
|
4879
4918
|
| [request_payer_email] | <code>boolean</code> | Used mainly for fraud purposes - recommended set to true. Optional for [Stripe]. N/A for other wallets. |
|
|
4880
4919
|
| [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>
|
|
4920
|
+
| [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]. |
|
|
4921
|
+
| [shipping_options] | [<code>Array.<IApplePayShippingOption></code>](#IApplePayShippingOption) \| [<code>Array.<IPayPalShippingOption></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. |
|
|
4922
|
+
| [merchant_name] | <code>string</code> | Merchant Name used for GooglePay integration via MPGS. Required for [GooglePay]. N/A for other wallets. |
|
|
4883
4923
|
| [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
4924
|
| [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
4925
|
| [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. |
|
|
4926
|
+
| [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
4927
|
|
|
4888
|
-
<a name="
|
|
4928
|
+
<a name="IApplePayShippingOption" id="IApplePayShippingOption"></a>
|
|
4889
4929
|
|
|
4890
|
-
##
|
|
4891
|
-
Interface of Shipping Options
|
|
4930
|
+
## IApplePayShippingOption : <code>object</code>
|
|
4931
|
+
Interface of Shipping Options for ApplePay
|
|
4892
4932
|
|
|
4893
4933
|
**Kind**: global interface
|
|
4894
4934
|
|
|
@@ -4897,9 +4937,37 @@ Interface of Shipping Options.
|
|
|
4897
4937
|
| [id] | <code>string</code> | Identifier of the Shipping Option. Required. |
|
|
4898
4938
|
| [label] | <code>string</code> | Identifier of the Shipping Option. Required. |
|
|
4899
4939
|
| [amount] | <code>string</code> | Amount of the Shipping Option. Required. |
|
|
4940
|
+
| [detail] | <code>string</code> | Details of the Shipping Option. Required. |
|
|
4941
|
+
| [type] | <code>string</code> | Type of the Shipping Option. Values can be 'ELECTRONIC', 'GROUND', 'NOT_SHIPPED', 'OVERNIGHT', 'PICKUP', 'PRIORITY', 'SAME_DAY'. Optional. |
|
|
4942
|
+
|
|
4943
|
+
<a name="IGooglePayShippingOption" id="IGooglePayShippingOption"></a>
|
|
4944
|
+
|
|
4945
|
+
## IGooglePayShippingOption : <code>object</code>
|
|
4946
|
+
Interface of Shipping Options for GooglePay
|
|
4947
|
+
|
|
4948
|
+
**Kind**: global interface
|
|
4949
|
+
|
|
4950
|
+
| Param | Type | Description |
|
|
4951
|
+
| --- | --- | --- |
|
|
4952
|
+
| [id] | <code>string</code> | Identifier of the Shipping Option. Required. |
|
|
4953
|
+
| [label] | <code>string</code> | Identifier of the Shipping Option. Required. |
|
|
4900
4954
|
| [detail] | <code>string</code> | Details of the Shipping Option. Optional. |
|
|
4901
|
-
| [
|
|
4902
|
-
|
|
4955
|
+
| [type] | <code>string</code> | Type of the Shipping Option. Values can be 'ELECTRONIC', 'GROUND', 'NOT_SHIPPED', 'OVERNIGHT', 'PICKUP', 'PRIORITY', 'SAME_DAY'. Optional. |
|
|
4956
|
+
|
|
4957
|
+
<a name="IPayPalShippingOption" id="IPayPalShippingOption"></a>
|
|
4958
|
+
|
|
4959
|
+
## IPayPalShippingOption : <code>object</code>
|
|
4960
|
+
Interface of Shipping Options for PayPal
|
|
4961
|
+
|
|
4962
|
+
**Kind**: global interface
|
|
4963
|
+
|
|
4964
|
+
| Param | Type | Description |
|
|
4965
|
+
| --- | --- | --- |
|
|
4966
|
+
| [id] | <code>string</code> | Identifier of the Shipping Option. Required. |
|
|
4967
|
+
| [label] | <code>string</code> | Identifier of the Shipping Option. Required. |
|
|
4968
|
+
| [amount] | <code>string</code> | Amount of the Shipping Option. Required. |
|
|
4969
|
+
| [currency] | <code>string</code> | Currency of the Shipping Option. Required. |
|
|
4970
|
+
| [type] | <code>string</code> | Type of the Shipping Option. Values can be 'SHIPPING' or 'PICKUP'. Required. |
|
|
4903
4971
|
|
|
4904
4972
|
<a name="WalletButtons" id="WalletButtons"></a>
|
|
4905
4973
|
|
|
@@ -4958,7 +5026,7 @@ var button = new WalletButtons(
|
|
|
4958
5026
|
|
|
4959
5027
|
### walletButtons.update()
|
|
4960
5028
|
Triggers the update process of the wallet, if available.
|
|
4961
|
-
Currently supported by Flypay, Paypal and ApplePay via MPGS Wallets.
|
|
5029
|
+
Currently supported by Flypay, Paypal and ApplePay/GooglePay via MPGS Wallets.
|
|
4962
5030
|
|
|
4963
5031
|
**Kind**: instance method of [<code>WalletButtons</code>](#WalletButtons)
|
|
4964
5032
|
**Example**
|
|
@@ -5069,6 +5137,7 @@ button.on('unavailable').then(function () {
|
|
|
5069
5137
|
|
|
5070
5138
|
### walletButtons.onUnavailable([handler])
|
|
5071
5139
|
User to subscribe to the no button available event. This method is used after loading when the button is not available.
|
|
5140
|
+
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
5141
|
Important: Do not perform thread blocking operations in callback such as window.alert() calls.
|
|
5073
5142
|
|
|
5074
5143
|
**Kind**: instance method of [<code>WalletButtons</code>](#WalletButtons)
|
|
@@ -5087,6 +5156,10 @@ button.onUnavailable(() => {
|
|
|
5087
5156
|
```js
|
|
5088
5157
|
button.onUnavailable().then(() => console.log('No wallet buttons available'));
|
|
5089
5158
|
```
|
|
5159
|
+
**Example**
|
|
5160
|
+
```js
|
|
5161
|
+
button.onUnavailable(function (data) {console.log('data.wallet :: ', data.wallet)});
|
|
5162
|
+
```
|
|
5090
5163
|
<a name="WalletButtons+onUpdate" id="WalletButtons+onUpdate"></a>
|
|
5091
5164
|
|
|
5092
5165
|
### walletButtons.onUpdate([handler])
|