@paydock/client-sdk 1.104.9-beta → 1.105.56-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 (253) hide show
  1. package/README.md +1984 -396
  2. package/bundles/index.cjs +33513 -8908
  3. package/bundles/index.cjs.d.ts +867 -52
  4. package/bundles/index.mjs +33507 -8908
  5. package/bundles/index.mjs.d.ts +867 -52
  6. package/bundles/types/api/api-base.d.ts +19 -6
  7. package/bundles/types/api/api-base.d.ts.map +1 -1
  8. package/bundles/types/api/api-charge-internal.d.ts +1 -0
  9. package/bundles/types/api/api-charge-internal.d.ts.map +1 -1
  10. package/bundles/types/api/api-checkout-internal.d.ts +57 -0
  11. package/bundles/types/api/api-checkout-internal.d.ts.map +1 -0
  12. package/bundles/types/api/api-gateway-internal.d.ts +12 -0
  13. package/bundles/types/api/api-gateway-internal.d.ts.map +1 -0
  14. package/bundles/types/api/api-internal.d.ts +4 -0
  15. package/bundles/types/api/api-internal.d.ts.map +1 -1
  16. package/bundles/types/canvas-3ds/services/gpayments-service.d.ts +3 -3
  17. package/bundles/types/canvas-3ds/services/gpayments-service.d.ts.map +1 -1
  18. package/bundles/types/checkout/checkout.d.ts +86 -0
  19. package/bundles/types/checkout/checkout.d.ts.map +1 -0
  20. package/bundles/types/checkout/helpers/instruction-handler.d.ts +23 -0
  21. package/bundles/types/checkout/helpers/instruction-handler.d.ts.map +1 -0
  22. package/bundles/types/checkout/helpers/instruction-module.d.ts +6 -0
  23. package/bundles/types/checkout/helpers/instruction-module.d.ts.map +1 -0
  24. package/bundles/types/checkout/helpers/instruction-module.decorator.d.ts +6 -0
  25. package/bundles/types/checkout/helpers/instruction-module.decorator.d.ts.map +1 -0
  26. package/bundles/types/checkout/helpers/instruction.decorator.d.ts +5 -0
  27. package/bundles/types/checkout/helpers/instruction.decorator.d.ts.map +1 -0
  28. package/bundles/types/checkout/helpers/resource-helper.d.ts +5 -0
  29. package/bundles/types/checkout/helpers/resource-helper.d.ts.map +1 -0
  30. package/bundles/types/checkout/helpers/session-helper.d.ts +5 -0
  31. package/bundles/types/checkout/helpers/session-helper.d.ts.map +1 -0
  32. package/bundles/types/checkout/index.d.ts +2 -0
  33. package/bundles/types/checkout/index.d.ts.map +1 -0
  34. package/bundles/types/checkout/instructions/index.d.ts +3 -0
  35. package/bundles/types/checkout/instructions/index.d.ts.map +1 -0
  36. package/bundles/types/checkout/instructions/v1/index.d.ts +4 -0
  37. package/bundles/types/checkout/instructions/v1/index.d.ts.map +1 -0
  38. package/bundles/types/checkout/instructions/v1/instruction.afterpay_checkout_form.show.d.ts +20 -0
  39. package/bundles/types/checkout/instructions/v1/instruction.afterpay_checkout_form.show.d.ts.map +1 -0
  40. package/bundles/types/checkout/instructions/v1/instruction.afterpay_wallet_form.show.d.ts +14 -0
  41. package/bundles/types/checkout/instructions/v1/instruction.afterpay_wallet_form.show.d.ts.map +1 -0
  42. package/bundles/types/checkout/instructions/v1/instruction.apple_pay_form.show.d.ts +18 -0
  43. package/bundles/types/checkout/instructions/v1/instruction.apple_pay_form.show.d.ts.map +1 -0
  44. package/bundles/types/checkout/instructions/v1/instruction.bank_account_form.show.d.ts +15 -0
  45. package/bundles/types/checkout/instructions/v1/instruction.bank_account_form.show.d.ts.map +1 -0
  46. package/bundles/types/checkout/instructions/v1/instruction.canvas_3ds.show.d.ts +11 -0
  47. package/bundles/types/checkout/instructions/v1/instruction.canvas_3ds.show.d.ts.map +1 -0
  48. package/bundles/types/checkout/instructions/v1/instruction.card_form.show.d.ts +19 -0
  49. package/bundles/types/checkout/instructions/v1/instruction.card_form.show.d.ts.map +1 -0
  50. package/bundles/types/checkout/instructions/v1/instruction.disable_payment_method_event.emit.d.ts +19 -0
  51. package/bundles/types/checkout/instructions/v1/instruction.disable_payment_method_event.emit.d.ts.map +1 -0
  52. package/bundles/types/checkout/instructions/v1/instruction.generic.show_message.d.ts +26 -0
  53. package/bundles/types/checkout/instructions/v1/instruction.generic.show_message.d.ts.map +1 -0
  54. package/bundles/types/checkout/instructions/v1/instruction.google_pay_form.show.d.ts +18 -0
  55. package/bundles/types/checkout/instructions/v1/instruction.google_pay_form.show.d.ts.map +1 -0
  56. package/bundles/types/checkout/instructions/v1/instruction.merchant_event.emit.d.ts +18 -0
  57. package/bundles/types/checkout/instructions/v1/instruction.merchant_event.emit.d.ts.map +1 -0
  58. package/bundles/types/checkout/instructions/v1/instruction.payment_methods.show.d.ts +18 -0
  59. package/bundles/types/checkout/instructions/v1/instruction.payment_methods.show.d.ts.map +1 -0
  60. package/bundles/types/checkout/instructions/v1/instruction.paypal_form.show.d.ts +21 -0
  61. package/bundles/types/checkout/instructions/v1/instruction.paypal_form.show.d.ts.map +1 -0
  62. package/bundles/types/checkout/instructions/v1/instruction.zip_checkout_form.show.d.ts +19 -0
  63. package/bundles/types/checkout/instructions/v1/instruction.zip_checkout_form.show.d.ts.map +1 -0
  64. package/bundles/types/checkout/layout-widgets/additionals.d.ts +3 -0
  65. package/bundles/types/checkout/layout-widgets/additionals.d.ts.map +1 -0
  66. package/bundles/types/checkout/layout-widgets/default-variables.enum.d.ts +9 -0
  67. package/bundles/types/checkout/layout-widgets/default-variables.enum.d.ts.map +1 -0
  68. package/bundles/types/checkout/layout-widgets/message.d.ts +34 -0
  69. package/bundles/types/checkout/layout-widgets/message.d.ts.map +1 -0
  70. package/bundles/types/checkout/layout-widgets/payment-methods-template.d.ts +13 -0
  71. package/bundles/types/checkout/layout-widgets/payment-methods-template.d.ts.map +1 -0
  72. package/bundles/types/checkout/layout-widgets/payment-methods.d.ts +52 -0
  73. package/bundles/types/checkout/layout-widgets/payment-methods.d.ts.map +1 -0
  74. package/bundles/types/checkout/layout-widgets/payment-template.d.ts +3 -0
  75. package/bundles/types/checkout/layout-widgets/payment-template.d.ts.map +1 -0
  76. package/bundles/types/checkout-button/afterpay/afterpay.runner.d.ts +2 -0
  77. package/bundles/types/checkout-button/afterpay/afterpay.runner.d.ts.map +1 -1
  78. package/bundles/types/checkout-button/checkout-contextual-handler.d.ts +4 -0
  79. package/bundles/types/checkout-button/checkout-contextual-handler.d.ts.map +1 -1
  80. package/bundles/types/checkout-button/runner/contextual.runner.d.ts +2 -1
  81. package/bundles/types/checkout-button/runner/contextual.runner.d.ts.map +1 -1
  82. package/bundles/types/checkout-button/runner/popup.runner.d.ts +3 -3
  83. package/bundles/types/checkout-button/runner/popup.runner.d.ts.map +1 -1
  84. package/bundles/types/components/http-core.d.ts.map +1 -1
  85. package/bundles/types/components/iframe-event.d.ts +2 -0
  86. package/bundles/types/components/iframe-event.d.ts.map +1 -1
  87. package/bundles/types/components/iframe.d.ts +2 -0
  88. package/bundles/types/components/iframe.d.ts.map +1 -1
  89. package/bundles/types/components/link.d.ts +1 -0
  90. package/bundles/types/components/link.d.ts.map +1 -1
  91. package/bundles/types/components/param.d.ts +6 -0
  92. package/bundles/types/components/param.d.ts.map +1 -1
  93. package/bundles/types/configs/env/environment.cba.d.ts +1 -1
  94. package/bundles/types/configs/env/environment.cba.d.ts.map +1 -1
  95. package/bundles/types/configs/env/environment.paydock.d.ts +1 -1
  96. package/bundles/types/configs/env/environment.paydock.d.ts.map +1 -1
  97. package/bundles/types/helper/access-token.d.ts +1 -0
  98. package/bundles/types/helper/access-token.d.ts.map +1 -1
  99. package/bundles/types/helper/event-emitter.d.ts +1 -0
  100. package/bundles/types/helper/event-emitter.d.ts.map +1 -1
  101. package/bundles/types/helper/spiner.util.d.ts +6 -0
  102. package/bundles/types/helper/spiner.util.d.ts.map +1 -0
  103. package/bundles/types/helper/widget-logger.d.ts +9 -0
  104. package/bundles/types/helper/widget-logger.d.ts.map +1 -0
  105. package/bundles/types/index-cba.d.ts +4 -0
  106. package/bundles/types/index-cba.d.ts.map +1 -1
  107. package/bundles/types/index.d.ts +4 -0
  108. package/bundles/types/index.d.ts.map +1 -1
  109. package/bundles/types/paypal-data-collector/index.d.ts +23 -0
  110. package/bundles/types/paypal-data-collector/index.d.ts.map +1 -0
  111. package/bundles/types/paypal-data-collector/paypal-data-collector.d.ts +59 -0
  112. package/bundles/types/paypal-data-collector/paypal-data-collector.d.ts.map +1 -0
  113. package/bundles/types/paypal-data-collector/paypal-data-collector.interfaces.d.ts +21 -0
  114. package/bundles/types/paypal-data-collector/paypal-data-collector.interfaces.d.ts.map +1 -0
  115. package/bundles/types/paypal-data-collector/paypal-data-collector.service.d.ts +18 -0
  116. package/bundles/types/paypal-data-collector/paypal-data-collector.service.d.ts.map +1 -0
  117. package/bundles/types/paypal-save-payment-source/index.d.ts +61 -0
  118. package/bundles/types/paypal-save-payment-source/index.d.ts.map +1 -0
  119. package/bundles/types/paypal-save-payment-source/paypal-save-payment-source.d.ts +86 -0
  120. package/bundles/types/paypal-save-payment-source/paypal-save-payment-source.d.ts.map +1 -0
  121. package/bundles/types/paypal-save-payment-source/paypal-save-payment-source.interfaces.d.ts +84 -0
  122. package/bundles/types/paypal-save-payment-source/paypal-save-payment-source.interfaces.d.ts.map +1 -0
  123. package/bundles/types/paypal-save-payment-source/paypal-save-payment-source.service.d.ts +37 -0
  124. package/bundles/types/paypal-save-payment-source/paypal-save-payment-source.service.d.ts.map +1 -0
  125. package/bundles/types/secure-remote-commerce/index.d.ts +2 -1
  126. package/bundles/types/secure-remote-commerce/index.d.ts.map +1 -1
  127. package/bundles/types/secure-remote-commerce/interfaces.d.ts +12 -2
  128. package/bundles/types/secure-remote-commerce/interfaces.d.ts.map +1 -1
  129. package/bundles/types/secure-remote-commerce/providers/mastercard-src/mastercard-src.d.ts.map +1 -1
  130. package/bundles/types/shared/http/http-request.d.ts +14 -0
  131. package/bundles/types/shared/http/http-request.d.ts.map +1 -0
  132. package/bundles/types/shared/http/index.d.ts +2 -0
  133. package/bundles/types/shared/http/index.d.ts.map +1 -0
  134. package/bundles/types/shared/services/instrumentation/instrumentation.agent.d.ts +15 -0
  135. package/bundles/types/shared/services/instrumentation/instrumentation.agent.d.ts.map +1 -0
  136. package/bundles/types/shared/services/instrumentation/instrumentation.config.d.ts +66 -0
  137. package/bundles/types/shared/services/instrumentation/instrumentation.config.d.ts.map +1 -0
  138. package/bundles/types/shared/services/instrumentation/instrumentation.types.d.ts +14 -0
  139. package/bundles/types/shared/services/instrumentation/instrumentation.types.d.ts.map +1 -0
  140. package/bundles/types/shared/services/instrumentation/repositories/action.repository.d.ts +15 -0
  141. package/bundles/types/shared/services/instrumentation/repositories/action.repository.d.ts.map +1 -0
  142. package/bundles/types/shared/services/instrumentation/repositories/error.repository.d.ts +23 -0
  143. package/bundles/types/shared/services/instrumentation/repositories/error.repository.d.ts.map +1 -0
  144. package/bundles/types/shared/services/instrumentation/repositories/event.repository.d.ts +15 -0
  145. package/bundles/types/shared/services/instrumentation/repositories/event.repository.d.ts.map +1 -0
  146. package/bundles/types/shared/services/instrumentation/repositories/index.d.ts +4 -0
  147. package/bundles/types/shared/services/instrumentation/repositories/index.d.ts.map +1 -0
  148. package/bundles/types/wallet-buttons/index.d.ts +4 -0
  149. package/bundles/types/wallet-buttons/index.d.ts.map +1 -1
  150. package/bundles/types/wallet-buttons/wallet-buttons.d.ts +4 -4
  151. package/bundles/types/wallet-buttons/wallet-buttons.d.ts.map +1 -1
  152. package/bundles/types/wallet-buttons/wallet-cba-buttons.d.ts +4 -4
  153. package/bundles/types/wallet-buttons/wallet-cba-buttons.d.ts.map +1 -1
  154. package/bundles/types/wallet-buttons/{afterpay.wallet-service.d.ts → wallet-services/afterpay.wallet-service.d.ts} +1 -1
  155. package/bundles/types/wallet-buttons/wallet-services/afterpay.wallet-service.d.ts.map +1 -0
  156. package/bundles/types/wallet-buttons/{apple.wallet-service.d.ts → wallet-services/apple.wallet-service.d.ts} +3 -3
  157. package/bundles/types/wallet-buttons/wallet-services/apple.wallet-service.d.ts.map +1 -0
  158. package/bundles/types/wallet-buttons/{flypay-v2.wallet-service.d.ts → wallet-services/flypay-v2.wallet-service.d.ts} +3 -3
  159. package/bundles/types/wallet-buttons/wallet-services/flypay-v2.wallet-service.d.ts.map +1 -0
  160. package/bundles/types/wallet-buttons/{flypay.wallet-service.d.ts → wallet-services/flypay.wallet-service.d.ts} +6 -6
  161. package/bundles/types/wallet-buttons/wallet-services/flypay.wallet-service.d.ts.map +1 -0
  162. package/bundles/types/wallet-buttons/{google.wallet-service.d.ts → wallet-services/google.wallet-service.d.ts} +4 -4
  163. package/bundles/types/wallet-buttons/wallet-services/google.wallet-service.d.ts.map +1 -0
  164. package/bundles/types/wallet-buttons/wallet-services/mastercard.wallet-service.d.ts.map +1 -0
  165. package/bundles/types/wallet-buttons/{paypal.wallet-service.d.ts → wallet-services/paypal.wallet-service.d.ts} +1 -1
  166. package/bundles/types/wallet-buttons/wallet-services/paypal.wallet-service.d.ts.map +1 -0
  167. package/bundles/types/wallet-buttons/{stripe.wallet-service.d.ts → wallet-services/stripe.wallet-service.d.ts} +1 -1
  168. package/bundles/types/wallet-buttons/wallet-services/stripe.wallet-service.d.ts.map +1 -0
  169. package/bundles/types/wallet-buttons/{wallet-service.d.ts → wallet-services/wallet-service.d.ts} +4 -4
  170. package/bundles/types/wallet-buttons/wallet-services/wallet-service.d.ts.map +1 -0
  171. package/bundles/types/wallet-buttons-express/base.wallet-button-express.d.ts +195 -0
  172. package/bundles/types/wallet-buttons-express/base.wallet-button-express.d.ts.map +1 -0
  173. package/bundles/types/wallet-buttons-express/enum/event.enum.d.ts +10 -0
  174. package/bundles/types/wallet-buttons-express/enum/event.enum.d.ts.map +1 -0
  175. package/bundles/types/wallet-buttons-express/index.d.ts +131 -0
  176. package/bundles/types/wallet-buttons-express/index.d.ts.map +1 -0
  177. package/bundles/types/wallet-buttons-express/interfaces/base-event-data.interface.d.ts +6 -0
  178. package/bundles/types/wallet-buttons-express/interfaces/base-event-data.interface.d.ts.map +1 -0
  179. package/bundles/types/wallet-buttons-express/interfaces/base-gateway-config.interface.d.ts +6 -0
  180. package/bundles/types/wallet-buttons-express/interfaces/base-gateway-config.interface.d.ts.map +1 -0
  181. package/bundles/types/wallet-buttons-express/interfaces/base-wallet-meta.interface.d.ts +5 -0
  182. package/bundles/types/wallet-buttons-express/interfaces/base-wallet-meta.interface.d.ts.map +1 -0
  183. package/bundles/types/wallet-buttons-express/interfaces/charge-wallet-token-meta.interface.d.ts +14 -0
  184. package/bundles/types/wallet-buttons-express/interfaces/charge-wallet-token-meta.interface.d.ts.map +1 -0
  185. package/bundles/types/wallet-buttons-express/interfaces/on-click-event-data.interface.d.ts +6 -0
  186. package/bundles/types/wallet-buttons-express/interfaces/on-click-event-data.interface.d.ts.map +1 -0
  187. package/bundles/types/wallet-buttons-express/interfaces/on-close-event-data.interface.d.ts +6 -0
  188. package/bundles/types/wallet-buttons-express/interfaces/on-close-event-data.interface.d.ts.map +1 -0
  189. package/bundles/types/wallet-buttons-express/interfaces/on-error-event-data.interface.d.ts +6 -0
  190. package/bundles/types/wallet-buttons-express/interfaces/on-error-event-data.interface.d.ts.map +1 -0
  191. package/bundles/types/wallet-buttons-express/interfaces/on-payment-error-event-data.interface.d.ts +9 -0
  192. package/bundles/types/wallet-buttons-express/interfaces/on-payment-error-event-data.interface.d.ts.map +1 -0
  193. package/bundles/types/wallet-buttons-express/interfaces/on-payment-in-review-event-data.interface.d.ts +6 -0
  194. package/bundles/types/wallet-buttons-express/interfaces/on-payment-in-review-event-data.interface.d.ts.map +1 -0
  195. package/bundles/types/wallet-buttons-express/interfaces/on-payment-successful-event-data.interface.d.ts +11 -0
  196. package/bundles/types/wallet-buttons-express/interfaces/on-payment-successful-event-data.interface.d.ts.map +1 -0
  197. package/bundles/types/wallet-buttons-express/interfaces/on-unavailable-event-data.interface.d.ts +6 -0
  198. package/bundles/types/wallet-buttons-express/interfaces/on-unavailable-event-data.interface.d.ts.map +1 -0
  199. package/bundles/types/wallet-buttons-express/interfaces/wallet-capture-request.interface.d.ts +22 -0
  200. package/bundles/types/wallet-buttons-express/interfaces/wallet-capture-request.interface.d.ts.map +1 -0
  201. package/bundles/types/wallet-buttons-express/services/apple-pay/apple-pay.wallet-button-express.d.ts +50 -0
  202. package/bundles/types/wallet-buttons-express/services/apple-pay/apple-pay.wallet-button-express.d.ts.map +1 -0
  203. package/bundles/types/wallet-buttons-express/services/apple-pay/constants/apple-pay-button-style.constant.d.ts +3 -0
  204. package/bundles/types/wallet-buttons-express/services/apple-pay/constants/apple-pay-button-style.constant.d.ts.map +1 -0
  205. package/bundles/types/wallet-buttons-express/services/apple-pay/interfaces/apple-pay-gateway-config.interface.d.ts +6 -0
  206. package/bundles/types/wallet-buttons-express/services/apple-pay/interfaces/apple-pay-gateway-config.interface.d.ts.map +1 -0
  207. package/bundles/types/wallet-buttons-express/services/apple-pay/interfaces/apple-pay-wallet-meta.interface.d.ts +17 -0
  208. package/bundles/types/wallet-buttons-express/services/apple-pay/interfaces/apple-pay-wallet-meta.interface.d.ts.map +1 -0
  209. package/bundles/types/wallet-buttons-express/services/apple-pay/types/apple-pay-button-style.type.d.ts +2 -0
  210. package/bundles/types/wallet-buttons-express/services/apple-pay/types/apple-pay-button-style.type.d.ts.map +1 -0
  211. package/bundles/types/wallet-buttons-express/services/apple-pay/types/apple-pay-button-type.type.d.ts +2 -0
  212. package/bundles/types/wallet-buttons-express/services/apple-pay/types/apple-pay-button-type.type.d.ts.map +1 -0
  213. package/bundles/types/wallet-buttons-express/services/paypal/interfaces/paypal-gateway-config.interface.d.ts +4 -0
  214. package/bundles/types/wallet-buttons-express/services/paypal/interfaces/paypal-gateway-config.interface.d.ts.map +1 -0
  215. package/bundles/types/wallet-buttons-express/services/paypal/interfaces/paypal-wallet-meta.interface.d.ts +31 -0
  216. package/bundles/types/wallet-buttons-express/services/paypal/interfaces/paypal-wallet-meta.interface.d.ts.map +1 -0
  217. package/bundles/types/wallet-buttons-express/services/paypal/paypal.wallet-button-express.d.ts +47 -0
  218. package/bundles/types/wallet-buttons-express/services/paypal/paypal.wallet-button-express.d.ts.map +1 -0
  219. package/bundles/types/widget/configuration.d.ts.map +1 -1
  220. package/bundles/types/widget/html-multi-widget.d.ts +4 -3
  221. package/bundles/types/widget/html-multi-widget.d.ts.map +1 -1
  222. package/bundles/widget.umd.js +33513 -8908
  223. package/bundles/widget.umd.js.d.ts +867 -52
  224. package/bundles/widget.umd.js.min.d.ts +867 -52
  225. package/bundles/widget.umd.min.js +61 -2
  226. package/docs/click-to-pay-examples.md +36 -0
  227. package/docs/click-to-pay.md +4 -1
  228. package/docs/html/layout.html +1 -0
  229. package/docs/paypal-data-collector-examples.md +58 -0
  230. package/docs/paypal-data-collector.md +149 -0
  231. package/docs/paypal-save-payment-source-examples.md +63 -0
  232. package/docs/paypal-save-payment-source.md +256 -0
  233. package/docs/wallet-buttons-examples.md +29 -2
  234. package/docs/wallet-buttons-express-examples.md +201 -0
  235. package/docs/wallet-buttons-express.md +786 -0
  236. package/docs/wallet-buttons.md +3 -0
  237. package/examples/multi-html-widget/simple.html +2 -1
  238. package/package.json +98 -92
  239. package/slate.md +65 -2
  240. package/bundles/index.cjs.map +0 -1
  241. package/bundles/index.mjs.map +0 -1
  242. package/bundles/types/wallet-buttons/afterpay.wallet-service.d.ts.map +0 -1
  243. package/bundles/types/wallet-buttons/apple.wallet-service.d.ts.map +0 -1
  244. package/bundles/types/wallet-buttons/flypay-v2.wallet-service.d.ts.map +0 -1
  245. package/bundles/types/wallet-buttons/flypay.wallet-service.d.ts.map +0 -1
  246. package/bundles/types/wallet-buttons/google.wallet-service.d.ts.map +0 -1
  247. package/bundles/types/wallet-buttons/mastercard.wallet-service.d.ts.map +0 -1
  248. package/bundles/types/wallet-buttons/paypal.wallet-service.d.ts.map +0 -1
  249. package/bundles/types/wallet-buttons/stripe.wallet-service.d.ts.map +0 -1
  250. package/bundles/types/wallet-buttons/wallet-service.d.ts.map +0 -1
  251. package/bundles/widget.umd.js.map +0 -1
  252. package/bundles/widget.umd.min.js.map +0 -1
  253. /package/bundles/types/wallet-buttons/{mastercard.wallet-service.d.ts → wallet-services/mastercard.wallet-service.d.ts} +0 -0
