@paydock/client-sdk 1.121.0 → 1.122.2-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 +283 -1
- package/bundles/index.cjs +2067 -93
- package/bundles/index.cjs.d.ts +349 -6
- package/bundles/index.mjs +2067 -93
- package/bundles/index.mjs.d.ts +349 -6
- package/bundles/types/checkout/checkout.d.ts +2 -0
- package/bundles/types/checkout/checkout.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.map +1 -1
- package/bundles/types/checkout/layout-widgets/payment-template.d.ts +1 -1
- package/bundles/types/checkout/layout-widgets/payment-template.d.ts.map +1 -1
- package/bundles/types/components/link.d.ts +1 -1
- package/bundles/types/components/link.d.ts.map +1 -1
- package/bundles/types/components/wallet-background.d.ts.map +1 -1
- package/bundles/types/wallet-buttons/wallet-services/afterpay.wallet-service.d.ts.map +1 -1
- package/bundles/types/wallet-buttons/wallet-services/apple.wallet-service.d.ts.map +1 -1
- package/bundles/types/wallet-buttons/wallet-services/flypay-v2.wallet-service.d.ts.map +1 -1
- package/bundles/types/wallet-buttons/wallet-services/paypal.wallet-service.d.ts.map +1 -1
- package/bundles/types/wallet-buttons-express/base.wallet-button-express.d.ts +70 -13
- package/bundles/types/wallet-buttons-express/base.wallet-button-express.d.ts.map +1 -1
- package/bundles/types/wallet-buttons-express/enum/event.enum.d.ts +3 -1
- package/bundles/types/wallet-buttons-express/enum/event.enum.d.ts.map +1 -1
- package/bundles/types/wallet-buttons-express/index.d.ts +109 -1
- package/bundles/types/wallet-buttons-express/index.d.ts.map +1 -1
- package/bundles/types/wallet-buttons-express/interfaces/charge-wallet-token-meta.interface.d.ts +30 -0
- package/bundles/types/wallet-buttons-express/interfaces/charge-wallet-token-meta.interface.d.ts.map +1 -1
- package/bundles/types/wallet-buttons-express/interfaces/on-click-event-data.interface.d.ts +2 -2
- package/bundles/types/wallet-buttons-express/interfaces/on-click-event-data.interface.d.ts.map +1 -1
- package/bundles/types/wallet-buttons-express/interfaces/on-close-event-data.interface.d.ts +2 -2
- package/bundles/types/wallet-buttons-express/interfaces/on-close-event-data.interface.d.ts.map +1 -1
- package/bundles/types/wallet-buttons-express/interfaces/on-error-event-data.interface.d.ts +2 -2
- package/bundles/types/wallet-buttons-express/interfaces/on-error-event-data.interface.d.ts.map +1 -1
- package/bundles/types/wallet-buttons-express/interfaces/on-payment-error-event-data.interface.d.ts +2 -2
- package/bundles/types/wallet-buttons-express/interfaces/on-payment-error-event-data.interface.d.ts.map +1 -1
- package/bundles/types/wallet-buttons-express/interfaces/on-payment-in-review-event-data.interface.d.ts +2 -2
- package/bundles/types/wallet-buttons-express/interfaces/on-payment-in-review-event-data.interface.d.ts.map +1 -1
- package/bundles/types/wallet-buttons-express/interfaces/on-payment-successful-event-data.interface.d.ts +2 -2
- package/bundles/types/wallet-buttons-express/interfaces/on-payment-successful-event-data.interface.d.ts.map +1 -1
- package/bundles/types/wallet-buttons-express/interfaces/on-shipping-address-change-event-data.interface.d.ts +21 -0
- package/bundles/types/wallet-buttons-express/interfaces/on-shipping-address-change-event-data.interface.d.ts.map +1 -0
- package/bundles/types/wallet-buttons-express/interfaces/on-shipping-address-change-event-response.interface.d.ts +9 -0
- package/bundles/types/wallet-buttons-express/interfaces/on-shipping-address-change-event-response.interface.d.ts.map +1 -0
- package/bundles/types/wallet-buttons-express/interfaces/on-shipping-option-change-event-data.interface.d.ts +13 -0
- package/bundles/types/wallet-buttons-express/interfaces/on-shipping-option-change-event-data.interface.d.ts.map +1 -0
- package/bundles/types/wallet-buttons-express/interfaces/on-shipping-option-change-event-response.interface.d.ts +9 -0
- package/bundles/types/wallet-buttons-express/interfaces/on-shipping-option-change-event-response.interface.d.ts.map +1 -0
- package/bundles/types/wallet-buttons-express/interfaces/on-unavailable-event-data.interface.d.ts +2 -2
- package/bundles/types/wallet-buttons-express/interfaces/on-unavailable-event-data.interface.d.ts.map +1 -1
- package/bundles/types/wallet-buttons-express/services/apple-pay/apple-pay.wallet-button-express.d.ts +7 -0
- package/bundles/types/wallet-buttons-express/services/apple-pay/apple-pay.wallet-button-express.d.ts.map +1 -1
- package/bundles/types/wallet-buttons-express/services/apple-pay/constants/apple-pay-events.constant.d.ts +5 -0
- package/bundles/types/wallet-buttons-express/services/apple-pay/constants/apple-pay-events.constant.d.ts.map +1 -0
- package/bundles/types/wallet-buttons-express/services/apple-pay/interfaces/apple-pay-wallet-meta.interface.d.ts +7 -3
- package/bundles/types/wallet-buttons-express/services/apple-pay/interfaces/apple-pay-wallet-meta.interface.d.ts.map +1 -1
- package/bundles/types/wallet-buttons-express/services/apple-pay/types/apple-pay-contact-editing-mode.type.d.ts +5 -0
- package/bundles/types/wallet-buttons-express/services/apple-pay/types/apple-pay-contact-editing-mode.type.d.ts.map +1 -0
- package/bundles/types/wallet-buttons-express/services/apple-pay/types/apple-pay-shipping-data.d.ts +21 -0
- package/bundles/types/wallet-buttons-express/services/apple-pay/types/apple-pay-shipping-data.d.ts.map +1 -0
- package/bundles/types/wallet-buttons-express/services/apple-pay/types/apple-pay-shipping-method.type.d.ts +21 -0
- package/bundles/types/wallet-buttons-express/services/apple-pay/types/apple-pay-shipping-method.type.d.ts.map +1 -0
- package/bundles/types/wallet-buttons-express/services/paypal/interfaces/paypal-sdk.interface.d.ts +164 -0
- package/bundles/types/wallet-buttons-express/services/paypal/interfaces/paypal-sdk.interface.d.ts.map +1 -0
- package/bundles/types/wallet-buttons-express/services/paypal/interfaces/paypal-wallet-meta.interface.d.ts +1 -1
- package/bundles/types/wallet-buttons-express/services/paypal/interfaces/paypal-wallet-meta.interface.d.ts.map +1 -1
- package/bundles/types/wallet-buttons-express/services/paypal/paypal.wallet-button-express.d.ts +9 -3
- package/bundles/types/wallet-buttons-express/services/paypal/paypal.wallet-button-express.d.ts.map +1 -1
- package/bundles/types/wallet-buttons-express/types/shipping-event-to-response.type.d.ts +6 -0
- package/bundles/types/wallet-buttons-express/types/shipping-event-to-response.type.d.ts.map +1 -0
- package/bundles/widget.umd.js +2069 -93
- package/bundles/widget.umd.js.d.ts +349 -6
- package/bundles/widget.umd.js.min.d.ts +349 -6
- package/bundles/widget.umd.min.js +1 -1
- package/docs/wallet-buttons-express.md +283 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6812,6 +6812,9 @@ A full description of the meta parameters for [PaypalWalletButtonExpress](#Paypa
|
|
|
6812
6812
|
<dt><a href="#EVENT">EVENT</a> : <code>object</code></dt>
|
|
6813
6813
|
<dd><p>List of available event's name in the wallet button lifecycle</p>
|
|
6814
6814
|
</dd>
|
|
6815
|
+
<dt><a href="#ContactFieldType">ContactFieldType</a> : <code>object</code></dt>
|
|
6816
|
+
<dd><p>List of available contact fields for ContactFieldType</p>
|
|
6817
|
+
</dd>
|
|
6815
6818
|
</dl>
|
|
6816
6819
|
|
|
6817
6820
|
## Typedefs
|
|
@@ -6832,6 +6835,12 @@ A full description of the meta parameters for [PaypalWalletButtonExpress](#Paypa
|
|
|
6832
6835
|
<dt><a href="#OnCheckoutCloseCallback">OnCheckoutCloseCallback</a> : <code>function</code></dt>
|
|
6833
6836
|
<dd><p>Callback for onCheckoutClose method.</p>
|
|
6834
6837
|
</dd>
|
|
6838
|
+
<dt><a href="#OnShippingAddressChangeCallback">OnShippingAddressChangeCallback</a> ⇒ <code><a href="#OnShippingAddressChangeEventResponse">Promise.<OnShippingAddressChangeEventResponse></a></code></dt>
|
|
6839
|
+
<dd><p>Callback for onShippingAddressChange method.</p>
|
|
6840
|
+
</dd>
|
|
6841
|
+
<dt><a href="#OnShippingOptionsChangeCallback">OnShippingOptionsChangeCallback</a> ⇒ <code><a href="#OnShippingOptionChangeEventResponse">Promise.<OnShippingOptionChangeEventResponse></a></code></dt>
|
|
6842
|
+
<dd><p>Callback for onShippingOptionsChange method.</p>
|
|
6843
|
+
</dd>
|
|
6835
6844
|
<dt><a href="#OnUnavailableCallback">OnUnavailableCallback</a> : <code>function</code></dt>
|
|
6836
6845
|
<dd><p>Callback for onUnavailable method.</p>
|
|
6837
6846
|
</dd>
|
|
@@ -6874,6 +6883,25 @@ For in-depth information, please refer to the <a href="https://developer.paypal.
|
|
|
6874
6883
|
<dt><a href="#OnErrorEventData">OnErrorEventData</a> : <code>object</code></dt>
|
|
6875
6884
|
<dd><p>Interface for OnErrorEventData</p>
|
|
6876
6885
|
</dd>
|
|
6886
|
+
<dt><a href="#OnShippingAddressChangeEventData">OnShippingAddressChangeEventData</a> : <code>object</code></dt>
|
|
6887
|
+
<dd><p>Interface for OnShippingAddressChangeEventData.</p>
|
|
6888
|
+
</dd>
|
|
6889
|
+
<dt><a href="#OnShippingAddressChangeEventResponse">OnShippingAddressChangeEventResponse</a> : <code>object</code></dt>
|
|
6890
|
+
<dd><p>Interface for OnShippingAddressChangeEventResponse.</p>
|
|
6891
|
+
</dd>
|
|
6892
|
+
<dt><a href="#IApplePayShippingOption">IApplePayShippingOption</a> : <code>object</code></dt>
|
|
6893
|
+
<dd><p>Interface for IApplePayShippingOption.
|
|
6894
|
+
Used for adding new shippings options when customer updates the shipping address.</p>
|
|
6895
|
+
</dd>
|
|
6896
|
+
<dt><a href="#OnShippingOptionChangeEventData">OnShippingOptionChangeEventData</a> : <code>object</code></dt>
|
|
6897
|
+
<dd><p>Interface for OnShippingOptionChangeEventData.</p>
|
|
6898
|
+
</dd>
|
|
6899
|
+
<dt><a href="#OnShippingOptionChangeEventResponse">OnShippingOptionChangeEventResponse</a> : <code>object</code></dt>
|
|
6900
|
+
<dd><p>Interface for OnShippingOptionChangeEventResponse.</p>
|
|
6901
|
+
</dd>
|
|
6902
|
+
<dt><a href="#IApplePayError">IApplePayError</a> : <code>object</code></dt>
|
|
6903
|
+
<dd><p>Interface for IApplePayError.</p>
|
|
6904
|
+
</dd>
|
|
6877
6905
|
</dl>
|
|
6878
6906
|
|
|
6879
6907
|
<a name="ApplePayWalletMeta" id="ApplePayWalletMeta" href="#ApplePayWalletMeta"> </a>
|
|
@@ -6895,11 +6923,14 @@ If the determinated value is credentials_status_unknown, the payment possbily sh
|
|
|
6895
6923
|
| [merchant_capabilities] | <code>Array.<('supports3DS'\|'supportsEMV'\|'supportsCredit'\|'supportsDebit')></code> | Array of capabilities that the merchant supports, influencing the transaction processing features available. |
|
|
6896
6924
|
| [supported_networks] | <code>Array.<('visa'\|'masterCard'\|'amex'\|'chinaUnionPay'\|'discover'\|'interac'\|'jcb'\|'privateLabel')></code> | List of payment networks supported by the merchant for ApplePay transactions. |
|
|
6897
6925
|
| [required_billing_contact_fields] | <code>Array.<('email'\|'name'\|'phone'\|'postalAddress')></code> | Contact fields required from the user for billing purposes, improving transaction verification and fraud prevention. Phone and email are currently not returned by Apple. |
|
|
6898
|
-
| [required_shipping_contact_fields] | <code>Array.<('email'\|'phone')></code> | Shipping contact fields that are mandatory to complete the transaction. Use email and phone to collect from customer wallet in the abscense of billing one. |
|
|
6926
|
+
| [required_shipping_contact_fields] | <code>Array.<('email'\|'phone')></code> | Shipping contact fields that are mandatory to complete the transaction. Use email and phone to collect from customer wallet in the abscense of billing one. Required for onShippingAddressChange callback. |
|
|
6899
6927
|
| [supported_countries] | <code>Array.<string></code> | List of countries where ApplePay is supported by the merchant, restricting usage to specified regions. |
|
|
6900
6928
|
| [style] | <code>object</code> | Styling configuration for ApplePay buttons displayed during checkout. |
|
|
6901
6929
|
| [style.button_type] | <code>ApplePayButtonType</code> | Enum type to select the type of ApplePay button (e.g., 'buy', 'donate', etc.), providing user interface customization. |
|
|
6902
6930
|
| [style.button_style] | <code>ApplePayButtonStyle</code> | Style applied to the ApplePay button, which can include color and form factor adjustments according to the brand's visual guidelines. |
|
|
6931
|
+
| [shipping_editing_mode] | <code>'available'</code> \| <code>'store\_pickup'</code> | ApplePay - available for allowing editing shipping, store_pickup for not allowing editing shipping. |
|
|
6932
|
+
| [shipping_data] | <code>object</code> | ApplePay - Preloaded data used for populate shipping address information |
|
|
6933
|
+
| [shipping_data.email_address] | <code>string</code> | ApplePay - The shipping address email |
|
|
6903
6934
|
| [apple_pay_capabilities] | <code>Array.<('credentials\_available'\|'credentials\_status\_unknown'\|'credentials\_unavailable')></code> | Device capabilities needed for wallet button to be available. |
|
|
6904
6935
|
|
|
6905
6936
|
<a name="PaypalWalletMeta" id="PaypalWalletMeta" href="#PaypalWalletMeta"> </a>
|
|
@@ -7032,6 +7063,115 @@ Interface for OnErrorEventData
|
|
|
7032
7063
|
| [chargeId] | <code>string</code> | chargeId in case it's already set after onClick event |
|
|
7033
7064
|
| [data] | <code>Error</code> | Error object if present |
|
|
7034
7065
|
|
|
7066
|
+
<a name="OnShippingAddressChangeEventData" id="OnShippingAddressChangeEventData" href="#OnShippingAddressChangeEventData"> </a>
|
|
7067
|
+
|
|
7068
|
+
## OnShippingAddressChangeEventData : <code>object</code>
|
|
7069
|
+
Interface for OnShippingAddressChangeEventData.
|
|
7070
|
+
|
|
7071
|
+
**Kind**: global interface
|
|
7072
|
+
|
|
7073
|
+
| Param | Type | Description |
|
|
7074
|
+
| --- | --- | --- |
|
|
7075
|
+
| event | <code>string</code> | Event Name is 'onShippingAddressChange' |
|
|
7076
|
+
| chargeId | <code>string</code> | chargeId set after onClick event |
|
|
7077
|
+
| data.address_city | <code>string</code> | PayPal and ApplePay - Shipping address city |
|
|
7078
|
+
| data.address_state | <code>string</code> | PayPal and ApplePay - Shipping address state |
|
|
7079
|
+
| data.address_postcode | <code>string</code> | PayPal and ApplePay - Shipping address postcode |
|
|
7080
|
+
| data.address_country | <code>string</code> | PayPal and ApplePay - Shipping address country code |
|
|
7081
|
+
| [data.address_line1] | <code>string</code> | ApplePay - Shipping address line 1 |
|
|
7082
|
+
| [data.address_line2] | <code>string</code> | ApplePay - Shipping address line 2 |
|
|
7083
|
+
| [data.contact.phone] | <code>string</code> | ApplePay - Shipping contact phone |
|
|
7084
|
+
| [data.contact.email] | <code>string</code> | ApplePay - Shipping contact email |
|
|
7085
|
+
| [data.contact.first_name] | <code>string</code> | ApplePay - Shipping contact first name |
|
|
7086
|
+
| [data.contact.last_name] | <code>string</code> | ApplePay - Shipping contact last name |
|
|
7087
|
+
|
|
7088
|
+
<a name="OnShippingAddressChangeEventResponse" id="OnShippingAddressChangeEventResponse" href="#OnShippingAddressChangeEventResponse"> </a>
|
|
7089
|
+
|
|
7090
|
+
## OnShippingAddressChangeEventResponse : <code>object</code>
|
|
7091
|
+
Interface for OnShippingAddressChangeEventResponse.
|
|
7092
|
+
|
|
7093
|
+
**Kind**: global interface
|
|
7094
|
+
|
|
7095
|
+
| Param | Type | Description |
|
|
7096
|
+
| --- | --- | --- |
|
|
7097
|
+
| [token] | <code>string</code> | Updated Wallet Token if any |
|
|
7098
|
+
| [label] | <code>string</code> | ApplePay - Required. Label to show to the customer. |
|
|
7099
|
+
| [amount] | <code>string</code> | ApplePay - Required. New amount for shipping option. |
|
|
7100
|
+
| [error] | <code>string</code> | PayPal and ApplePay - Error object in case of error when processing shipping address in if new address unsupported or any other possible error. |
|
|
7101
|
+
| error.code | <code>string</code> | PayPal and ApplePay - Error code, mandatory in case of error. Possible values for Paypal are 'address_error', 'country_error', 'state_error', 'zip_error' or any other string if none applies. For ApplePay values are 'address_error', 'shipping_contact_invalid' and 'billing_contact_invalid'. |
|
|
7102
|
+
| [error.field] | <code>string</code> | ApplePay - Error field in case of specifically showing it. Possible values for Apple Pay are 'phone', 'email', 'name', 'phonetic_name', 'address_lines', 'locality', 'postal_code', 'administrative_area', 'country', 'country_code'. |
|
|
7103
|
+
| [error.message] | <code>string</code> | ApplePay - Custom user facing error message. |
|
|
7104
|
+
|
|
7105
|
+
<a name="IApplePayShippingOption" id="IApplePayShippingOption" href="#IApplePayShippingOption"> </a>
|
|
7106
|
+
|
|
7107
|
+
## IApplePayShippingOption : <code>object</code>
|
|
7108
|
+
Interface for IApplePayShippingOption.
|
|
7109
|
+
Used for adding new shippings options when customer updates the shipping address.
|
|
7110
|
+
|
|
7111
|
+
**Kind**: global interface
|
|
7112
|
+
|
|
7113
|
+
| Param | Type | Description |
|
|
7114
|
+
| --- | --- | --- |
|
|
7115
|
+
| [id] | <code>string</code> | Updated Wallet Token if any |
|
|
7116
|
+
| [label] | <code>string</code> | ApplePay - Required. Label to show to the customer. |
|
|
7117
|
+
| [amount] | <code>string</code> | ApplePay - Required. New amount for shipping option. |
|
|
7118
|
+
| [detail] | <code>string</code> | ApplePay - Optional detail for shipping option. |
|
|
7119
|
+
| [date_components_range] | <code>object</code> | ApplePay - Object that contains the dates for shipping |
|
|
7120
|
+
| [date_components_range.start_date_components] | <code>object</code> | ApplePay - Contains the start date object |
|
|
7121
|
+
| [date_components_range.start_date_components.years] | <code>string</code> | ApplePay - Contains the start date year |
|
|
7122
|
+
| [date_components_range.start_date_components.months] | <code>string</code> | ApplePay - Contains the start date month |
|
|
7123
|
+
| [date_components_range.start_date_components.days] | <code>string</code> | ApplePay - Contains the start date day |
|
|
7124
|
+
| [date_components_range.start_date_components.hours] | <code>string</code> | ApplePay - Contains the start date hour |
|
|
7125
|
+
| [date_components_range.end_date_components] | <code>object</code> | ApplePay - Contains the end date year |
|
|
7126
|
+
| [date_components_range.end_date_components.years] | <code>string</code> | ApplePay - Contains the end date year |
|
|
7127
|
+
| [date_components_range.end_date_components.months] | <code>string</code> | ApplePay - Contains the end date month |
|
|
7128
|
+
| [date_components_range.end_date_components.days] | <code>string</code> | ApplePay - Contains the end date day |
|
|
7129
|
+
| [date_components_range.end_date_components.hours] | <code>string</code> | ApplePay - Contains the end date hour |
|
|
7130
|
+
|
|
7131
|
+
<a name="OnShippingOptionChangeEventData" id="OnShippingOptionChangeEventData" href="#OnShippingOptionChangeEventData"> </a>
|
|
7132
|
+
|
|
7133
|
+
## OnShippingOptionChangeEventData : <code>object</code>
|
|
7134
|
+
Interface for OnShippingOptionChangeEventData.
|
|
7135
|
+
|
|
7136
|
+
**Kind**: global interface
|
|
7137
|
+
|
|
7138
|
+
| Param | Type | Description |
|
|
7139
|
+
| --- | --- | --- |
|
|
7140
|
+
| event | <code>string</code> | Event Name is 'onShippingOptionsChange' |
|
|
7141
|
+
| chargeId | <code>string</code> | chargeId set after onClick event |
|
|
7142
|
+
| [data.shipping_option_id] | <code>string</code> | PayPal and ApplePay - Selected shipping option id |
|
|
7143
|
+
| [data.amount] | <code>string</code> | Paypal and ApplePay - Selected shipping option amount |
|
|
7144
|
+
| [data.label] | <code>string</code> | ApplePay - Selected shipping option label |
|
|
7145
|
+
| [data.detail] | <code>string</code> | ApplePay - Selected shipping option detail |
|
|
7146
|
+
|
|
7147
|
+
<a name="OnShippingOptionChangeEventResponse" id="OnShippingOptionChangeEventResponse" href="#OnShippingOptionChangeEventResponse"> </a>
|
|
7148
|
+
|
|
7149
|
+
## OnShippingOptionChangeEventResponse : <code>object</code>
|
|
7150
|
+
Interface for OnShippingOptionChangeEventResponse.
|
|
7151
|
+
|
|
7152
|
+
**Kind**: global interface
|
|
7153
|
+
|
|
7154
|
+
| Param | Type | Description |
|
|
7155
|
+
| --- | --- | --- |
|
|
7156
|
+
| [token] | <code>string</code> | Updated Wallet Token if any |
|
|
7157
|
+
| [label] | <code>string</code> | ApplePay - Required. Label to show to the customer. |
|
|
7158
|
+
| [amount] | <code>string</code> | ApplePay - Required. New amount for shipping option. |
|
|
7159
|
+
| [error] | <code>string</code> | PayPal - Error object in case of error when processing shipping option selection. |
|
|
7160
|
+
| error.code | <code>string</code> | Possible values for Paypal are 'method_unavailable', 'store_unavailable' or any other string if none applies. |
|
|
7161
|
+
|
|
7162
|
+
<a name="IApplePayError" id="IApplePayError" href="#IApplePayError"> </a>
|
|
7163
|
+
|
|
7164
|
+
## IApplePayError : <code>object</code>
|
|
7165
|
+
Interface for IApplePayError.
|
|
7166
|
+
|
|
7167
|
+
**Kind**: global interface
|
|
7168
|
+
|
|
7169
|
+
| Param | Type | Description |
|
|
7170
|
+
| --- | --- | --- |
|
|
7171
|
+
| code | <code>'shipping\_contact\_invalid'</code> \| <code>'billing\_contact\_invalid'</code> \| <code>'address\_unserviceable'</code> \| <code>'coupon\_code\_invalid'</code> \| <code>'coupon\_code\_expired'</code> \| <code>'unknown'</code> | The error code for this instance. |
|
|
7172
|
+
| contact_field | [<code>ContactFieldType</code>](#ContactFieldType) | The error code for this instance. |
|
|
7173
|
+
| message | <code>string</code> \| <code>undefined</code> | TA localized, user-facing string that describes the error. |
|
|
7174
|
+
|
|
7035
7175
|
<a name="ApplePayWalletButtonExpress" id="ApplePayWalletButtonExpress" href="#ApplePayWalletButtonExpress"> </a>
|
|
7036
7176
|
|
|
7037
7177
|
## ApplePayWalletButtonExpress ⇐ <code>BaseWalletButton</code>
|
|
@@ -7050,6 +7190,8 @@ Class ApplePayWalletButtonExpress to work with Apple Pay Wallet.
|
|
|
7050
7190
|
* [.onPaymentInReview([handler])](#BaseWalletButton+onPaymentInReview)
|
|
7051
7191
|
* [.onPaymentError([handler])](#BaseWalletButton+onPaymentError)
|
|
7052
7192
|
* [.onCheckoutClose(handler)](#BaseWalletButton+onCheckoutClose)
|
|
7193
|
+
* [.onShippingAddressChange([handler])](#BaseWalletButton+onShippingAddressChange)
|
|
7194
|
+
* [.onShippingOptionsChange([handler])](#BaseWalletButton+onShippingOptionsChange)
|
|
7053
7195
|
* [.onUnavailable(handler)](#BaseWalletButton+onUnavailable)
|
|
7054
7196
|
* [.onError(handler)](#BaseWalletButton+onError)
|
|
7055
7197
|
|
|
@@ -7226,6 +7368,52 @@ button.onCheckoutClose(() => {
|
|
|
7226
7368
|
console.log('Wallet checkout closes');
|
|
7227
7369
|
});
|
|
7228
7370
|
```
|
|
7371
|
+
<a name="BaseWalletButton+onShippingAddressChange" id="BaseWalletButton+onShippingAddressChange" href="#BaseWalletButton+onShippingAddressChange"> </a>
|
|
7372
|
+
|
|
7373
|
+
### applePayWalletButtonExpress.onShippingAddressChange([handler])
|
|
7374
|
+
If shipping address data is updated, the function passed as parameter will be called.
|
|
7375
|
+
Use this method to listen for shipping address selection or input from customer when shipping is enabled.
|
|
7376
|
+
The event handler needs to return a new token in case a backend to backend wallet update call was executed.
|
|
7377
|
+
In addition, if any error occured, an error string must be supplied.
|
|
7378
|
+
By default, the event handler will be processed successfuly if neither token nor error is returned.
|
|
7379
|
+
|
|
7380
|
+
**Kind**: instance method of [<code>ApplePayWalletButtonExpress</code>](#ApplePayWalletButtonExpress)
|
|
7381
|
+
**Overrides**: [<code>onShippingAddressChange</code>](#BaseWalletButton+onShippingAddressChange)
|
|
7382
|
+
|
|
7383
|
+
| Param | Type | Description |
|
|
7384
|
+
| --- | --- | --- |
|
|
7385
|
+
| [handler] | [<code>OnShippingAddressChangeCallback</code>](#OnShippingAddressChangeCallback) | Function to be called when the shipping address data is updated. |
|
|
7386
|
+
|
|
7387
|
+
**Example**
|
|
7388
|
+
```js
|
|
7389
|
+
button.onShippingAddressChange((data) => {
|
|
7390
|
+
const responseData = await fetch('https://your-server.com/update-shipping-info');
|
|
7391
|
+
return { error: null, token: responseData.walletToken };
|
|
7392
|
+
});
|
|
7393
|
+
```
|
|
7394
|
+
<a name="BaseWalletButton+onShippingOptionsChange" id="BaseWalletButton+onShippingOptionsChange" href="#BaseWalletButton+onShippingOptionsChange"> </a>
|
|
7395
|
+
|
|
7396
|
+
### applePayWalletButtonExpress.onShippingOptionsChange([handler])
|
|
7397
|
+
If shipping options data is updated, the function passed as parameter will be called.
|
|
7398
|
+
Use this method to listen for shipping option selection from customer when shipping is enabled.
|
|
7399
|
+
The event handler needs to return a new token in case a backend to backend wallet update call was executed.
|
|
7400
|
+
In addition, if any error occured, an error string must be supplied.
|
|
7401
|
+
By default, the event handler will be processed successfuly if neither token nor error is returned.
|
|
7402
|
+
|
|
7403
|
+
**Kind**: instance method of [<code>ApplePayWalletButtonExpress</code>](#ApplePayWalletButtonExpress)
|
|
7404
|
+
**Overrides**: [<code>onShippingOptionsChange</code>](#BaseWalletButton+onShippingOptionsChange)
|
|
7405
|
+
|
|
7406
|
+
| Param | Type | Description |
|
|
7407
|
+
| --- | --- | --- |
|
|
7408
|
+
| [handler] | [<code>OnShippingOptionsChangeCallback</code>](#OnShippingOptionsChangeCallback) | Function to be called when the shipping options data is updated. |
|
|
7409
|
+
|
|
7410
|
+
**Example**
|
|
7411
|
+
```js
|
|
7412
|
+
button.onShippingOptionsChange((data) => {
|
|
7413
|
+
const responseData = await fetch('https://your-server.com/update-shipping-info');
|
|
7414
|
+
return { error: null, token: responseData.walletToken };
|
|
7415
|
+
});
|
|
7416
|
+
```
|
|
7229
7417
|
<a name="BaseWalletButton+onUnavailable" id="BaseWalletButton+onUnavailable" href="#BaseWalletButton+onUnavailable"> </a>
|
|
7230
7418
|
|
|
7231
7419
|
### applePayWalletButtonExpress.onUnavailable(handler)
|
|
@@ -7281,6 +7469,8 @@ Class PaypalWalletButtonExpress to work with Paypal Wallet.
|
|
|
7281
7469
|
* [.onPaymentInReview([handler])](#BaseWalletButton+onPaymentInReview)
|
|
7282
7470
|
* [.onPaymentError([handler])](#BaseWalletButton+onPaymentError)
|
|
7283
7471
|
* [.onCheckoutClose(handler)](#BaseWalletButton+onCheckoutClose)
|
|
7472
|
+
* [.onShippingAddressChange([handler])](#BaseWalletButton+onShippingAddressChange)
|
|
7473
|
+
* [.onShippingOptionsChange([handler])](#BaseWalletButton+onShippingOptionsChange)
|
|
7284
7474
|
* [.onUnavailable(handler)](#BaseWalletButton+onUnavailable)
|
|
7285
7475
|
* [.onError(handler)](#BaseWalletButton+onError)
|
|
7286
7476
|
|
|
@@ -7457,6 +7647,52 @@ button.onCheckoutClose(() => {
|
|
|
7457
7647
|
console.log('Wallet checkout closes');
|
|
7458
7648
|
});
|
|
7459
7649
|
```
|
|
7650
|
+
<a name="BaseWalletButton+onShippingAddressChange" id="BaseWalletButton+onShippingAddressChange" href="#BaseWalletButton+onShippingAddressChange"> </a>
|
|
7651
|
+
|
|
7652
|
+
### paypalWalletButtonExpress.onShippingAddressChange([handler])
|
|
7653
|
+
If shipping address data is updated, the function passed as parameter will be called.
|
|
7654
|
+
Use this method to listen for shipping address selection or input from customer when shipping is enabled.
|
|
7655
|
+
The event handler needs to return a new token in case a backend to backend wallet update call was executed.
|
|
7656
|
+
In addition, if any error occured, an error string must be supplied.
|
|
7657
|
+
By default, the event handler will be processed successfuly if neither token nor error is returned.
|
|
7658
|
+
|
|
7659
|
+
**Kind**: instance method of [<code>PaypalWalletButtonExpress</code>](#PaypalWalletButtonExpress)
|
|
7660
|
+
**Overrides**: [<code>onShippingAddressChange</code>](#BaseWalletButton+onShippingAddressChange)
|
|
7661
|
+
|
|
7662
|
+
| Param | Type | Description |
|
|
7663
|
+
| --- | --- | --- |
|
|
7664
|
+
| [handler] | [<code>OnShippingAddressChangeCallback</code>](#OnShippingAddressChangeCallback) | Function to be called when the shipping address data is updated. |
|
|
7665
|
+
|
|
7666
|
+
**Example**
|
|
7667
|
+
```js
|
|
7668
|
+
button.onShippingAddressChange((data) => {
|
|
7669
|
+
const responseData = await fetch('https://your-server.com/update-shipping-info');
|
|
7670
|
+
return { error: null, token: responseData.walletToken };
|
|
7671
|
+
});
|
|
7672
|
+
```
|
|
7673
|
+
<a name="BaseWalletButton+onShippingOptionsChange" id="BaseWalletButton+onShippingOptionsChange" href="#BaseWalletButton+onShippingOptionsChange"> </a>
|
|
7674
|
+
|
|
7675
|
+
### paypalWalletButtonExpress.onShippingOptionsChange([handler])
|
|
7676
|
+
If shipping options data is updated, the function passed as parameter will be called.
|
|
7677
|
+
Use this method to listen for shipping option selection from customer when shipping is enabled.
|
|
7678
|
+
The event handler needs to return a new token in case a backend to backend wallet update call was executed.
|
|
7679
|
+
In addition, if any error occured, an error string must be supplied.
|
|
7680
|
+
By default, the event handler will be processed successfuly if neither token nor error is returned.
|
|
7681
|
+
|
|
7682
|
+
**Kind**: instance method of [<code>PaypalWalletButtonExpress</code>](#PaypalWalletButtonExpress)
|
|
7683
|
+
**Overrides**: [<code>onShippingOptionsChange</code>](#BaseWalletButton+onShippingOptionsChange)
|
|
7684
|
+
|
|
7685
|
+
| Param | Type | Description |
|
|
7686
|
+
| --- | --- | --- |
|
|
7687
|
+
| [handler] | [<code>OnShippingOptionsChangeCallback</code>](#OnShippingOptionsChangeCallback) | Function to be called when the shipping options data is updated. |
|
|
7688
|
+
|
|
7689
|
+
**Example**
|
|
7690
|
+
```js
|
|
7691
|
+
button.onShippingOptionsChange((data) => {
|
|
7692
|
+
const responseData = await fetch('https://your-server.com/update-shipping-info');
|
|
7693
|
+
return { error: null, token: responseData.walletToken };
|
|
7694
|
+
});
|
|
7695
|
+
```
|
|
7460
7696
|
<a name="BaseWalletButton+onUnavailable" id="BaseWalletButton+onUnavailable" href="#BaseWalletButton+onUnavailable"> </a>
|
|
7461
7697
|
|
|
7462
7698
|
### paypalWalletButtonExpress.onUnavailable(handler)
|
|
@@ -7510,6 +7746,28 @@ List of available event's name in the wallet button lifecycle
|
|
|
7510
7746
|
| PAYMENT_IN_REVIEW | <code>string</code> | <code>"paymentInReview"</code> |
|
|
7511
7747
|
| ON_CLICK | <code>string</code> | <code>"onClick"</code> |
|
|
7512
7748
|
| ON_CHECKOUT_CLOSE | <code>string</code> | <code>"onCheckoutClose"</code> |
|
|
7749
|
+
| ON_SHIPPING_ADDRESS_CHANGE | <code>string</code> | <code>"onShippingAddressChange"</code> |
|
|
7750
|
+
| ON_SHIPPING_OPTIONS_CHANGE | <code>string</code> | <code>"onShippingOptionsChange"</code> |
|
|
7751
|
+
|
|
7752
|
+
<a name="ContactFieldType" id="ContactFieldType" href="#ContactFieldType"> </a>
|
|
7753
|
+
|
|
7754
|
+
## ContactFieldType : <code>object</code>
|
|
7755
|
+
List of available contact fields for ContactFieldType
|
|
7756
|
+
|
|
7757
|
+
**Kind**: global constant
|
|
7758
|
+
|
|
7759
|
+
| Param | Type |
|
|
7760
|
+
| --- | --- |
|
|
7761
|
+
| phone | <code>string</code> |
|
|
7762
|
+
| email | <code>string</code> |
|
|
7763
|
+
| name | <code>string</code> |
|
|
7764
|
+
| phonetic_name | <code>string</code> |
|
|
7765
|
+
| address_lines | <code>string</code> |
|
|
7766
|
+
| address_city | <code>string</code> |
|
|
7767
|
+
| address_postcode | <code>string</code> |
|
|
7768
|
+
| address_state | <code>string</code> |
|
|
7769
|
+
| address_country | <code>string</code> |
|
|
7770
|
+
| address_country_code | <code>string</code> |
|
|
7513
7771
|
|
|
7514
7772
|
<a name="OnClickCallback" id="OnClickCallback" href="#OnClickCallback"> </a>
|
|
7515
7773
|
|
|
@@ -7567,6 +7825,30 @@ Callback for onCheckoutClose method.
|
|
|
7567
7825
|
| --- | --- |
|
|
7568
7826
|
| data | [<code>OnCloseEventData</code>](#OnCloseEventData) |
|
|
7569
7827
|
|
|
7828
|
+
<a name="OnShippingAddressChangeCallback" id="OnShippingAddressChangeCallback" href="#OnShippingAddressChangeCallback"> </a>
|
|
7829
|
+
|
|
7830
|
+
## OnShippingAddressChangeCallback ⇒ [<code>Promise.<OnShippingAddressChangeEventResponse></code>](#OnShippingAddressChangeEventResponse)
|
|
7831
|
+
Callback for onShippingAddressChange method.
|
|
7832
|
+
|
|
7833
|
+
**Kind**: global typedef
|
|
7834
|
+
**Returns**: [<code>Promise.<OnShippingAddressChangeEventResponse></code>](#OnShippingAddressChangeEventResponse) - Address update result
|
|
7835
|
+
|
|
7836
|
+
| Param | Type |
|
|
7837
|
+
| --- | --- |
|
|
7838
|
+
| data | [<code>OnShippingAddressChangeEventData</code>](#OnShippingAddressChangeEventData) |
|
|
7839
|
+
|
|
7840
|
+
<a name="OnShippingOptionsChangeCallback" id="OnShippingOptionsChangeCallback" href="#OnShippingOptionsChangeCallback"> </a>
|
|
7841
|
+
|
|
7842
|
+
## OnShippingOptionsChangeCallback ⇒ [<code>Promise.<OnShippingOptionChangeEventResponse></code>](#OnShippingOptionChangeEventResponse)
|
|
7843
|
+
Callback for onShippingOptionsChange method.
|
|
7844
|
+
|
|
7845
|
+
**Kind**: global typedef
|
|
7846
|
+
**Returns**: [<code>Promise.<OnShippingOptionChangeEventResponse></code>](#OnShippingOptionChangeEventResponse) - Address update result
|
|
7847
|
+
|
|
7848
|
+
| Param | Type |
|
|
7849
|
+
| --- | --- |
|
|
7850
|
+
| data | [<code>OnShippingOptionChangeEventData</code>](#OnShippingOptionChangeEventData) |
|
|
7851
|
+
|
|
7570
7852
|
<a name="OnUnavailableCallback" id="OnUnavailableCallback" href="#OnUnavailableCallback"> </a>
|
|
7571
7853
|
|
|
7572
7854
|
## OnUnavailableCallback : <code>function</code>
|