@paydock/client-sdk 1.79.2 → 1.80.13

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 (119) hide show
  1. package/README.md +167 -25
  2. package/bundles/widget.umd.js +1103 -676
  3. package/bundles/widget.umd.min.js +1 -1
  4. package/lib/canvas-3ds/services/gpayments-service.d.ts +2 -3
  5. package/lib/canvas-3ds/services/gpayments-service.js +26 -13
  6. package/lib/canvas-3ds/services/gpayments-service.js.map +1 -1
  7. package/lib/canvas-3ds/services/standalone3ds-service.d.ts +1 -1
  8. package/lib/checkout-button/{afterpay-checkout-button.d.ts → afterpay/afterpay-checkout-button.d.ts} +2 -2
  9. package/lib/checkout-button/{afterpay-checkout-button.js → afterpay/afterpay-checkout-button.js} +4 -4
  10. package/lib/checkout-button/afterpay/afterpay-checkout-button.js.map +1 -0
  11. package/lib/checkout-button/{afterpay.runner.d.ts → afterpay/afterpay.runner.d.ts} +4 -5
  12. package/lib/checkout-button/{afterpay.runner.js → afterpay/afterpay.runner.js} +11 -10
  13. package/lib/checkout-button/afterpay/afterpay.runner.js.map +1 -0
  14. package/lib/checkout-button/checkout-button.d.ts +41 -50
  15. package/lib/checkout-button/checkout-button.interface.d.ts +48 -0
  16. package/lib/checkout-button/checkout-button.interface.js +45 -0
  17. package/lib/checkout-button/checkout-button.interface.js.map +1 -0
  18. package/lib/checkout-button/checkout-button.js +126 -127
  19. package/lib/checkout-button/checkout-button.js.map +1 -1
  20. package/lib/checkout-button/checkout-contextual-handler.d.ts +22 -0
  21. package/lib/checkout-button/checkout-contextual-handler.js +75 -0
  22. package/lib/checkout-button/checkout-contextual-handler.js.map +1 -0
  23. package/lib/checkout-button/index.d.ts +4 -4
  24. package/lib/checkout-button/index.js +4 -4
  25. package/lib/checkout-button/index.js.map +1 -1
  26. package/lib/checkout-button/{paypal-checkout-button.d.ts → paypal/paypal-checkout-button.d.ts} +1 -1
  27. package/lib/checkout-button/{paypal-checkout-button.js → paypal/paypal-checkout-button.js} +3 -3
  28. package/lib/checkout-button/paypal/paypal-checkout-button.js.map +1 -0
  29. package/lib/checkout-button/{paypal.runner.d.ts → paypal/paypal.runner.d.ts} +2 -3
  30. package/lib/checkout-button/paypal/paypal.runner.js +14 -0
  31. package/lib/checkout-button/paypal/paypal.runner.js.map +1 -0
  32. package/lib/checkout-button/runner/base.runner.d.ts +17 -0
  33. package/lib/checkout-button/runner/base.runner.js +13 -0
  34. package/lib/checkout-button/runner/base.runner.js.map +1 -0
  35. package/lib/checkout-button/runner/contextual.runner.d.ts +37 -0
  36. package/lib/checkout-button/runner/contextual.runner.js +40 -0
  37. package/lib/checkout-button/runner/contextual.runner.js.map +1 -0
  38. package/lib/checkout-button/runner/index.d.ts +8 -0
  39. package/lib/checkout-button/runner/index.js +11 -0
  40. package/lib/checkout-button/runner/index.js.map +1 -0
  41. package/lib/checkout-button/runner/popup.runner.d.ts +34 -0
  42. package/lib/checkout-button/{popup.runner.js → runner/popup.runner.js} +6 -7
  43. package/lib/checkout-button/runner/popup.runner.js.map +1 -0
  44. package/lib/checkout-button/runner/redirect.runner.d.ts +16 -0
  45. package/lib/checkout-button/runner/redirect.runner.js +15 -0
  46. package/lib/checkout-button/runner/redirect.runner.js.map +1 -0
  47. package/lib/checkout-button/{zipmoney-checkout-button.d.ts → zipmoney/zipmoney-checkout-button.d.ts} +20 -3
  48. package/lib/checkout-button/zipmoney/zipmoney-checkout-button.js +62 -0
  49. package/lib/checkout-button/zipmoney/zipmoney-checkout-button.js.map +1 -0
  50. package/lib/checkout-button/zipmoney/zipmoney-contextual.runner.d.ts +38 -0
  51. package/lib/checkout-button/zipmoney/zipmoney-contextual.runner.js +78 -0
  52. package/lib/checkout-button/zipmoney/zipmoney-contextual.runner.js.map +1 -0
  53. package/lib/checkout-button/zipmoney/zipmoney-redirect.runner.d.ts +25 -0
  54. package/lib/checkout-button/zipmoney/zipmoney-redirect.runner.js +41 -0
  55. package/lib/checkout-button/zipmoney/zipmoney-redirect.runner.js.map +1 -0
  56. package/lib/checkout-button/zipmoney/zipmoney.config.d.ts +3 -0
  57. package/lib/checkout-button/zipmoney/zipmoney.config.js +4 -0
  58. package/lib/checkout-button/zipmoney/zipmoney.config.js.map +1 -0
  59. package/lib/checkout-button/zipmoney/zipmoney.runner.d.ts +9 -0
  60. package/lib/checkout-button/zipmoney/zipmoney.runner.js +23 -0
  61. package/lib/checkout-button/zipmoney/zipmoney.runner.js.map +1 -0
  62. package/lib/checkout-button/zipmoney/zipmoney.types.d.ts +11 -0
  63. package/lib/checkout-button/zipmoney/zipmoney.types.js +1 -0
  64. package/lib/checkout-button/zipmoney/zipmoney.types.js.map +1 -0
  65. package/lib/components/dispatcher.js +2 -2
  66. package/lib/components/dispatcher.js.map +1 -1
  67. package/lib/components/param.d.ts +9 -2
  68. package/lib/components/param.js +3 -0
  69. package/lib/components/param.js.map +1 -1
  70. package/lib/components/popup.js +1 -1
  71. package/lib/components/popup.js.map +1 -1
  72. package/lib/components/storage-dispatcher.d.ts +20 -0
  73. package/lib/components/storage-dispatcher.js +49 -0
  74. package/lib/components/storage-dispatcher.js.map +1 -0
  75. package/lib/external-checkout/builder.d.ts +2 -2
  76. package/lib/external-checkout/builder.js +3 -3
  77. package/lib/external-checkout/builder.js.map +1 -1
  78. package/lib/external-checkout/checker.d.ts +1 -1
  79. package/lib/external-checkout/checker.js +2 -2
  80. package/lib/external-checkout/checker.js.map +1 -1
  81. package/lib/helper/event-emitter.d.ts +1 -1
  82. package/lib/helper/event-emitter.js.map +1 -1
  83. package/lib/wallet-buttons/afterpay.wallet-service.d.ts +28 -0
  84. package/lib/wallet-buttons/afterpay.wallet-service.js +137 -0
  85. package/lib/wallet-buttons/afterpay.wallet-service.js.map +1 -0
  86. package/lib/wallet-buttons/interfaces.d.ts +16 -1
  87. package/lib/wallet-buttons/wallet-buttons.d.ts +8 -5
  88. package/lib/wallet-buttons/wallet-buttons.js +12 -5
  89. package/lib/wallet-buttons/wallet-buttons.js.map +1 -1
  90. package/package.json +3 -2
  91. package/slate.md +31 -1
  92. package/vendors/zipmoney.d.ts +11 -4
  93. package/lib/checkout-button/afterpay-checkout-button.js.map +0 -1
  94. package/lib/checkout-button/afterpay.runner.js.map +0 -1
  95. package/lib/checkout-button/paypal-checkout-button.js.map +0 -1
  96. package/lib/checkout-button/paypal.runner.js +0 -13
  97. package/lib/checkout-button/paypal.runner.js.map +0 -1
  98. package/lib/checkout-button/popup.runner.d.ts +0 -19
  99. package/lib/checkout-button/popup.runner.js.map +0 -1
  100. package/lib/checkout-button/runner.d.ts +0 -43
  101. package/lib/checkout-button/runner.js +0 -44
  102. package/lib/checkout-button/runner.js.map +0 -1
  103. package/lib/checkout-button/zipmoney-checkout-button.js +0 -36
  104. package/lib/checkout-button/zipmoney-checkout-button.js.map +0 -1
  105. package/lib/checkout-button/zipmoney.runner.d.ts +0 -25
  106. package/lib/checkout-button/zipmoney.runner.js +0 -94
  107. package/lib/checkout-button/zipmoney.runner.js.map +0 -1
  108. package/lib/gateway/index.d.ts +0 -6
  109. package/lib/gateway/index.js +0 -7
  110. package/lib/gateway/index.js.map +0 -1
  111. package/lib/gateway/info.d.ts +0 -17
  112. package/lib/gateway/info.js +0 -27
  113. package/lib/gateway/info.js.map +0 -1
  114. package/lib/widget/external-checkout.d.ts +0 -0
  115. package/lib/widget/external-checkout.js +0 -1
  116. package/lib/widget/external-checkout.js.map +0 -1
  117. package/lib/widget/payment-source-token.d.ts +0 -0
  118. package/lib/widget/payment-source-token.js +0 -1
  119. package/lib/widget/payment-source-token.js.map +0 -1