@@ -0,0 +1,201 @@
1
+ ## Express Wallet Buttons
2
+
3
+ Express Wallet Buttons allow to integrate with E-Wallets in an "express" operational mode, allowing to show the respective button in product or cart pages.
4
+
5
+ The general flow to use the widgets is:
6
+ 1. Configure your gateway and connect it using Paydock API or Dashboard.
7
+ 2. Create a container in your site
8
+ ```html
9
+ <div id="widget"></div>
10
+ ```
11
+ 3. Initialize the specific WalletButtonExpress, providing your Access Token (preferred) or Public Key, plus required and optional meta parameters for the wallet in use. The general format is:
12
+ ```js
13
+ new paydock.{Provider}WalletButtonExpress(
14
+ "#widget",
15
+ accessTokenOrPublicKey,
16
+ gatewayId,
17
+ gatewaySpecificMeta,
18
+ );
19
+ ```
20
+ 4. (optional) If the screen where the button is rendered allows for cart/amount changes, call `setMeta` method to update the meta information.
21
+ 5. Handle the `onClick` callback, where you should call your server, initialize the wallet charge via `POST v1/charges/wallet` and return the wallet token.
22
+ 6. Handle the `onPaymentSuccessful`, `onPaymentError` and `onPaymentInReview` (if fraud is applicable) for payment results.
23
+
24
+ ### Supported Providers
25
+ 1. [Apple Pay](#apple-pay-wallet-button-express)
26
+ 2. [Paypal](#paypal-wallet-button-express)
27
+
28
+ ### Apple Pay Wallet Button Express
29
+
30
+ A full description of the meta parameters for [ApplePayWalletButtonExpress](#ApplePayWalletButtonExpress) meta parameters can be found [here](#ApplePayWalletMeta). Below you will find a fully working html example.
31
+
32
+ ```html
33
+ <!DOCTYPE html>
34
+ <html lang="en">
35
+ <head>
36
+ <meta charset="UTF-8">
37
+ <title>Title</title>
38
+ </head>
39
+ <body>
40
+ <h2>Payment using PayDock ApplePayWalletButtonExpress!</h2>
41
+ <div id="widget"></div>
42
+ </body>
43
+ <script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js" ></script>
44
+ <script>
45
+ let button = new paydock.ApplePayWalletButtonExpress(
46
+ "#widget",
47
+ accessTokenOrPublicKey,
48
+ gatewayId,
49
+ {
50
+ amount_label: 'TOTAL',
51
+ country: 'AU',
52
+ currency: 'AUD',
53
+ amount: 15.5,
54
+ // merchant_capabilities: ['supports3DS', 'supportsEMV', 'supportsCredit', 'supportsDebit'],
55
+ // supported_networks: ['visa', 'masterCard', 'amex', 'chinaUnionPay', 'discover', 'interac', 'jcb', 'privateLabel'],
56
+ // required_billing_contact_fields: ['email', 'name', 'phone', 'postalAddress'], // phone and email do not work according to relevant testing
57
+ // required_shipping_contact_fields: ['email', 'phone'], // Workaround to pull phone and email from shipping contact instead - does not require additional shipping address information
58
+ // supported_countries: ["AU"],
59
+ // style: {
60
+ // button_type: "buy",
61
+ // button_style: "black",
62
+ // },
63
+ }
64
+ );
65
+
66
+ button.setEnv('sandbox');
67
+
68
+ button.onUnavailable(function() {
69
+ console.log("Button not available");
70
+ });
71
+
72
+ button.onError(function(error) {
73
+ console.log("On Error Callback", error);
74
+ });
75
+
76
+ button.onPaymentSuccessful(function(data) {
77
+ console.log("Payment successful");
78
+ console.log(data);
79
+ });
80
+
81
+ button.onPaymentError(function(err) {
82
+ console.log("Payment error");
83
+ console.log(err);
84
+ });
85
+
86
+ button.onPaymentInReview(function(data) {
87
+ console.log("The payment is on fraud review");
88
+ console.log(data);
89
+ });
90
+
91
+ button.onClick(async (data) => {
92
+ console.log("Button clicked", data);
93
+
94
+ const responseData = await fetch('https://your-server-url/initialize-wallet-charge');
95
+ const parsedData = await responseData.json();
96
+ return parsedData.resource.data.token;
97
+ });
98
+
99
+ button.onCheckoutClose(() => {
100
+ console.log("Checkout closed");
101
+ });
102
+
103
+ button.load();
104
+ </script>
105
+ </html>
106
+ ```
107
+
108
+ ### Paypal Wallet Button Express
109
+ A full description of the meta parameters for [PaypalWalletButtonExpress](#PaypalWalletButtonExpress) meta parameters can be found [here](#PaypalWalletMeta). Below you will find a fully working html example.
110
+
111
+ ```html
112
+ <!DOCTYPE html>
113
+ <html lang="en">
114
+ <head>
115
+ <meta charset="UTF-8">
116
+ <title>Title</title>
117
+ </head>
118
+ <body>
119
+ <h2>Payment using PayDock PaypalWalletButtonExpress!</h2>
120
+ <div id="widget"></div>
121
+ </body>
122
+ <script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js" ></script>
123
+ <script>
124
+ let button = new paydock.PaypalWalletButtonExpress(
125
+ "#widget",
126
+ accessTokenOrPublicKey,
127
+ gatewayId,
128
+ {
129
+ amount: 15.5,
130
+ currency: 'AUD',
131
+ pay_later: false,
132
+ standalone: false,
133
+ capture: true,
134
+ // style: {
135
+ // layout: 'horizontal', // or 'vertical'
136
+ // color: 'gold', // or 'blue', 'silver', 'black', 'white'
137
+ // shape: 'rect', // or 'pill', 'sharp'
138
+ // borderRadius: 5,
139
+ // height: 40,
140
+ // disableMaxWidth: false,
141
+ // label: 'paypal', // or 'checkout', 'buynow', 'pay', 'installment'
142
+ // tagline: true,
143
+ // messages: {
144
+ // layout: 'text', // or 'flex'
145
+ // logo: {
146
+ // type: 'primary', // or 'alternative', 'inline', 'none'
147
+ // position: 'left', // or 'right', 'top'
148
+ // },
149
+ // text: {
150
+ // color: 'black', // or 'white', 'monochrome', 'grayscale'
151
+ // size: 10, // or 11, 12, 13, 14, 15, 16
152
+ // align: 'left', // or 'center', 'right'
153
+ // },
154
+ // color: 'blue', // or 'black', 'white', 'white-no-border', 'gray', 'monochrome', 'grayscale'
155
+ // ratio: '1x1', // or '1x4', '8x1', '20x1'
156
+ // },
157
+ // }
158
+ }
159
+ );
160
+
161
+ button.setEnv('sandbox');
162
+
163
+ button.onUnavailable(function() {
164
+ console.log("Button not available");
165
+ });
166
+
167
+ button.onError(function(error) {
168
+ console.log("On Error Callback", error);
169
+ });
170
+
171
+ button.onPaymentSuccessful(function(data) {
172
+ console.log("Payment successful");
173
+ console.log(data);
174
+ });
175
+
176
+ button.onPaymentError(function(err) {
177
+ console.log("Payment error");
178
+ console.log(err);
179
+ });
180
+
181
+ button.onPaymentInReview(function(data) {
182
+ console.log("The payment is on fraud review");
183
+ console.log(data);
184
+ });
185
+
186
+ button.onClick(async (data) => {
187
+ console.log("Button clicked", data);
188
+
189
+ const responseData = await fetch('https://your-server-url/initialize-wallet-charge');
190
+ const parsedData = await responseData.json();
191
+ return parsedData.resource.data.token;
192
+ });
193
+
194
+ button.onCheckoutClose(() => {
195
+ console.log("Checkout closed");
196
+ });
197
+
198
+ button.load();
199
+ </script>
200
+ </html>
201
+ ```