package/README.md CHANGED
@@ -3605,6 +3605,15 @@ This example shows how you can use a lot of other methods to settings your butto
3605
3605
  </dd>
3606
3606
  </dl>
3607
3607
 
3608
+ ## Members
3609
+
3610
+ <dl>
3611
+ <dt><a href="#user-content-cb_CHECKOUT_MODE">CHECKOUT_MODE</a> : <code>object</code></dt>
3612
+ <dd></dd>
3613
+ <dt><a href="#user-content-cb_GATEWAY_TYPE">GATEWAY_TYPE</a> : <code>object</code></dt>
3614
+ <dd></dd>
3615
+ </dl>
3616
+
3608
3617
  ## Constants
3609
3618
 
3610
3619
  <dl>
@@ -3757,6 +3766,7 @@ Class CheckoutButton transform usual button into checkout
3757
3766
  * [.setBackdropDescription(text)](#user-content-cb_CheckoutButton+setBackdropDescription)
3758
3767
  * [.setBackdropTitle(string)](#user-content-cb_CheckoutButton+setBackdropTitle)
3759
3768
  * [.setSuspendedRedirectUri(string)](#user-content-cb_CheckoutButton+setSuspendedRedirectUri)
3769
+ * [.setRedirectUrl(string)](#user-content-cb_CheckoutButton+setRedirectUrl)
3760
3770
  * [.turnOffBackdrop()](#user-content-cb_CheckoutButton+turnOffBackdrop)
3761
3771
 
3762
3772
  <a name="cb_new_CheckoutButton_new" id="cb_new_CheckoutButton_new" href="#user-content-cb_new_CheckoutButton_new">&nbsp;</a>
@@ -3773,7 +3783,7 @@ Class CheckoutButton transform usual button into checkout
3773
3783
  **Example**
3774
3784
 
3775
3785
  ```javascript
3776
- var widget = new CheckoutButton('#button', 'aceessToken','gatewayId');
3786
+ var widget = new CheckoutButton('#button', 'accessToken','gatewayId');
3777
3787
  ```
3778
3788
  <a name="cb_CheckoutButton+on" id="cb_CheckoutButton+on" href="#user-content-cb_CheckoutButton+on">&nbsp;</a>
3779
3789
 
@@ -3797,7 +3807,8 @@ widget.on('click', function () {
3797
3807
  <a name="cb_CheckoutButton+close" id="cb_CheckoutButton+close" href="#user-content-cb_CheckoutButton+close">&nbsp;</a>
3798
3808
 
3799
3809
  ### checkoutButton.close()
3800
- Close popup window forcibly
3810
+ Close popup window forcibly.
3811
+ Only for 'contextual' mode.
3801
3812
 
3802
3813
  **Kind**: instance method of [<code>CheckoutButton</code>](#user-content-cb_CheckoutButton)
3803
3814
  <a name="cb_CheckoutButton+onFinishInsert" id="cb_CheckoutButton+onFinishInsert" href="#user-content-cb_CheckoutButton+onFinishInsert">&nbsp;</a>
@@ -3835,7 +3846,8 @@ button.setMeta({
3835
3846
  <a name="cb_CheckoutButton+setBackdropDescription" id="cb_CheckoutButton+setBackdropDescription" href="#user-content-cb_CheckoutButton+setBackdropDescription">&nbsp;</a>
3836
3847
 
3837
3848
  ### checkoutButton.setBackdropDescription(text)
3838
- Method for setting backdrop description
3849
+ Method for setting backdrop description.
3850
+ Only for 'contextual' mode.
3839
3851
 
3840
3852
  **Kind**: instance method of [<code>CheckoutButton</code>](#user-content-cb_CheckoutButton)
3841
3853
 
@@ -3851,7 +3863,8 @@ button.setBackdropDescription('Custom description');
3851
3863
  <a name="cb_CheckoutButton+setBackdropTitle" id="cb_CheckoutButton+setBackdropTitle" href="#user-content-cb_CheckoutButton+setBackdropTitle">&nbsp;</a>
3852
3864
 
3853
3865
  ### checkoutButton.setBackdropTitle(string)
3854
- Method for setting backdrop title
3866
+ Method for setting backdrop title.
3867
+ Only for 'contextual' mode.
3855
3868
 
3856
3869
  **Kind**: instance method of [<code>CheckoutButton</code>](#user-content-cb_CheckoutButton)
3857
3870
 
@@ -3867,7 +3880,8 @@ button.setBackdropTitle('Custom title');
3867
3880
  <a name="cb_CheckoutButton+setSuspendedRedirectUri" id="cb_CheckoutButton+setSuspendedRedirectUri" href="#user-content-cb_CheckoutButton+setSuspendedRedirectUri">&nbsp;</a>
3868
3881
 
3869
3882
  ### checkoutButton.setSuspendedRedirectUri(string)
3870
- Method for setting suspended redirect uri. Redirect after referred checkout
3883
+ Method for setting suspended redirect uri. Redirect after referred checkout.
3884
+ Only for 'contextual' mode.
3871
3885
 
3872
3886
  **Kind**: instance method of [<code>CheckoutButton</code>](#user-content-cb_CheckoutButton)
3873
3887
 
@@ -3875,10 +3889,24 @@ Method for setting suspended redirect uri. Redirect after referred checkout
3875
3889
  | --- | --- | --- |
3876
3890
  | string | <code>uri</code> | uri for redirect (by default) |
3877
3891
 
3892
+ <a name="cb_CheckoutButton+setRedirectUrl" id="cb_CheckoutButton+setRedirectUrl" href="#user-content-cb_CheckoutButton+setRedirectUrl">&nbsp;</a>
3893
+
3894
+ ### checkoutButton.setRedirectUrl(string)
3895
+ Method for setting the merchant redirect URL.
3896
+ Merchant's customers redirect after successfull checkout.
3897
+ Only for 'redirect' mode.
3898
+
3899
+ **Kind**: instance method of [<code>CheckoutButton</code>](#user-content-cb_CheckoutButton)
3900
+
3901
+ | Param | Type | Description |
3902
+ | --- | --- | --- |
3903
+ | string | <code>url</code> | redirect url |
3904
+
3878
3905
  <a name="cb_CheckoutButton+turnOffBackdrop" id="cb_CheckoutButton+turnOffBackdrop" href="#user-content-cb_CheckoutButton+turnOffBackdrop">&nbsp;</a>
3879
3906
 
3880
3907
  ### checkoutButton.turnOffBackdrop()
3881
3908
  Method for disable backdrop on the page.
3909
+ Only for 'contextual' mode.
3882
3910
 
3883
3911
  **Kind**: instance method of [<code>CheckoutButton</code>](#user-content-cb_CheckoutButton)
3884
3912
  **Example**
@@ -3895,8 +3923,9 @@ Class ZipmoneyCheckoutButton is wrapper of CheckoutButton transform usual button
3895
3923
  **Extends**: [<code>CheckoutButton</code>](#user-content-cb_CheckoutButton)
3896
3924
 
3897
3925
  * [ZipmoneyCheckoutButton](#user-content-cb_ZipmoneyCheckoutButton) ⇐ [<code>CheckoutButton</code>](#user-content-cb_CheckoutButton)
3898
- * [new exports.ZipmoneyCheckoutButton(selector, publicKey, [gatewayId])](#user-content-cb_new_ZipmoneyCheckoutButton_new)
3926
+ * [new exports.ZipmoneyCheckoutButton(selector, publicKey, [gatewayId], [gatewayId])](#user-content-cb_new_ZipmoneyCheckoutButton_new)
3899
3927
  * [.setSuspendedRedirectUri(string)](#user-content-cb_ZipmoneyCheckoutButton+setSuspendedRedirectUri)
3928
+ * [.setRedirectUrl(string)](#user-content-cb_ZipmoneyCheckoutButton+setRedirectUrl)
3900
3929
  * [.on(eventName, cb)](#user-content-cb_CheckoutButton+on)
3901
3930
  * [.close()](#user-content-cb_CheckoutButton+close)
3902
3931
  * [.onFinishInsert(selector, dataType)](#user-content-cb_CheckoutButton+onFinishInsert)
@@ -3907,13 +3936,14 @@ Class ZipmoneyCheckoutButton is wrapper of CheckoutButton transform usual button
3907
3936
 
3908
3937
  <a name="cb_new_ZipmoneyCheckoutButton_new" id="cb_new_ZipmoneyCheckoutButton_new" href="#user-content-cb_new_ZipmoneyCheckoutButton_new">&nbsp;</a>
3909
3938
 
3910
- ### new exports.ZipmoneyCheckoutButton(selector, publicKey, [gatewayId])
3939
+ ### new exports.ZipmoneyCheckoutButton(selector, publicKey, [gatewayId], [gatewayId])
3911
3940
 
3912
3941
  | Param | Type | Default | Description |
3913
3942
  | --- | --- | --- | --- |
3914
3943
  | selector | <code>string</code> | | Selector of html element. |
3915
3944
  | publicKey | <code>string</code> | | PayDock users public key |
3916
3945
  | [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 |
3946
+ | [gatewayId] | <code>string</code> | <code>&quot;default&quot;</code> | Checkout mode, it could be set to 'contextual' or 'redirect'. By default it 'contextual' |
3917
3947
 
3918
3948
  **Example**
3919
3949
 
@@ -3934,7 +3964,25 @@ If using in-context (sdk) we will not automatically redirect to this URI.
3934
3964
 
3935
3965
  | Param | Type | Description |
3936
3966
  | --- | --- | --- |
3937
- | string | <code>uri</code> | uri for redirect (by default) |
3967
+ | string | <code>uri</code> | uri for suspended redirect (by default) |
3968
+
3969
+ <a name="cb_ZipmoneyCheckoutButton+setRedirectUrl" id="cb_ZipmoneyCheckoutButton+setRedirectUrl" href="#user-content-cb_ZipmoneyCheckoutButton+setRedirectUrl">&nbsp;</a>
3970
+
3971
+ ### zipmoneyCheckoutButton.setRedirectUrl(string)
3972
+ Method for setting the merchant redirect URL.
3973
+ The merchant's customers would be redirected to the specified URL
3974
+ at the end of ZipMoney checkout flow.
3975
+
3976
+ Once the redirect URL would be set, the checkout flow would be immediately switched
3977
+ from 'contextual' mode to the 'redirect' mode.
3978
+ The merchant's customer would be automatically redirected to this URL after the checkout is complete.
3979
+
3980
+ **Kind**: instance method of [<code>ZipmoneyCheckoutButton</code>](#user-content-cb_ZipmoneyCheckoutButton)
3981
+ **Overrides**: [<code>setRedirectUrl</code>](#user-content-cb_CheckoutButton+setRedirectUrl)
3982
+
3983
+ | Param | Type | Description |
3984
+ | --- | --- | --- |
3985
+ | string | <code>url</code> | URL for redirect |
3938
3986
 
3939
3987
  <a name="cb_CheckoutButton+on" id="cb_CheckoutButton+on" href="#user-content-cb_CheckoutButton+on">&nbsp;</a>
3940
3988
 
@@ -3958,7 +4006,8 @@ widget.on('click', function () {
3958
4006
  <a name="cb_CheckoutButton+close" id="cb_CheckoutButton+close" href="#user-content-cb_CheckoutButton+close">&nbsp;</a>
3959
4007
 
3960
4008
  ### zipmoneyCheckoutButton.close()
3961
- Close popup window forcibly
4009
+ Close popup window forcibly.
4010
+ Only for 'contextual' mode.
3962
4011
 
3963
4012
  **Kind**: instance method of [<code>ZipmoneyCheckoutButton</code>](#user-content-cb_ZipmoneyCheckoutButton)
3964
4013
  <a name="cb_CheckoutButton+onFinishInsert" id="cb_CheckoutButton+onFinishInsert" href="#user-content-cb_CheckoutButton+onFinishInsert">&nbsp;</a>
@@ -3996,7 +4045,8 @@ button.setMeta({
3996
4045
  <a name="cb_CheckoutButton+setBackdropDescription" id="cb_CheckoutButton+setBackdropDescription" href="#user-content-cb_CheckoutButton+setBackdropDescription">&nbsp;</a>
3997
4046
 
3998
4047
  ### zipmoneyCheckoutButton.setBackdropDescription(text)
3999
- Method for setting backdrop description
4048
+ Method for setting backdrop description.
4049
+ Only for 'contextual' mode.
4000
4050
 
4001
4051
  **Kind**: instance method of [<code>ZipmoneyCheckoutButton</code>](#user-content-cb_ZipmoneyCheckoutButton)
4002
4052
 
@@ -4012,7 +4062,8 @@ button.setBackdropDescription('Custom description');
4012
4062
  <a name="cb_CheckoutButton+setBackdropTitle" id="cb_CheckoutButton+setBackdropTitle" href="#user-content-cb_CheckoutButton+setBackdropTitle">&nbsp;</a>
4013
4063
 
4014
4064
  ### zipmoneyCheckoutButton.setBackdropTitle(string)
4015
- Method for setting backdrop title
4065
+ Method for setting backdrop title.
4066
+ Only for 'contextual' mode.
4016
4067
 
4017
4068
  **Kind**: instance method of [<code>ZipmoneyCheckoutButton</code>](#user-content-cb_ZipmoneyCheckoutButton)
4018
4069
 
@@ -4029,6 +4080,7 @@ button.setBackdropTitle('Custom title');
4029
4080
 
4030
4081
  ### zipmoneyCheckoutButton.turnOffBackdrop()
4031
4082
  Method for disable backdrop on the page.
4083
+ Only for 'contextual' mode.
4032
4084
 
4033
4085
  **Kind**: instance method of [<code>ZipmoneyCheckoutButton</code>](#user-content-cb_ZipmoneyCheckoutButton)
4034
4086
  **Example**
@@ -4053,6 +4105,7 @@ Class PaypalCheckoutButton is wrapper of CheckoutButton transform usual button i
4053
4105
  * [.setBackdropDescription(text)](#user-content-cb_CheckoutButton+setBackdropDescription)
4054
4106
  * [.setBackdropTitle(string)](#user-content-cb_CheckoutButton+setBackdropTitle)
4055
4107
  * [.setSuspendedRedirectUri(string)](#user-content-cb_CheckoutButton+setSuspendedRedirectUri)
4108
+ * [.setRedirectUrl(string)](#user-content-cb_CheckoutButton+setRedirectUrl)
4056
4109
  * [.turnOffBackdrop()](#user-content-cb_CheckoutButton+turnOffBackdrop)
4057
4110
 
4058
4111
  <a name="cb_new_PaypalCheckoutButton_new" id="cb_new_PaypalCheckoutButton_new" href="#user-content-cb_new_PaypalCheckoutButton_new">&nbsp;</a>
@@ -4092,7 +4145,8 @@ widget.on('click', function () {
4092
4145
  <a name="cb_CheckoutButton+close" id="cb_CheckoutButton+close" href="#user-content-cb_CheckoutButton+close">&nbsp;</a>
4093
4146
 
4094
4147
  ### paypalCheckoutButton.close()
4095
- Close popup window forcibly
4148
+ Close popup window forcibly.
4149
+ Only for 'contextual' mode.
4096
4150
 
4097
4151
  **Kind**: instance method of [<code>PaypalCheckoutButton</code>](#user-content-cb_PaypalCheckoutButton)
4098
4152
  <a name="cb_CheckoutButton+onFinishInsert" id="cb_CheckoutButton+onFinishInsert" href="#user-content-cb_CheckoutButton+onFinishInsert">&nbsp;</a>
@@ -4130,7 +4184,8 @@ button.setMeta({
4130
4184
  <a name="cb_CheckoutButton+setBackdropDescription" id="cb_CheckoutButton+setBackdropDescription" href="#user-content-cb_CheckoutButton+setBackdropDescription">&nbsp;</a>
4131
4185
 
4132
4186
  ### paypalCheckoutButton.setBackdropDescription(text)
4133
- Method for setting backdrop description
4187
+ Method for setting backdrop description.
4188
+ Only for 'contextual' mode.
4134
4189
 
4135
4190
  **Kind**: instance method of [<code>PaypalCheckoutButton</code>](#user-content-cb_PaypalCheckoutButton)
4136
4191
 
@@ -4146,7 +4201,8 @@ button.setBackdropDescription('Custom description');
4146
4201
  <a name="cb_CheckoutButton+setBackdropTitle" id="cb_CheckoutButton+setBackdropTitle" href="#user-content-cb_CheckoutButton+setBackdropTitle">&nbsp;</a>
4147
4202
 
4148
4203
  ### paypalCheckoutButton.setBackdropTitle(string)
4149
- Method for setting backdrop title
4204
+ Method for setting backdrop title.
4205
+ Only for 'contextual' mode.
4150
4206
 
4151
4207
  **Kind**: instance method of [<code>PaypalCheckoutButton</code>](#user-content-cb_PaypalCheckoutButton)
4152
4208
 
@@ -4162,7 +4218,8 @@ button.setBackdropTitle('Custom title');
4162
4218
  <a name="cb_CheckoutButton+setSuspendedRedirectUri" id="cb_CheckoutButton+setSuspendedRedirectUri" href="#user-content-cb_CheckoutButton+setSuspendedRedirectUri">&nbsp;</a>
4163
4219
 
4164
4220
  ### paypalCheckoutButton.setSuspendedRedirectUri(string)
4165
- Method for setting suspended redirect uri. Redirect after referred checkout
4221
+ Method for setting suspended redirect uri. Redirect after referred checkout.
4222
+ Only for 'contextual' mode.
4166
4223
 
4167
4224
  **Kind**: instance method of [<code>PaypalCheckoutButton</code>](#user-content-cb_PaypalCheckoutButton)
4168
4225
 
@@ -4170,10 +4227,24 @@ Method for setting suspended redirect uri. Redirect after referred checkout
4170
4227
  | --- | --- | --- |
4171
4228
  | string | <code>uri</code> | uri for redirect (by default) |
4172
4229
 
4230
+ <a name="cb_CheckoutButton+setRedirectUrl" id="cb_CheckoutButton+setRedirectUrl" href="#user-content-cb_CheckoutButton+setRedirectUrl">&nbsp;</a>
4231
+
4232
+ ### paypalCheckoutButton.setRedirectUrl(string)
4233
+ Method for setting the merchant redirect URL.
4234
+ Merchant's customers redirect after successfull checkout.
4235
+ Only for 'redirect' mode.
4236
+
4237
+ **Kind**: instance method of [<code>PaypalCheckoutButton</code>](#user-content-cb_PaypalCheckoutButton)
4238
+
4239
+ | Param | Type | Description |
4240
+ | --- | --- | --- |
4241
+ | string | <code>url</code> | redirect url |
4242
+
4173
4243
  <a name="cb_CheckoutButton+turnOffBackdrop" id="cb_CheckoutButton+turnOffBackdrop" href="#user-content-cb_CheckoutButton+turnOffBackdrop">&nbsp;</a>
4174
4244
 
4175
4245
  ### paypalCheckoutButton.turnOffBackdrop()
4176
4246
  Method for disable backdrop on the page.
4247
+ Only for 'contextual' mode.
4177
4248
 
4178
4249
  **Kind**: instance method of [<code>PaypalCheckoutButton</code>](#user-content-cb_PaypalCheckoutButton)
4179
4250
  **Example**
@@ -4199,6 +4270,7 @@ Class AfterpayCheckoutButton is wrapper of CheckoutButton transform usual button
4199
4270
  * [.setBackdropDescription(text)](#user-content-cb_CheckoutButton+setBackdropDescription)
4200
4271
  * [.setBackdropTitle(string)](#user-content-cb_CheckoutButton+setBackdropTitle)
4201
4272
  * [.setSuspendedRedirectUri(string)](#user-content-cb_CheckoutButton+setSuspendedRedirectUri)
4273
+ * [.setRedirectUrl(string)](#user-content-cb_CheckoutButton+setRedirectUrl)
4202
4274
  * [.turnOffBackdrop()](#user-content-cb_CheckoutButton+turnOffBackdrop)
4203
4275
 
4204
4276
  <a name="cb_new_AfterpayCheckoutButton_new" id="cb_new_AfterpayCheckoutButton_new" href="#user-content-cb_new_AfterpayCheckoutButton_new">&nbsp;</a>
@@ -4255,7 +4327,8 @@ widget.on('click', function () {
4255
4327
  <a name="cb_CheckoutButton+close" id="cb_CheckoutButton+close" href="#user-content-cb_CheckoutButton+close">&nbsp;</a>
4256
4328
 
4257
4329
  ### afterpayCheckoutButton.close()
4258
- Close popup window forcibly
4330
+ Close popup window forcibly.
4331
+ Only for 'contextual' mode.
4259
4332
 
4260
4333
  **Kind**: instance method of [<code>AfterpayCheckoutButton</code>](#user-content-cb_AfterpayCheckoutButton)
4261
4334
  <a name="cb_CheckoutButton+onFinishInsert" id="cb_CheckoutButton+onFinishInsert" href="#user-content-cb_CheckoutButton+onFinishInsert">&nbsp;</a>
@@ -4293,7 +4366,8 @@ button.setMeta({
4293
4366
  <a name="cb_CheckoutButton+setBackdropDescription" id="cb_CheckoutButton+setBackdropDescription" href="#user-content-cb_CheckoutButton+setBackdropDescription">&nbsp;</a>
4294
4367
 
4295
4368
  ### afterpayCheckoutButton.setBackdropDescription(text)
4296
- Method for setting backdrop description
4369
+ Method for setting backdrop description.
4370
+ Only for 'contextual' mode.
4297
4371
 
4298
4372
  **Kind**: instance method of [<code>AfterpayCheckoutButton</code>](#user-content-cb_AfterpayCheckoutButton)
4299
4373
 
@@ -4309,7 +4383,8 @@ button.setBackdropDescription('Custom description');
4309
4383
  <a name="cb_CheckoutButton+setBackdropTitle" id="cb_CheckoutButton+setBackdropTitle" href="#user-content-cb_CheckoutButton+setBackdropTitle">&nbsp;</a>
4310
4384
 
4311
4385
  ### afterpayCheckoutButton.setBackdropTitle(string)
4312
- Method for setting backdrop title
4386
+ Method for setting backdrop title.
4387
+ Only for 'contextual' mode.
4313
4388
 
4314
4389
  **Kind**: instance method of [<code>AfterpayCheckoutButton</code>](#user-content-cb_AfterpayCheckoutButton)
4315
4390
 
@@ -4325,7 +4400,8 @@ button.setBackdropTitle('Custom title');
4325
4400
  <a name="cb_CheckoutButton+setSuspendedRedirectUri" id="cb_CheckoutButton+setSuspendedRedirectUri" href="#user-content-cb_CheckoutButton+setSuspendedRedirectUri">&nbsp;</a>
4326
4401
 
4327
4402
  ### afterpayCheckoutButton.setSuspendedRedirectUri(string)
4328
- Method for setting suspended redirect uri. Redirect after referred checkout
4403
+ Method for setting suspended redirect uri. Redirect after referred checkout.
4404
+ Only for 'contextual' mode.
4329
4405
 
4330
4406
  **Kind**: instance method of [<code>AfterpayCheckoutButton</code>](#user-content-cb_AfterpayCheckoutButton)
4331
4407
 
@@ -4333,10 +4409,24 @@ Method for setting suspended redirect uri. Redirect after referred checkout
4333
4409
  | --- | --- | --- |
4334
4410
  | string | <code>uri</code> | uri for redirect (by default) |
4335
4411
 
4412
+ <a name="cb_CheckoutButton+setRedirectUrl" id="cb_CheckoutButton+setRedirectUrl" href="#user-content-cb_CheckoutButton+setRedirectUrl">&nbsp;</a>
4413
+
4414
+ ### afterpayCheckoutButton.setRedirectUrl(string)
4415
+ Method for setting the merchant redirect URL.
4416
+ Merchant's customers redirect after successfull checkout.
4417
+ Only for 'redirect' mode.
4418
+
4419
+ **Kind**: instance method of [<code>AfterpayCheckoutButton</code>](#user-content-cb_AfterpayCheckoutButton)
4420
+
4421
+ | Param | Type | Description |
4422
+ | --- | --- | --- |
4423
+ | string | <code>url</code> | redirect url |
4424
+
4336
4425
  <a name="cb_CheckoutButton+turnOffBackdrop" id="cb_CheckoutButton+turnOffBackdrop" href="#user-content-cb_CheckoutButton+turnOffBackdrop">&nbsp;</a>
4337
4426
 
4338
4427
  ### afterpayCheckoutButton.turnOffBackdrop()
4339
4428
  Method for disable backdrop on the page.
4429
+ Only for 'contextual' mode.
4340
4430
 
4341
4431
  **Kind**: instance method of [<code>AfterpayCheckoutButton</code>](#user-content-cb_AfterpayCheckoutButton)
4342
4432
  **Example**
@@ -4344,6 +4434,27 @@ Method for disable backdrop on the page.
4344
4434
  ```javascript
4345
4435
  button.turnOffBackdrop();
4346
4436
  ```
4437
+ <a name="cb_CHECKOUT_MODE" id="cb_CHECKOUT_MODE" href="#user-content-cb_CHECKOUT_MODE">&nbsp;</a>
4438
+
4439
+ ## CHECKOUT\_MODE : <code>object</code>
4440
+ **Kind**: global variable
4441
+
4442
+ | Param | Type | Default |
4443
+ | --- | --- | --- |
4444
+ | CONTEXTUAL | <code>string</code> | <code>&quot;contextual&quot;</code> |
4445
+ | REDIRECT | <code>string</code> | <code>&quot;redirect&quot;</code> |
4446
+
4447
+ <a name="cb_GATEWAY_TYPE" id="cb_GATEWAY_TYPE" href="#user-content-cb_GATEWAY_TYPE">&nbsp;</a>
4448
+
4449
+ ## GATEWAY\_TYPE : <code>object</code>
4450
+ **Kind**: global variable
4451
+
4452
+ | Param | Type | Default |
4453
+ | --- | --- | --- |
4454
+ | ZIPMONEY | <code>string</code> | <code>&quot;Zipmoney&quot;</code> |
4455
+ | PAYPAL | <code>string</code> | <code>&quot;PaypalClassic&quot;</code> |
4456
+ | AFTERPAY | <code>string</code> | <code>&quot;Afterpay&quot;</code> |
4457
+
4347
4458
  <a name="cb_CHECKOUT_BUTTON_EVENT" id="cb_CHECKOUT_BUTTON_EVENT" href="#user-content-cb_CHECKOUT_BUTTON_EVENT">&nbsp;</a>
4348
4459
 
4349
4460
  ## CHECKOUT\_BUTTON\_EVENT : <code>object</code>
@@ -4903,7 +5014,7 @@ The final method to beginning, the load process of widget to html
4903
5014
  You can find description of all methods and parameters [here](https://www.npmjs.com/package/@paydock/client-sdk#wallet-buttons-simple-example)
4904
5015
 
4905
5016
  Wallet Buttons allow you to easily integrate different E-Wallets into your checkout.
4906
- Currently supports ApplePay, Google Pay and Apple Pay via Stripe, Flypay checkout and Paypal Smart Buttons Checkout.
5017
+ Currently supports ApplePay, Google Pay, Google Pay and Apple Pay via Stripe, Flypay checkout, Paypal Smart Buttons Checkout and Afterpay.
4907
5018
 
4908
5019
  If available in your client environment, you will display a simple button that upon clicking it the user will follow the standard flow for the appropriate Wallet. If not available an event will be raised and no button will be displayed.
4909
5020
 
@@ -4969,6 +5080,33 @@ var button = new WalletButtons(
4969
5080
  );
4970
5081
  button.load();
4971
5082
  ```
5083
+
5084
+ For Afterpay wallet, the country code is required:
5085
+ ```javascript
5086
+ let button = new paydock.WalletButtons(
5087
+ "#widget",
5088
+ token,
5089
+ {
5090
+ country: "AU",
5091
+ }
5092
+ );
5093
+ button.load();
5094
+ ```
5095
+
5096
+ ```javascript--es2015
5097
+ // ES2015 | TypeScript
5098
+ import { WalletButtons } from '@paydock/client-sdk';
5099
+
5100
+ var button = new WalletButtons(
5101
+ '#widget',
5102
+ token,
5103
+ {
5104
+ country: 'AU',
5105
+ }
5106
+ );
5107
+ button.load();
5108
+ ```
5109
+
4972
5110
  ### Setting environment
4973
5111
 
4974
5112
  Current method can change environment. By default environment = sandbox.
@@ -5074,6 +5212,8 @@ button.onUpdate((data) => {
5074
5212
  After the payment is completed, the onPaymentSuccessful(data) will be called if the payment was successful. If the payment was not successful, the function onPaymentError(data) will be called. If fraud check is active for the gateway, a fraud body was sent in the wallet charge initialize call and the fraud service left the charge in review, then the onPaymentInReview(data) will be called.
5075
5213
  All three callbacks return relevant data according to each one of the scenarios.
5076
5214
 
5215
+ Note that these callbacks will not trigger for Afterpay wallet since the payment completion for it is done via Redirect method, and therefore this SDK won't be loaded once the payment is completed at checkout.
5216
+
5077
5217
  ```javascript
5078
5218
  button.onPaymentSuccessful((data) => console.log("The payment was successful"));
5079
5219
  ```
@@ -5331,6 +5471,7 @@ Also, for **ApplePay via MPGS** you can initialize the `ApplePayPaymentRequest`
5331
5471
  </script>
5332
5472
  </html>
5333
5473
  ```
5474
+
5334
5475
  ## Classes
5335
5476
 
5336
5477
  <dl>
@@ -5373,19 +5514,20 @@ Interface of data used by the wallet checkout and payment proccess.
5373
5514
 
5374
5515
  | Param | Type | Description |
5375
5516
  | --- | --- | --- |
5376
- | [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]. |
5377
- | [country] | <code>string</code> | Country of the user. 2 letter ISO code format. Required for [Stripe, ApplePay, GooglePay]. N/A for [FlyPay, PayPal]. |
5517
+ | [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, Afterpay]. |
5518
+ | [country] | <code>string</code> | Country of the user. 2 letter ISO code format. Required for [Stripe, ApplePay, GooglePay, Afterpay]. N/A for [FlyPay, PayPal]. |
5378
5519
  | [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. |
5379
5520
  | [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. |
5380
5521
  | [request_payer_name] | <code>boolean</code> | Used mainly for fraud purposes - recommended set to true. Optional for [Stripe]. N/A for other wallets. |
5381
5522
  | [request_payer_email] | <code>boolean</code> | Used mainly for fraud purposes - recommended set to true. Optional for [Stripe]. N/A for other wallets. |
5382
5523
  | [request_payer_phone] | <code>boolean</code> | Used mainly for fraud purposes - recommended set to true. Optional for [Stripe]. N/A for other wallets. |
5383
- | [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]. |
5524
+ | [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, Afterpay]. |
5384
5525
  | [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. |
5385
5526
  | [merchant_name] | <code>string</code> | Merchant Name used for GooglePay integration via MPGS. Required for [GooglePay]. N/A for other wallets. |
5386
5527
  | [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. |
5387
- | [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]. |
5388
- | [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. |
5528
+ | [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, GooglePay and Afterpay to select button type. Optional for [PayPal, ApplePay, GooglePay, Afterpay]. N/A for [Stripe, FlyPay]. |
5529
+ | [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. Also select button type for GooglePay (check GooglePayStyles) and Afterpay (check AfterpayStyles). Optional for [ApplePay, GooglePay, Afterpay]. N/A for other wallets. |
5530
+ | [style.height] | <code>object</code> | Used to select Afterpay button height. Optional for [Afterpay]. N/A for other wallets. |
5389
5531
  | [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. |
5390
5532
 
5391
5533
  <a name="IApplePayShippingOption" id="IApplePayShippingOption" href="#IApplePayShippingOption">&nbsp;</a>