@paydock/client-sdk 1.104.3-beta → 1.105.1

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 (490) hide show
  1. package/.nvmrc +1 -0
  2. package/README.md +572 -290
  3. package/api.d.ts +1 -0
  4. package/api.js +1 -0
  5. package/bundles/widget.umd.js +9130 -8655
  6. package/bundles/widget.umd.min.js +1 -2
  7. package/canvas3ds.d.ts +1 -0
  8. package/canvas3ds.js +1 -0
  9. package/checkout-button.d.ts +1 -0
  10. package/checkout-button.js +1 -0
  11. package/inicialization-guide.md +7 -0
  12. package/{bundles/types → lib}/api/api-base.d.ts +1 -2
  13. package/lib/api/api-base.js +101 -0
  14. package/lib/api/api-base.js.map +1 -0
  15. package/{bundles/types → lib}/api/api-charge-internal.d.ts +0 -1
  16. package/lib/api/api-charge-internal.js +30 -0
  17. package/lib/api/api-charge-internal.js.map +1 -0
  18. package/{bundles/types → lib}/api/api-charge.d.ts +0 -1
  19. package/lib/api/api-charge.js +49 -0
  20. package/lib/api/api-charge.js.map +1 -0
  21. package/{bundles/types → lib}/api/api-internal.d.ts +0 -1
  22. package/lib/api/api-internal.js +13 -0
  23. package/lib/api/api-internal.js.map +1 -0
  24. package/{bundles/types → lib}/api/api-service-internal.d.ts +0 -1
  25. package/lib/api/api-service-internal.js +18 -0
  26. package/lib/api/api-service-internal.js.map +1 -0
  27. package/{bundles/types → lib}/api/api.d.ts +1 -2
  28. package/lib/api/api.js +62 -0
  29. package/lib/api/api.js.map +1 -0
  30. package/lib/api/index.d.ts +1 -0
  31. package/lib/api/index.js +2 -0
  32. package/lib/api/index.js.map +1 -0
  33. package/{bundles/types → lib}/canvas-3ds/canvas-3ds.d.ts +1 -2
  34. package/lib/canvas-3ds/canvas-3ds.js +157 -0
  35. package/lib/canvas-3ds/canvas-3ds.js.map +1 -0
  36. package/{bundles/types → lib}/canvas-3ds/index.d.ts +0 -1
  37. package/lib/canvas-3ds/index.js +2 -0
  38. package/lib/canvas-3ds/index.js.map +1 -0
  39. package/{bundles/types → lib}/canvas-3ds/services/gpayments-service.d.ts +0 -1
  40. package/lib/canvas-3ds/services/gpayments-service.js +181 -0
  41. package/lib/canvas-3ds/services/gpayments-service.js.map +1 -0
  42. package/{bundles/types → lib}/canvas-3ds/services/index.d.ts +0 -1
  43. package/lib/canvas-3ds/services/index.js +2 -0
  44. package/lib/canvas-3ds/services/index.js.map +1 -0
  45. package/{bundles/types → lib}/canvas-3ds/services/standalone3ds-service.d.ts +0 -1
  46. package/lib/canvas-3ds/services/standalone3ds-service.js +32 -0
  47. package/lib/canvas-3ds/services/standalone3ds-service.js.map +1 -0
  48. package/{bundles/types → lib}/checkout-button/afterpay/afterpay-checkout-button.d.ts +1 -2
  49. package/lib/checkout-button/afterpay/afterpay-checkout-button.js +50 -0
  50. package/lib/checkout-button/afterpay/afterpay-checkout-button.js.map +1 -0
  51. package/{bundles/types → lib}/checkout-button/afterpay/afterpay.runner.d.ts +0 -1
  52. package/lib/checkout-button/afterpay/afterpay.runner.js +41 -0
  53. package/lib/checkout-button/afterpay/afterpay.runner.js.map +1 -0
  54. package/{bundles/types → lib}/checkout-button/checkout-button.d.ts +1 -2
  55. package/{bundles/types → lib}/checkout-button/checkout-button.interface.d.ts +0 -1
  56. package/lib/checkout-button/checkout-button.interface.js +45 -0
  57. package/lib/checkout-button/checkout-button.interface.js.map +1 -0
  58. package/lib/checkout-button/checkout-button.js +266 -0
  59. package/lib/checkout-button/checkout-button.js.map +1 -0
  60. package/{bundles/types → lib}/checkout-button/checkout-contextual-handler.d.ts +0 -1
  61. package/lib/checkout-button/checkout-contextual-handler.js +75 -0
  62. package/lib/checkout-button/checkout-contextual-handler.js.map +1 -0
  63. package/{bundles/types → lib}/checkout-button/index.d.ts +1 -2
  64. package/lib/checkout-button/index.js +85 -0
  65. package/lib/checkout-button/index.js.map +1 -0
  66. package/{bundles/types → lib}/checkout-button/paypal/paypal-checkout-button.d.ts +1 -2
  67. package/lib/checkout-button/paypal/paypal-checkout-button.js +25 -0
  68. package/lib/checkout-button/paypal/paypal-checkout-button.js.map +1 -0
  69. package/{bundles/types → lib}/checkout-button/paypal/paypal.runner.d.ts +0 -1
  70. package/lib/checkout-button/paypal/paypal.runner.js +14 -0
  71. package/lib/checkout-button/paypal/paypal.runner.js.map +1 -0
  72. package/{bundles/types → lib}/checkout-button/runner/base.runner.d.ts +3 -4
  73. package/lib/checkout-button/runner/base.runner.js +13 -0
  74. package/lib/checkout-button/runner/base.runner.js.map +1 -0
  75. package/{bundles/types → lib}/checkout-button/runner/contextual.runner.d.ts +1 -2
  76. package/lib/checkout-button/runner/contextual.runner.js +40 -0
  77. package/lib/checkout-button/runner/contextual.runner.js.map +1 -0
  78. package/{bundles/types → lib}/checkout-button/runner/index.d.ts +0 -1
  79. package/lib/checkout-button/runner/index.js +11 -0
  80. package/lib/checkout-button/runner/index.js.map +1 -0
  81. package/{bundles/types → lib}/checkout-button/runner/popup.runner.d.ts +1 -2
  82. package/lib/checkout-button/runner/popup.runner.js +68 -0
  83. package/lib/checkout-button/runner/popup.runner.js.map +1 -0
  84. package/{bundles/types → lib}/checkout-button/runner/redirect.runner.d.ts +1 -2
  85. package/lib/checkout-button/runner/redirect.runner.js +15 -0
  86. package/lib/checkout-button/runner/redirect.runner.js.map +1 -0
  87. package/{bundles/types → lib}/checkout-button/zipmoney/zipmoney-checkout-button.d.ts +1 -2
  88. package/lib/checkout-button/zipmoney/zipmoney-checkout-button.js +64 -0
  89. package/lib/checkout-button/zipmoney/zipmoney-checkout-button.js.map +1 -0
  90. package/{bundles/types → lib}/checkout-button/zipmoney/zipmoney-contextual.runner.d.ts +1 -2
  91. package/lib/checkout-button/zipmoney/zipmoney-contextual.runner.js +78 -0
  92. package/lib/checkout-button/zipmoney/zipmoney-contextual.runner.js.map +1 -0
  93. package/{bundles/types → lib}/checkout-button/zipmoney/zipmoney-redirect.runner.d.ts +1 -2
  94. package/lib/checkout-button/zipmoney/zipmoney-redirect.runner.js +49 -0
  95. package/lib/checkout-button/zipmoney/zipmoney-redirect.runner.js.map +1 -0
  96. package/{bundles/types → lib}/checkout-button/zipmoney/zipmoney.config.d.ts +0 -1
  97. package/lib/checkout-button/zipmoney/zipmoney.config.js +4 -0
  98. package/lib/checkout-button/zipmoney/zipmoney.config.js.map +1 -0
  99. package/{bundles/types → lib}/checkout-button/zipmoney/zipmoney.runner.d.ts +1 -2
  100. package/lib/checkout-button/zipmoney/zipmoney.runner.js +23 -0
  101. package/lib/checkout-button/zipmoney/zipmoney.runner.js.map +1 -0
  102. package/{bundles/types → lib}/checkout-button/zipmoney/zipmoney.types.d.ts +0 -1
  103. package/lib/checkout-button/zipmoney/zipmoney.types.js +1 -0
  104. package/lib/checkout-button/zipmoney/zipmoney.types.js.map +1 -0
  105. package/{bundles/types → lib}/components/ability-guard.d.ts +0 -1
  106. package/lib/components/ability-guard.js +44 -0
  107. package/lib/components/ability-guard.js.map +1 -0
  108. package/{bundles/types → lib}/components/background.d.ts +0 -1
  109. package/lib/components/background.js +193 -0
  110. package/lib/components/background.js.map +1 -0
  111. package/{bundles/types → lib}/components/container.d.ts +1 -1
  112. package/lib/components/container.js +63 -0
  113. package/lib/components/container.js.map +1 -0
  114. package/{bundles/types → lib}/components/dispatcher.d.ts +1 -2
  115. package/lib/components/dispatcher.js +39 -0
  116. package/lib/components/dispatcher.js.map +1 -0
  117. package/{bundles/types → lib}/components/element-style.d.ts +1 -2
  118. package/lib/components/element-style.js +52 -0
  119. package/lib/components/element-style.js.map +1 -0
  120. package/{bundles/types → lib}/components/flypay-iframe-event.d.ts +0 -1
  121. package/lib/components/flypay-iframe-event.js +28 -0
  122. package/lib/components/flypay-iframe-event.js.map +1 -0
  123. package/{bundles/types/components/form-interceptor.d.ts → lib/components/form-Interceptor.d.ts} +0 -1
  124. package/lib/components/form-Interceptor.js +38 -0
  125. package/lib/components/form-Interceptor.js.map +1 -0
  126. package/{bundles/types → lib}/components/http-core.d.ts +0 -1
  127. package/lib/components/http-core.js +57 -0
  128. package/lib/components/http-core.js.map +1 -0
  129. package/{bundles/types → lib}/components/iframe-event.d.ts +15 -13
  130. package/lib/components/iframe-event.js +75 -0
  131. package/lib/components/iframe-event.js.map +1 -0
  132. package/{bundles/types → lib}/components/iframe.d.ts +0 -1
  133. package/lib/components/iframe.js +62 -0
  134. package/lib/components/iframe.js.map +1 -0
  135. package/{bundles/types → lib}/components/link.d.ts +1 -2
  136. package/lib/components/link.js +59 -0
  137. package/lib/components/link.js.map +1 -0
  138. package/{bundles/types → lib}/components/loader.d.ts +0 -1
  139. package/lib/components/loader.js +234 -0
  140. package/lib/components/loader.js.map +1 -0
  141. package/{bundles/types → lib}/components/param.d.ts +9 -12
  142. package/lib/components/param.js +147 -0
  143. package/lib/components/param.js.map +1 -0
  144. package/{bundles/types → lib}/components/popup.d.ts +0 -1
  145. package/lib/components/popup.js +104 -0
  146. package/lib/components/popup.js.map +1 -0
  147. package/{bundles/types → lib}/components/storage-dispatcher.d.ts +0 -1
  148. package/lib/components/storage-dispatcher.js +75 -0
  149. package/lib/components/storage-dispatcher.js.map +1 -0
  150. package/{bundles/types → lib}/components/trigger.d.ts +0 -1
  151. package/lib/components/trigger.js +49 -0
  152. package/lib/components/trigger.js.map +1 -0
  153. package/{bundles/types → lib}/components/vault-display-iframe-event.d.ts +0 -1
  154. package/lib/components/vault-display-iframe-event.js +27 -0
  155. package/lib/components/vault-display-iframe-event.js.map +1 -0
  156. package/{bundles/types → lib}/components/wallet-background.d.ts +2 -2
  157. package/lib/components/wallet-background.js +63 -0
  158. package/lib/components/wallet-background.js.map +1 -0
  159. package/{bundles/types → lib}/components/wallet-trigger.d.ts +0 -1
  160. package/lib/components/wallet-trigger.js +27 -0
  161. package/lib/components/wallet-trigger.js.map +1 -0
  162. package/{bundles/types/configs/env/environment.paydock.d.ts → lib/configs/env/env.d.ts} +8 -5
  163. package/lib/configs/env/env.js +117 -0
  164. package/lib/configs/env/env.js.map +1 -0
  165. package/{bundles/types → lib}/configs/sdk.d.ts +2 -3
  166. package/lib/configs/sdk.js +16 -0
  167. package/lib/configs/sdk.js.map +1 -0
  168. package/lib/constants/validators.d.ts +44 -0
  169. package/lib/constants/validators.js +42 -0
  170. package/lib/constants/validators.js.map +1 -0
  171. package/{bundles/types → lib}/external-checkout/builder.d.ts +0 -1
  172. package/lib/external-checkout/builder.js +45 -0
  173. package/lib/external-checkout/builder.js.map +1 -0
  174. package/{bundles/types → lib}/external-checkout/checker.d.ts +0 -1
  175. package/lib/external-checkout/checker.js +22 -0
  176. package/lib/external-checkout/checker.js.map +1 -0
  177. package/lib/external-checkout/index.d.ts +2 -0
  178. package/lib/external-checkout/index.js +3 -0
  179. package/lib/external-checkout/index.js.map +1 -0
  180. package/{bundles/types → lib}/helper/access-token.d.ts +0 -1
  181. package/lib/helper/access-token.js +44 -0
  182. package/lib/helper/access-token.js.map +1 -0
  183. package/{bundles/types → lib}/helper/browser.d.ts +0 -1
  184. package/lib/helper/browser.js +79 -0
  185. package/lib/helper/browser.js.map +1 -0
  186. package/{bundles/types → lib}/helper/event-emitter.d.ts +0 -1
  187. package/lib/helper/event-emitter.js +23 -0
  188. package/lib/helper/event-emitter.js.map +1 -0
  189. package/{bundles/types → lib}/helper/event.d.ts +0 -1
  190. package/lib/helper/event.js +23 -0
  191. package/lib/helper/event.js.map +1 -0
  192. package/{bundles/types → lib}/helper/ms.d.ts +0 -1
  193. package/lib/helper/ms.js +32 -0
  194. package/lib/helper/ms.js.map +1 -0
  195. package/{bundles/types → lib}/helper/object.d.ts +0 -1
  196. package/lib/helper/object.js +6 -0
  197. package/lib/helper/object.js.map +1 -0
  198. package/{bundles/types → lib}/helper/url.d.ts +0 -1
  199. package/lib/helper/url.js +11 -0
  200. package/lib/helper/url.js.map +1 -0
  201. package/{bundles/types → lib}/helper/uuid.d.ts +0 -1
  202. package/lib/helper/uuid.js +26 -0
  203. package/lib/helper/uuid.js.map +1 -0
  204. package/lib/index.d.ts +15 -0
  205. package/lib/index.js +15 -0
  206. package/lib/index.js.map +1 -0
  207. package/{bundles/types → lib}/payment-source/builder.d.ts +0 -1
  208. package/lib/payment-source/builder.js +49 -0
  209. package/lib/payment-source/builder.js.map +1 -0
  210. package/{bundles/types → lib}/payment-source/index.d.ts +0 -1
  211. package/lib/payment-source/index.js +2 -0
  212. package/lib/payment-source/index.js.map +1 -0
  213. package/{bundles/types → lib}/payment-source-widget/html-payment-source-widget.d.ts +17 -14
  214. package/lib/payment-source-widget/html-payment-source-widget.js +172 -0
  215. package/lib/payment-source-widget/html-payment-source-widget.js.map +1 -0
  216. package/{bundles/types → lib}/payment-source-widget/index.d.ts +0 -1
  217. package/lib/payment-source-widget/index.js +35 -0
  218. package/lib/payment-source-widget/index.js.map +1 -0
  219. package/{bundles/types → lib}/payment-source-widget/interfaces.d.ts +0 -1
  220. package/lib/payment-source-widget/interfaces.js +2 -0
  221. package/lib/payment-source-widget/interfaces.js.map +1 -0
  222. package/{bundles/types → lib}/payment-source-widget/payment-source-widget.d.ts +1 -2
  223. package/lib/payment-source-widget/payment-source-widget.js +142 -0
  224. package/lib/payment-source-widget/payment-source-widget.js.map +1 -0
  225. package/{bundles/types → lib}/secure-remote-commerce/index.d.ts +0 -1
  226. package/lib/secure-remote-commerce/index.js +2 -0
  227. package/lib/secure-remote-commerce/index.js.map +1 -0
  228. package/{bundles/types → lib}/secure-remote-commerce/interfaces.d.ts +5 -6
  229. package/lib/secure-remote-commerce/interfaces.js +28 -0
  230. package/lib/secure-remote-commerce/interfaces.js.map +1 -0
  231. package/{bundles/types → lib}/secure-remote-commerce/providers/src-provider.d.ts +0 -1
  232. package/lib/secure-remote-commerce/providers/src-provider.js +1 -0
  233. package/lib/secure-remote-commerce/providers/src-provider.js.map +1 -0
  234. package/{bundles/types → lib}/secure-remote-commerce/providers/visa-src/helper.d.ts +0 -1
  235. package/lib/secure-remote-commerce/providers/visa-src/helper.js +36 -0
  236. package/lib/secure-remote-commerce/providers/visa-src/helper.js.map +1 -0
  237. package/{bundles/types → lib}/secure-remote-commerce/providers/visa-src/index.d.ts +0 -1
  238. package/lib/secure-remote-commerce/providers/visa-src/index.js +2 -0
  239. package/lib/secure-remote-commerce/providers/visa-src/index.js.map +1 -0
  240. package/{bundles/types → lib}/secure-remote-commerce/providers/visa-src/visa-src.d.ts +0 -1
  241. package/lib/secure-remote-commerce/providers/visa-src/visa-src.js +113 -0
  242. package/lib/secure-remote-commerce/providers/visa-src/visa-src.js.map +1 -0
  243. package/{bundles/types → lib}/secure-remote-commerce/providers/visa-src/visa-src.styles.d.ts +0 -1
  244. package/lib/secure-remote-commerce/providers/visa-src/visa-src.styles.js +10 -0
  245. package/lib/secure-remote-commerce/providers/visa-src/visa-src.styles.js.map +1 -0
  246. package/{bundles/types → lib}/secure-remote-commerce/secure-remote-commerce.d.ts +1 -2
  247. package/lib/secure-remote-commerce/secure-remote-commerce.js +239 -0
  248. package/lib/secure-remote-commerce/secure-remote-commerce.js.map +1 -0
  249. package/{bundles/types → lib}/vault-display-widget/index.d.ts +0 -1
  250. package/lib/vault-display-widget/index.js +14 -0
  251. package/lib/vault-display-widget/index.js.map +1 -0
  252. package/{bundles/types → lib}/vault-display-widget/vault-display-widget.d.ts +1 -2
  253. package/lib/vault-display-widget/vault-display-widget.js +99 -0
  254. package/lib/vault-display-widget/vault-display-widget.js.map +1 -0
  255. package/{bundles/types → lib}/wallet-buttons/afterpay.wallet-service.d.ts +0 -1
  256. package/lib/wallet-buttons/afterpay.wallet-service.js +152 -0
  257. package/lib/wallet-buttons/afterpay.wallet-service.js.map +1 -0
  258. package/{bundles/types → lib}/wallet-buttons/apple.wallet-service.d.ts +2 -1
  259. package/lib/wallet-buttons/apple.wallet-service.js +324 -0
  260. package/lib/wallet-buttons/apple.wallet-service.js.map +1 -0
  261. package/{bundles/types → lib}/wallet-buttons/flypay-v2.wallet-service.d.ts +9 -2
  262. package/lib/wallet-buttons/flypay-v2.wallet-service.js +165 -0
  263. package/lib/wallet-buttons/flypay-v2.wallet-service.js.map +1 -0
  264. package/{bundles/types → lib}/wallet-buttons/flypay.wallet-service.d.ts +0 -1
  265. package/lib/wallet-buttons/flypay.wallet-service.js +117 -0
  266. package/lib/wallet-buttons/flypay.wallet-service.js.map +1 -0
  267. package/{bundles/types → lib}/wallet-buttons/google.wallet-service.d.ts +3 -1
  268. package/lib/wallet-buttons/google.wallet-service.js +301 -0
  269. package/lib/wallet-buttons/google.wallet-service.js.map +1 -0
  270. package/lib/wallet-buttons/helpers/flypay-v2.helper.d.ts +3 -0
  271. package/lib/wallet-buttons/helpers/flypay-v2.helper.js +151 -0
  272. package/lib/wallet-buttons/helpers/flypay-v2.helper.js.map +1 -0
  273. package/lib/wallet-buttons/index.d.ts +127 -0
  274. package/lib/wallet-buttons/index.js +128 -0
  275. package/lib/wallet-buttons/index.js.map +1 -0
  276. package/{bundles/types → lib}/wallet-buttons/interfaces.d.ts +3 -1
  277. package/lib/wallet-buttons/interfaces.js +1 -0
  278. package/lib/wallet-buttons/interfaces.js.map +1 -0
  279. package/{bundles/types → lib}/wallet-buttons/mastercard.wallet-service.d.ts +0 -1
  280. package/lib/wallet-buttons/mastercard.wallet-service.js +27 -0
  281. package/lib/wallet-buttons/mastercard.wallet-service.js.map +1 -0
  282. package/{bundles/types → lib}/wallet-buttons/paypal.wallet-service.d.ts +0 -1
  283. package/lib/wallet-buttons/paypal.wallet-service.js +144 -0
  284. package/lib/wallet-buttons/paypal.wallet-service.js.map +1 -0
  285. package/{bundles/types → lib}/wallet-buttons/stripe.wallet-service.d.ts +0 -1
  286. package/lib/wallet-buttons/stripe.wallet-service.js +100 -0
  287. package/lib/wallet-buttons/stripe.wallet-service.js.map +1 -0
  288. package/{bundles/types/wallet-buttons/wallet-cba-buttons.d.ts → lib/wallet-buttons/wallet-buttons.d.ts} +92 -115
  289. package/lib/wallet-buttons/wallet-buttons.js +479 -0
  290. package/lib/wallet-buttons/wallet-buttons.js.map +1 -0
  291. package/{bundles/types → lib}/wallet-buttons/wallet-service.d.ts +7 -1
  292. package/lib/wallet-buttons/wallet-service.js +60 -0
  293. package/lib/wallet-buttons/wallet-service.js.map +1 -0
  294. package/{bundles/types → lib}/widget/configuration.d.ts +2 -3
  295. package/lib/widget/configuration.js +260 -0
  296. package/lib/widget/configuration.js.map +1 -0
  297. package/lib/widget/html-multi-widget.d.ts +336 -0
  298. package/lib/widget/html-multi-widget.js +422 -0
  299. package/lib/widget/html-multi-widget.js.map +1 -0
  300. package/{bundles/types → lib}/widget/html-widget.d.ts +1 -2
  301. package/lib/widget/html-widget.js +127 -0
  302. package/lib/widget/html-widget.js.map +1 -0
  303. package/{bundles/types → lib}/widget/index.d.ts +1 -2
  304. package/lib/widget/index.js +132 -0
  305. package/lib/widget/index.js.map +1 -0
  306. package/{bundles/types → lib}/widget/meta.d.ts +0 -1
  307. package/lib/widget/meta.js +8 -0
  308. package/lib/widget/meta.js.map +1 -0
  309. package/{bundles/types → lib}/widget/multi-widget.d.ts +1 -2
  310. package/lib/widget/multi-widget.js +437 -0
  311. package/lib/widget/multi-widget.js.map +1 -0
  312. package/{bundles/types → lib}/widget/style.d.ts +0 -1
  313. package/lib/widget/style.js +204 -0
  314. package/lib/widget/style.js.map +1 -0
  315. package/package.json +42 -164
  316. package/payment-source-widget.d.ts +1 -0
  317. package/payment-source-widget.js +1 -0
  318. package/slate.md +136 -107
  319. package/tslint.json +129 -0
  320. package/typings/globals/@auspayplus/open-payments-checkout/index.d.ts +43 -0
  321. package/typings/globals/jasmine/index.d.ts +576 -0
  322. package/typings/globals/jasmine-ajax/index.d.ts +83 -0
  323. package/typings/globals/jquery/index.d.ts +3759 -0
  324. package/typings/index.d.ts +4 -0
  325. package/vault-display-widget.d.ts +1 -0
  326. package/vault-display-widget.js +1 -0
  327. package/vendors/zipmoney.d.ts +18 -0
  328. package/vendors/zipmoney.js +2 -0
  329. package/widget.d.ts +1 -0
  330. package/widget.js +1 -0
  331. package/bundles/index.cjs +0 -10674
  332. package/bundles/index.cjs.d.ts +0 -3163
  333. package/bundles/index.cjs.map +0 -1
  334. package/bundles/index.mjs +0 -10642
  335. package/bundles/index.mjs.d.ts +0 -3163
  336. package/bundles/index.mjs.map +0 -1
  337. package/bundles/types/api/api-base.d.ts.map +0 -1
  338. package/bundles/types/api/api-charge-internal.d.ts.map +0 -1
  339. package/bundles/types/api/api-charge.d.ts.map +0 -1
  340. package/bundles/types/api/api-internal.d.ts.map +0 -1
  341. package/bundles/types/api/api-service-internal.d.ts.map +0 -1
  342. package/bundles/types/api/api.d.ts.map +0 -1
  343. package/bundles/types/api/index.d.ts +0 -2
  344. package/bundles/types/api/index.d.ts.map +0 -1
  345. package/bundles/types/canvas-3ds/canvas-3ds.d.ts.map +0 -1
  346. package/bundles/types/canvas-3ds/index.d.ts.map +0 -1
  347. package/bundles/types/canvas-3ds/services/gpayments-service.d.ts.map +0 -1
  348. package/bundles/types/canvas-3ds/services/index.d.ts.map +0 -1
  349. package/bundles/types/canvas-3ds/services/standalone3ds-service.d.ts.map +0 -1
  350. package/bundles/types/checkout-button/afterpay/afterpay-checkout-button.d.ts.map +0 -1
  351. package/bundles/types/checkout-button/afterpay/afterpay.runner.d.ts.map +0 -1
  352. package/bundles/types/checkout-button/checkout-button.d.ts.map +0 -1
  353. package/bundles/types/checkout-button/checkout-button.interface.d.ts.map +0 -1
  354. package/bundles/types/checkout-button/checkout-contextual-handler.d.ts.map +0 -1
  355. package/bundles/types/checkout-button/index.d.ts.map +0 -1
  356. package/bundles/types/checkout-button/paypal/paypal-checkout-button.d.ts.map +0 -1
  357. package/bundles/types/checkout-button/paypal/paypal.runner.d.ts.map +0 -1
  358. package/bundles/types/checkout-button/runner/base.runner.d.ts.map +0 -1
  359. package/bundles/types/checkout-button/runner/contextual.runner.d.ts.map +0 -1
  360. package/bundles/types/checkout-button/runner/index.d.ts.map +0 -1
  361. package/bundles/types/checkout-button/runner/popup.runner.d.ts.map +0 -1
  362. package/bundles/types/checkout-button/runner/redirect.runner.d.ts.map +0 -1
  363. package/bundles/types/checkout-button/zipmoney/index.d.ts +0 -4
  364. package/bundles/types/checkout-button/zipmoney/index.d.ts.map +0 -1
  365. package/bundles/types/checkout-button/zipmoney/zipmoney-checkout-button.d.ts.map +0 -1
  366. package/bundles/types/checkout-button/zipmoney/zipmoney-contextual.runner.d.ts.map +0 -1
  367. package/bundles/types/checkout-button/zipmoney/zipmoney-redirect.runner.d.ts.map +0 -1
  368. package/bundles/types/checkout-button/zipmoney/zipmoney.config.d.ts.map +0 -1
  369. package/bundles/types/checkout-button/zipmoney/zipmoney.runner.d.ts.map +0 -1
  370. package/bundles/types/checkout-button/zipmoney/zipmoney.types.d.ts.map +0 -1
  371. package/bundles/types/components/ability-guard.d.ts.map +0 -1
  372. package/bundles/types/components/background.d.ts.map +0 -1
  373. package/bundles/types/components/container.d.ts.map +0 -1
  374. package/bundles/types/components/dispatcher.d.ts.map +0 -1
  375. package/bundles/types/components/element-style.d.ts.map +0 -1
  376. package/bundles/types/components/flypay-iframe-event.d.ts.map +0 -1
  377. package/bundles/types/components/form-interceptor.d.ts.map +0 -1
  378. package/bundles/types/components/http-core.d.ts.map +0 -1
  379. package/bundles/types/components/iframe-event.d.ts.map +0 -1
  380. package/bundles/types/components/iframe.d.ts.map +0 -1
  381. package/bundles/types/components/link.d.ts.map +0 -1
  382. package/bundles/types/components/loader.d.ts.map +0 -1
  383. package/bundles/types/components/param.d.ts.map +0 -1
  384. package/bundles/types/components/popup.d.ts.map +0 -1
  385. package/bundles/types/components/storage-dispatcher.d.ts.map +0 -1
  386. package/bundles/types/components/trigger.d.ts.map +0 -1
  387. package/bundles/types/components/vault-display-iframe-event.d.ts.map +0 -1
  388. package/bundles/types/components/wallet-background.d.ts.map +0 -1
  389. package/bundles/types/components/wallet-trigger.d.ts.map +0 -1
  390. package/bundles/types/configs/env/environment.cba.d.ts +0 -29
  391. package/bundles/types/configs/env/environment.cba.d.ts.map +0 -1
  392. package/bundles/types/configs/env/environment.interface.d.ts +0 -12
  393. package/bundles/types/configs/env/environment.interface.d.ts.map +0 -1
  394. package/bundles/types/configs/env/environment.paydock.d.ts.map +0 -1
  395. package/bundles/types/configs/env/index.d.ts +0 -3
  396. package/bundles/types/configs/env/index.d.ts.map +0 -1
  397. package/bundles/types/configs/sdk.d.ts.map +0 -1
  398. package/bundles/types/external-checkout/builder.d.ts.map +0 -1
  399. package/bundles/types/external-checkout/checker.d.ts.map +0 -1
  400. package/bundles/types/external-checkout/index.d.ts +0 -3
  401. package/bundles/types/external-checkout/index.d.ts.map +0 -1
  402. package/bundles/types/helper/access-token.d.ts.map +0 -1
  403. package/bundles/types/helper/browser.d.ts.map +0 -1
  404. package/bundles/types/helper/event-emitter.d.ts.map +0 -1
  405. package/bundles/types/helper/event.d.ts.map +0 -1
  406. package/bundles/types/helper/ms.d.ts.map +0 -1
  407. package/bundles/types/helper/object.d.ts.map +0 -1
  408. package/bundles/types/helper/url.d.ts.map +0 -1
  409. package/bundles/types/helper/uuid.d.ts.map +0 -1
  410. package/bundles/types/index-cba.d.ts +0 -13
  411. package/bundles/types/index-cba.d.ts.map +0 -1
  412. package/bundles/types/index.d.ts +0 -14
  413. package/bundles/types/index.d.ts.map +0 -1
  414. package/bundles/types/payment-source/builder.d.ts.map +0 -1
  415. package/bundles/types/payment-source/index.d.ts.map +0 -1
  416. package/bundles/types/payment-source-widget/html-payment-source-widget.d.ts.map +0 -1
  417. package/bundles/types/payment-source-widget/index.d.ts.map +0 -1
  418. package/bundles/types/payment-source-widget/interfaces.d.ts.map +0 -1
  419. package/bundles/types/payment-source-widget/payment-source-widget.d.ts.map +0 -1
  420. package/bundles/types/secure-remote-commerce/index.d.ts.map +0 -1
  421. package/bundles/types/secure-remote-commerce/interfaces.d.ts.map +0 -1
  422. package/bundles/types/secure-remote-commerce/providers/src-provider.d.ts.map +0 -1
  423. package/bundles/types/secure-remote-commerce/providers/visa-src/helper.d.ts.map +0 -1
  424. package/bundles/types/secure-remote-commerce/providers/visa-src/index.d.ts.map +0 -1
  425. package/bundles/types/secure-remote-commerce/providers/visa-src/visa-src.d.ts.map +0 -1
  426. package/bundles/types/secure-remote-commerce/providers/visa-src/visa-src.styles.d.ts.map +0 -1
  427. package/bundles/types/secure-remote-commerce/secure-remote-commerce.d.ts.map +0 -1
  428. package/bundles/types/vault-display-widget/index.d.ts.map +0 -1
  429. package/bundles/types/vault-display-widget/vault-display-widget.d.ts.map +0 -1
  430. package/bundles/types/wallet-buttons/afterpay.wallet-service.d.ts.map +0 -1
  431. package/bundles/types/wallet-buttons/apple.wallet-service.d.ts.map +0 -1
  432. package/bundles/types/wallet-buttons/flypay-v2.wallet-service.d.ts.map +0 -1
  433. package/bundles/types/wallet-buttons/flypay.wallet-service.d.ts.map +0 -1
  434. package/bundles/types/wallet-buttons/google.wallet-service.d.ts.map +0 -1
  435. package/bundles/types/wallet-buttons/index-cba.d.ts +0 -2
  436. package/bundles/types/wallet-buttons/index-cba.d.ts.map +0 -1
  437. package/bundles/types/wallet-buttons/index.d.ts +0 -2
  438. package/bundles/types/wallet-buttons/index.d.ts.map +0 -1
  439. package/bundles/types/wallet-buttons/interfaces.d.ts.map +0 -1
  440. package/bundles/types/wallet-buttons/mastercard.wallet-service.d.ts.map +0 -1
  441. package/bundles/types/wallet-buttons/paypal.wallet-service.d.ts.map +0 -1
  442. package/bundles/types/wallet-buttons/stripe.wallet-service.d.ts.map +0 -1
  443. package/bundles/types/wallet-buttons/wallet-buttons.d.ts +0 -366
  444. package/bundles/types/wallet-buttons/wallet-buttons.d.ts.map +0 -1
  445. package/bundles/types/wallet-buttons/wallet-cba-buttons.d.ts.map +0 -1
  446. package/bundles/types/wallet-buttons/wallet-service.d.ts.map +0 -1
  447. package/bundles/types/widget/configuration.d.ts.map +0 -1
  448. package/bundles/types/widget/html-multi-widget.d.ts +0 -266
  449. package/bundles/types/widget/html-multi-widget.d.ts.map +0 -1
  450. package/bundles/types/widget/html-widget.d.ts.map +0 -1
  451. package/bundles/types/widget/index.d.ts.map +0 -1
  452. package/bundles/types/widget/meta.d.ts.map +0 -1
  453. package/bundles/types/widget/multi-widget.d.ts.map +0 -1
  454. package/bundles/types/widget/style.d.ts.map +0 -1
  455. package/bundles/widget.umd.js.d.ts +0 -3163
  456. package/bundles/widget.umd.js.map +0 -1
  457. package/bundles/widget.umd.js.min.d.ts +0 -3163
  458. package/bundles/widget.umd.min.js.map +0 -1
  459. package/docs/api-canvas3ds.md +0 -158
  460. package/docs/api-checkout-button.md +0 -912
  461. package/docs/api-examples.md +0 -65
  462. package/docs/api-ps-widget.md +0 -585
  463. package/docs/api-vault-display.md +0 -94
  464. package/docs/api-widget.md +0 -2444
  465. package/docs/api-wrapper.md +0 -78
  466. package/docs/canvas3ds-examples.md +0 -242
  467. package/docs/cba-header.md +0 -13
  468. package/docs/cba-license.md +0 -2
  469. package/docs/checkout-examples.md +0 -248
  470. package/docs/header.md +0 -15
  471. package/docs/html/layout.html +0 -78
  472. package/docs/html/marked.js +0 -23
  473. package/docs/html/style.css +0 -365
  474. package/docs/install/npm.content.md +0 -16
  475. package/docs/install/npm.example.md +0 -24
  476. package/docs/install/umd.content.md +0 -20
  477. package/docs/install/umd.example.md +0 -6
  478. package/docs/install.md +0 -43
  479. package/docs/install.readme.t.md +0 -17
  480. package/docs/install.slate.t.md +0 -17
  481. package/docs/license.md +0 -2
  482. package/docs/partials/header.hbs +0 -3
  483. package/docs/ps-examples.md +0 -129
  484. package/docs/secure-remote-commerce-examples.md +0 -258
  485. package/docs/secure-remote-commerce.md +0 -265
  486. package/docs/vault-display-example.md +0 -132
  487. package/docs/wallet-buttons-examples.md +0 -580
  488. package/docs/wallet-buttons.md +0 -424
  489. package/docs/wallet-cba-buttons-examples.md +0 -388
  490. package/docs/widget-examples.md +0 -134
package/README.md CHANGED
@@ -16,78 +16,76 @@ Also you will need added gateway ([see API Reference by gateway](https://docs.pa
16
16
 
17
17
  ## Get started
18
18
 
19
- The Client SDK ships in JavaScript ES6 (EcmaScript 2015) in three different
20
- formats (CJS, ESM and UMD) along with respective TypeScript declarations. Below,
21
- we exemplify how to import each format.
22
-
23
19
  ### With package manager
24
20
 
25
- Our NPM package is compatible with all package managers (e.g., `npm`, `yarn`,
26
- `pnpm`, `bun`). Using `npm` the following command would add the Client SDK as a
27
- production dependency.
21
+ To install with package manager, enter the following command:
28
22
 
29
- ```bash
30
- npm install @paydock/client-sdk
31
- ```
23
+ `npm install @paydock/client-sdk`
32
24
 
33
- After installation is complete, if you are developing in NodeJS environments or
34
- using tools that expect your JavaScript code to be in CJS format (e.g., Jest,
35
- Karma, RequireJS, Webpack), you can import the Client SDK using CommonJS modules.
36
- For these environments the UMD format (`@paydock/client-sdk/bundles/widget.umd.js`)
37
- can also be used as a fallback. Alternatively, in case you are developing in
38
- projects that have access to modern bundlers such as Vite or others (e.g., SPA
39
- libs or SSR Metaframeworks), you can import the Client SDK features using ESM
40
- through named imports or namespaced imports.
41
25
 
26
+ You can use ES2015 or TypeScript modules
42
27
 
43
- ```cjs
44
- // module import - CommonJS/Node projects ✅
45
- const paydock = require('@paydock/client-sdk')
46
- const api = new paydock.Api('publicKey');
47
- ```
28
+ `@paydock/client-sdk/widget`
48
29
 
49
- ```mjs
50
- // named import - ESM projects or TypeScript projects ✅
51
- import { HtmlWidget } from '@paydock/client-sdk'
52
- const widget = new HtmlWidget('#selector', 'publicKey', 'gatewayId');
53
- ```
54
30
 
55
- ```mjs
56
- // namespaced import - ESM projects or TypeScript projects ✅
57
- import * as Paydock from '@paydock/client-sdk'
58
- const widget = new Paydock.HtmlWidget('#selector', 'publicKey', 'gatewayId');
31
+ Also can use UMD module (global visibility, see above)
32
+
33
+ `@paydock/client-sdk/bundles/widget.umd.js`
34
+
35
+ `@paydock/client-sdk/bundles/widget.umd.min.js`
36
+
37
+
38
+
39
+ ```javascript--es2015
40
+ // ES2015 / TypeScript
41
+
42
+ import { HtmlWidget } from '@paydock/client-sdk/widget';
43
+
44
+ let widget = new HtmlWidget('#selector', 'publicKey', 'gatewayId');
59
45
  ```
60
46
 
61
- ```js
62
- // default import - We do not provide default exports. They are handled differently by different tools!
63
-
64
- import paydock from '@paydock/client-sdk'
65
- >>> "Uncaught SyntaxError: The requested module does not provide an export named 'default'"
47
+
48
+ ```html
49
+ <script src="@paydock/client-sdk/bundles/widget.umd.min.js"></script>
50
+ <script>
51
+ var widget = new paydock.HtmlWidget('#tag', 'publicKey', 'gatewayId');
52
+ </script>
66
53
  ```
67
54
 
68
55
 
56
+
69
57
  ### Download from CDN
70
58
 
71
- For browser environments, you can import the Client SDK directly from our CDN to
72
- your project's HTML. To accomplish this, include the Client SDK in your page
73
- using one and only of the two script tags below. After this step you will be
74
- able to access the Client SDK features via the global variable `paydock`.
59
+ You should begin by including the library in your page.
60
+
61
+ Add this script tag to your page to get started with with the url below:
62
+
63
+ *Compressed version for production*
64
+ `https://widget.paydock.com/sdk/latest/widget.umd.min.js`
65
+
66
+ *Full version for development and debug*
67
+ `https://widget.paydock.com/sdk/latest/widget.umd.js`
75
68
 
76
- For production we recommend using the compressed version (`.min.js`) since
77
- it will result in faster loading times for your end users.
78
69
 
79
- - *Compressed version for production: `https://widget.paydock.com/sdk/latest/widget.umd.min.js`*
80
70
 
81
- - *Full version for development and debug: `https://widget.paydock.com/sdk/latest/widget.umd.js`*
82
71
 
83
- You may download the production version of the Client SDK scripts [here][min],
84
- and, the development version [here][max].
72
+ Also can download library the [production version][min] or the [development version][max]
85
73
 
86
74
  [min]: https://widget.paydock.com/sdk/latest/widget.umd.min.js
87
75
  [max]: https://widget.paydock.com/sdk/latest/widget.umd.js
88
76
 
89
- For more advanced use-cases, the library has [UMD](https://github.com/umdjs/umd)
90
- format that can be used in RequireJS, Webpack, etc.
77
+
78
+ The library will always be available via the global variable `paydock`.
79
+
80
+
81
+
82
+ Also for more advanced use, the library has [UMD](https://github.com/umdjs/umd) format, thus can be used in requireJs, webpack, etc.
83
+
84
+
85
+
86
+
87
+
88
+
91
89
 
92
90
 
93
91
  ```html
@@ -97,7 +95,6 @@ format that can be used in RequireJS, Webpack, etc.
97
95
  </script>
98
96
  ```
99
97
 
100
-
101
98
  ## Widget
102
99
  You can find description of all methods and parameters [here](https://www.npmjs.com/package/@paydock/client-sdk#widget-simple-example)
103
100
 
@@ -122,11 +119,11 @@ var widget = new paydock.HtmlWidget('#widget', 'publicKey');
122
119
  widget.load();
123
120
  ```
124
121
 
125
- ```javascript
122
+ ```javascript--es2015
126
123
  // ES2015 | TypeScript
127
124
 
128
- import { HtmlWidget } from '@paydock/client-sdk';
129
-
125
+ import { HtmlWidget } from '@paydock/client-sdk/widget';
126
+
130
127
  var widget = new HtmlWidget('#widget', 'publicKey');
131
128
  widget.load();
132
129
  ```
@@ -134,7 +131,7 @@ widget.load();
134
131
  Then write only need 2 lines of code in js to initialize widget
135
132
 
136
133
 
137
- ### Full example
134
+ ### Full example
138
135
 
139
136
  ```html
140
137
  <!DOCTYPE html>
@@ -197,9 +194,9 @@ widget.setFormFields(['phone', 'email']); // add additional fields for form of w
197
194
  widget.setSupportedCardIcons(['mastercard', 'visa']); // add icons of supported card types
198
195
  ```
199
196
 
200
- This example shows how you can use a lot of other methods to settings your form
197
+ This example shows how you can use a lot of other methods to settings your form
201
198
 
202
- ### Full example
199
+ ### Full example
203
200
 
204
201
  ```html
205
202
  <!DOCTYPE html>
@@ -220,12 +217,12 @@ This example shows how you can use a lot of other methods to settings your form
220
217
  <script src="https://widget.paydock.com/sdk/latest/widget.umd.js" ></script>
221
218
  <script>
222
219
  var widget = new paydock.HtmlWidget('#widget', 'publicKey', 'gatewayId');
223
-
220
+
224
221
  widget.setSupportedCardIcons(['mastercard', 'visa']);
225
222
  widget.setFormFields(['phone', 'email']);
226
223
  widget.setRefId('custom-ref-id');
227
224
  widget.onFinishInsert('input[name="payment_source_token"]', 'payment_source');z
228
-
225
+
229
226
  widget.load();
230
227
  </script>
231
228
  </script>
@@ -286,6 +283,12 @@ This example shows how you can use a lot of other methods to settings your form
286
283
  <dt><a href="#user-content-w_STYLABLE_ELEMENT_STATE">STYLABLE_ELEMENT_STATE</a> : <code>object</code></dt>
287
284
  <dd><p>Current constant include available states of element for styling</p>
288
285
  </dd>
286
+ <dt><a href="#user-content-w_CARD_VALIDATORS">CARD_VALIDATORS</a> : <code>Record.&lt;string, string&gt;</code></dt>
287
+ <dd><p>List of available form field validators dedicated to cards and their definition</p>
288
+ </dd>
289
+ <dt><a href="#user-content-w_GENERIC_VALIDATORS">GENERIC_VALIDATORS</a> : <code>Record.&lt;string, string&gt;</code></dt>
290
+ <dd><p>List of available generic form field validators and their definition</p>
291
+ </dd>
289
292
  <dt><a href="#user-content-w_TRIGGER">TRIGGER</a> : <code>object</code></dt>
290
293
  <dd><p>List of available triggers</p>
291
294
  </dd>
@@ -298,7 +301,8 @@ This example shows how you can use a lot of other methods to settings your form
298
301
  <dd><p>Interface of data from validation event.</p>
299
302
  </dd>
300
303
  <dt><a href="#user-content-w_IEventMetaData">IEventMetaData</a></dt>
301
- <dd><p>Interface of data from event.</p>
304
+ <dd><p>Contains basic information associated with the event and additional meta data
305
+ specific to the event. E.g., card info, gateway info, etc.</p>
302
306
  </dd>
303
307
  <dt><a href="#user-content-w_IEventAfterLoadData">IEventAfterLoadData</a></dt>
304
308
  <dd><p>Interface of data from event.</p>
@@ -347,33 +351,34 @@ Interface of data from validation event.
347
351
 
348
352
  | Param | Type | Description |
349
353
  | --- | --- | --- |
350
- | event | <code>string</code> | Event name |
351
- | purpose | <code>string</code> | System variable. Purpose of event |
352
- | message_source | <code>string</code> | System variable. Event source |
353
- | [ref_id] | <code>string</code> | Custom value for identify result of processed operation |
354
- | [form_valid] | <code>boolean</code> | Form is valid |
355
- | [invalid_fields] | <code>array</code> | Invalid form fields |
356
- | [invalid_showed_fields] | <code>array</code> | List of fields on which the error is already displayed |
357
- | [validators] | <code>array</code> | List of validators with fields |
354
+ | event | <code>string</code> | The name of the event. |
355
+ | message_source | <code>string</code> | A system variable that identifies the event source. |
356
+ | purpose | <code>string</code> | A system variable that states the purpose of the event. |
357
+ | [ref_id] | <code>string</code> | Custom unique value that identifies result of processed operation. |
358
+ | [form_valid] | <code>boolean</code> | Indicates wether or not the form is valid. |
359
+ | [invalid_fields] | <code>Array.&lt;string&gt;</code> | Names of form fields with invalid data. |
360
+ | [invalid_showed_fields] | <code>Array.&lt;string&gt;</code> | Names of invalid form fields which are already displaying the error. |
361
+ | [validators] | <code>Partial.&lt;Record.&lt;(CardValidatorValue\|GenericValidatorValue), Array.&lt;string&gt;&gt;&gt;</code> | Object containing validator identifiers as keys and the fields subject to that validator as an array of form field names. See list of available [Generic Vallidators](#user-content-w_GENERIC_VALIDATORS) and [Card Validators](#user-content-w_CARD_VALIDATORS), |
358
362
 
359
363
  <a name="w_IEventMetaData" id="w_IEventMetaData" href="#user-content-w_IEventMetaData">&nbsp;</a>
360
364
 
361
365
  ## IEventMetaData
362
- Interface of data from event.
366
+ Contains basic information associated with the event and additional meta data
367
+ specific to the event. E.g., card info, gateway info, etc.
363
368
 
364
369
  **Kind**: global interface
365
370
 
366
371
  | Param | Type | Description |
367
372
  | --- | --- | --- |
368
- | event | <code>string</code> | Event name |
369
- | purpose | <code>string</code> | System variable. Purpose of event |
370
- | message_source | <code>string</code> | System variable. Event source |
371
- | [ref_id] | <code>string</code> | Custom value for identify result of processed operation |
373
+ | event | <code>string</code> | The name of the event. |
374
+ | purpose | <code>string</code> | A system variable that states the purpose of the event. |
375
+ | message_source | <code>string</code> | A system variable that identifies the event source. |
376
+ | [ref_id] | <code>string</code> | Custom unique value that identifies result of processed operation. |
372
377
  | configuration_token | <code>string</code> | Token received from our API with widget data |
373
378
  | type | <code>string</code> | Payment type 'card', 'bank_account' |
374
379
  | gateway_type | <code>string</code> | Gateway type |
375
380
  | [card_number_last4] | <code>string</code> | Last 4 digit of your card |
376
- | [card_scheme] | <code>string</code> | Card scheme |
381
+ | [card_scheme] | <code>string</code> | Card scheme, e.g., (Visa, Mastercard and American Express (AmEx)) |
377
382
  | [card_number_length] | <code>number</code> | Card number length |
378
383
  | [account_name] | <code>string</code> | Bank account account name |
379
384
  | [account_number] | <code>string</code> | Bank account account number |
@@ -387,10 +392,10 @@ Interface of data from event.
387
392
 
388
393
  | Param | Type | Description |
389
394
  | --- | --- | --- |
390
- | event | <code>string</code> | Event name |
391
- | purpose | <code>string</code> | System variable. Purpose of event |
392
- | message_source | <code>string</code> | System variable. Event source |
393
- | [ref_id] | <code>string</code> | Custom value for identify result of processed operation |
395
+ | event | <code>string</code> | The name of the event. |
396
+ | purpose | <code>string</code> | A system variable that states the purpose of the event. |
397
+ | message_source | <code>string</code> | A system variable that identifies the event source. |
398
+ | [ref_id] | <code>string</code> | Custom unique value that identifies result of processed operation. |
394
399
 
395
400
  <a name="w_IEventFinishData" id="w_IEventFinishData" href="#user-content-w_IEventFinishData">&nbsp;</a>
396
401
 
@@ -401,10 +406,10 @@ Interface of data from event.
401
406
 
402
407
  | Param | Type | Description |
403
408
  | --- | --- | --- |
404
- | event | <code>string</code> | Event name |
405
- | purpose | <code>string</code> | System variable. Purpose of event |
406
- | message_source | <code>string</code> | System variable. Event source |
407
- | [ref_id] | <code>string</code> | Custom value for identify result of processed operation |
409
+ | event | <code>string</code> | The name of the event. |
410
+ | purpose | <code>string</code> | A system variable that states the purpose of the event. |
411
+ | message_source | <code>string</code> | A system variable that identifies the event source. |
412
+ | [ref_id] | <code>string</code> | Custom unique value that identifies result of processed operation. |
408
413
  | payment_source | <code>string</code> | One time token. Result from this endpoint [API docs](https://docs.paydock.com/#tokens) |
409
414
 
410
415
  <a name="w_IPayPalMeta" id="w_IPayPalMeta" href="#user-content-w_IPayPalMeta">&nbsp;</a>
@@ -618,7 +623,7 @@ Class Widget include method for working on html and include extended by HtmlMult
618
623
  * [.setFormElements(elements)](#user-content-w_HtmlWidget+setFormElements)
619
624
  * [.setMeta(object)](#user-content-w_HtmlWidget+setMeta)
620
625
  * [.load()](#user-content-w_HtmlMultiWidget+load)
621
- * [.on(eventName, [cb])](#user-content-w_HtmlMultiWidget+on) ⇒ <code>Promise.&lt;(IEventData\|IEventMetaData\|IEventFinishData\|IFormValidation)&gt;</code> \| <code>void</code>
626
+ * [.afterLoad()](#user-content-w_HtmlMultiWidget+afterLoad)
622
627
  * [.trigger(triggers, data)](#user-content-w_HtmlMultiWidget+trigger)
623
628
  * [.getValidationState()](#user-content-w_HtmlMultiWidget+getValidationState) ⇒ [<code>IFormValidation</code>](#user-content-w_IFormValidation)
624
629
  * [.isValidForm()](#user-content-w_HtmlMultiWidget+isValidForm) ⇒ <code>boolean</code>
@@ -631,6 +636,7 @@ Class Widget include method for working on html and include extended by HtmlMult
631
636
  * [.hideElements(elements)](#user-content-w_HtmlMultiWidget+hideElements)
632
637
  * [.showElements(elements)](#user-content-w_HtmlMultiWidget+showElements)
633
638
  * [.updateFormValues(fieldValues)](#user-content-w_HtmlMultiWidget+updateFormValues)
639
+ * [.updateFormValue(key, value)](#user-content-w_HtmlMultiWidget+updateFormValue)
634
640
  * [.onFinishInsert(selector, dataType)](#user-content-w_HtmlMultiWidget+onFinishInsert)
635
641
  * [.interceptSubmitForm(selector)](#user-content-w_HtmlMultiWidget+interceptSubmitForm)
636
642
  * [.useCheckoutAutoSubmit()](#user-content-w_HtmlMultiWidget+useCheckoutAutoSubmit)
@@ -642,7 +648,7 @@ Class Widget include method for working on html and include extended by HtmlMult
642
648
  * [.setFormValues(fieldValues)](#user-content-w_MultiWidget+setFormValues)
643
649
  * [.setFormLabels(fieldLabels)](#user-content-w_MultiWidget+setFormLabels)
644
650
  * [.setFormPlaceholders(fieldPlaceholders)](#user-content-w_MultiWidget+setFormPlaceholders)
645
- * ~~[.setIcons()](#user-content-w_MultiWidget+setIcons)~~
651
+ * [.setIcons()](#user-content-w_MultiWidget+setIcons)
646
652
  * [.setHiddenElements(elements)](#user-content-w_MultiWidget+setHiddenElements)
647
653
  * [.setRefId(refId)](#user-content-w_MultiWidget+setRefId)
648
654
  * [.useGatewayFieldValidation()](#user-content-w_MultiWidget+useGatewayFieldValidation)
@@ -795,51 +801,38 @@ config.setMeta({
795
801
  <a name="w_HtmlMultiWidget+load" id="w_HtmlMultiWidget+load" href="#user-content-w_HtmlMultiWidget+load">&nbsp;</a>
796
802
 
797
803
  ### htmlWidget.load()
798
- The final method to beginning, the load process of widget to html
804
+ Loads the widget.
805
+
806
+ Calling this method results in an iframe element being inserted and rendered in the DOM.
799
807
 
800
808
  **Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
801
809
  **Overrides**: [<code>load</code>](#user-content-w_HtmlMultiWidget+load)
802
- <a name="w_HtmlMultiWidget+on" id="w_HtmlMultiWidget+on" href="#user-content-w_HtmlMultiWidget+on">&nbsp;</a>
810
+ <a name="w_HtmlMultiWidget+afterLoad" id="w_HtmlMultiWidget+afterLoad" href="#user-content-w_HtmlMultiWidget+afterLoad">&nbsp;</a>
803
811
 
804
- ### htmlWidget.on(eventName, [cb]) ⇒ <code>Promise.&lt;(IEventData\|IEventMetaData\|IEventFinishData\|IFormValidation)&gt;</code> \| <code>void</code>
805
- Listen to events of widget
812
+ ### htmlWidget.afterLoad()
813
+ Registers a form validation callback for validation events.
806
814
 
807
815
  **Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
808
- **Overrides**: [<code>on</code>](#user-content-w_HtmlMultiWidget+on)
809
-
810
- | Param | Type | Description |
811
- | --- | --- | --- |
812
- | eventName | <code>string</code> | Available event names [EVENT](#user-content-w_EVENT) |
813
- | [cb] | <code>listener</code> | |
814
-
815
- **Example**
816
-
817
- ```javascript
818
- widget.on('form_submit', function (data) {
819
- console.log(data);
820
- });
821
- // or
822
- widget.on('form_submit').then(function (data) {
823
- console.log(data);
824
- });
825
- ```
816
+ **Overrides**: [<code>afterLoad</code>](#user-content-w_HtmlMultiWidget+afterLoad)
826
817
  <a name="w_HtmlMultiWidget+trigger" id="w_HtmlMultiWidget+trigger" href="#user-content-w_HtmlMultiWidget+trigger">&nbsp;</a>
827
818
 
828
819
  ### htmlWidget.trigger(triggers, data)
829
- This callback will be called for every trigger
820
+ Registers callback that will be invoked for every trigger.
830
821
 
831
822
  **Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
832
823
  **Overrides**: [<code>trigger</code>](#user-content-w_HtmlMultiWidget+trigger)
833
824
 
834
825
  | Param | Type | Description |
835
826
  | --- | --- | --- |
836
- | triggers | <code>triggerName</code> | submit_form, tab |
837
- | data | [<code>ITriggerData</code>](#user-content-w_ITriggerData) | which will be sending to widget |
827
+ | triggers | <code>&#x27;submit\_form&#x27;</code> \| <code>&#x27;tab&#x27;</code> | The Widget element identifier that caused the trigger. |
828
+ | data | [<code>ITriggerData</code>](#user-content-w_ITriggerData) | Data that will be sent to the widget when the trigger occurs. |
838
829
 
839
830
  <a name="w_HtmlMultiWidget+getValidationState" id="w_HtmlMultiWidget+getValidationState" href="#user-content-w_HtmlMultiWidget+getValidationState">&nbsp;</a>
840
831
 
841
832
  ### htmlWidget.getValidationState() ⇒ [<code>IFormValidation</code>](#user-content-w_IFormValidation)
842
- Using this method you can get validation state information
833
+ Gets a reference to the form current validation state.
834
+
835
+ !Warning: do not directly modify the values of the returned object.
843
836
 
844
837
  **Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
845
838
  **Overrides**: [<code>getValidationState</code>](#user-content-w_HtmlMultiWidget+getValidationState)
@@ -847,11 +840,13 @@ Using this method you can get validation state information
847
840
  <a name="w_HtmlMultiWidget+isValidForm" id="w_HtmlMultiWidget+isValidForm" href="#user-content-w_HtmlMultiWidget+isValidForm">&nbsp;</a>
848
841
 
849
842
  ### htmlWidget.isValidForm() ⇒ <code>boolean</code>
850
- Using this method you can check if the form is valid
843
+ Checks if a given form is valid.
844
+
845
+ A form is valid if all form fields are valid.
851
846
 
852
847
  **Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
853
848
  **Overrides**: [<code>isValidForm</code>](#user-content-w_HtmlMultiWidget+isValidForm)
854
- **Returns**: <code>boolean</code> - Form is valid
849
+ **Returns**: <code>boolean</code> - Indicates wether or not form is valid.
855
850
  <a name="w_HtmlMultiWidget+isInvalidField" id="w_HtmlMultiWidget+isInvalidField" href="#user-content-w_HtmlMultiWidget+isInvalidField">&nbsp;</a>
856
851
 
857
852
  ### htmlWidget.isInvalidField(field) ⇒ <code>boolean</code>
@@ -868,92 +863,96 @@ Using this method you can check if a specific form field is invalid
868
863
  <a name="w_HtmlMultiWidget+isFieldErrorShowed" id="w_HtmlMultiWidget+isFieldErrorShowed" href="#user-content-w_HtmlMultiWidget+isFieldErrorShowed">&nbsp;</a>
869
864
 
870
865
  ### htmlWidget.isFieldErrorShowed(field) ⇒ <code>boolean</code>
871
- Using this method you can check if an error is displayed on a specific field
866
+ Checks if a given form field is displaying an error.
872
867
 
873
868
  **Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
874
869
  **Overrides**: [<code>isFieldErrorShowed</code>](#user-content-w_HtmlMultiWidget+isFieldErrorShowed)
875
- **Returns**: <code>boolean</code> - Error is showed on field
870
+ **Returns**: <code>boolean</code> - Indicates wether or not the Error message is being displayed on the associated field.
876
871
 
877
872
  | Param | Type | Description |
878
873
  | --- | --- | --- |
879
- | field | <code>string</code> | Field name |
874
+ | field | <code>string</code> | The form field name |
880
875
 
881
876
  <a name="w_HtmlMultiWidget+isInvalidFieldByValidator" id="w_HtmlMultiWidget+isInvalidFieldByValidator" href="#user-content-w_HtmlMultiWidget+isInvalidFieldByValidator">&nbsp;</a>
882
877
 
883
878
  ### htmlWidget.isInvalidFieldByValidator(field, validator) ⇒ <code>boolean</code>
884
- Using this method you can check if a specific field is invalid
879
+ Checks if a given form field is valid or invalid by name.
885
880
 
886
881
  **Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
887
882
  **Overrides**: [<code>isInvalidFieldByValidator</code>](#user-content-w_HtmlMultiWidget+isInvalidFieldByValidator)
888
- **Returns**: <code>boolean</code> - Field is invalid by validator
883
+ **Returns**: <code>boolean</code> - Indicates wether or not the field is invalid based on validator intepretation.
889
884
 
890
885
  | Param | Type | Description |
891
886
  | --- | --- | --- |
892
- | field | <code>string</code> | Field name |
893
- | validator | <code>string</code> | Validator name. Available validators: `required, cardNumberValidator, expireDateValidation` |
887
+ | field | <code>string</code> | The form field name |
888
+ | validator | | The name of the validator. |
894
889
 
895
890
  <a name="w_HtmlMultiWidget+hide" id="w_HtmlMultiWidget+hide" href="#user-content-w_HtmlMultiWidget+hide">&nbsp;</a>
896
891
 
897
892
  ### htmlWidget.hide([saveSize])
898
- Using this method you can hide widget after load
893
+ Hides the widget.
894
+
895
+ E.g., use this method to hide the widget after it loads.
899
896
 
900
897
  **Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
901
898
  **Overrides**: [<code>hide</code>](#user-content-w_HtmlMultiWidget+hide)
902
899
 
903
900
  | Param | Type | Default | Description |
904
901
  | --- | --- | --- | --- |
905
- | [saveSize] | <code>boolean</code> | <code>false</code> | using this param you can save iframe's size |
902
+ | [saveSize] | <code>boolean</code> | <code>false</code> | Wether the original iframe element size should be saved before being hidden. |
906
903
 
907
904
  <a name="w_HtmlMultiWidget+show" id="w_HtmlMultiWidget+show" href="#user-content-w_HtmlMultiWidget+show">&nbsp;</a>
908
905
 
909
906
  ### htmlWidget.show()
910
- Using this method you can show widget after using hide method
907
+ Shows the widget.
908
+
909
+ E.g., use this method to show the widget after it was explicitly hidden.
911
910
 
912
911
  **Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
913
912
  **Overrides**: [<code>show</code>](#user-content-w_HtmlMultiWidget+show)
914
913
  <a name="w_HtmlMultiWidget+reload" id="w_HtmlMultiWidget+reload" href="#user-content-w_HtmlMultiWidget+reload">&nbsp;</a>
915
914
 
916
915
  ### htmlWidget.reload()
917
- Using this method you can reload widget
916
+ Reloads the widget.
918
917
 
919
918
  **Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
920
919
  **Overrides**: [<code>reload</code>](#user-content-w_HtmlMultiWidget+reload)
921
920
  <a name="w_HtmlMultiWidget+hideElements" id="w_HtmlMultiWidget+hideElements" href="#user-content-w_HtmlMultiWidget+hideElements">&nbsp;</a>
922
921
 
923
922
  ### htmlWidget.hideElements(elements)
924
- Using this method you can hide any elements inside widget
923
+ Hides the specified Widget elements by their identifier.
925
924
 
926
925
  **Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
927
926
  **Overrides**: [<code>hideElements</code>](#user-content-w_HtmlMultiWidget+hideElements)
928
927
 
929
928
  | Param | Type | Description |
930
929
  | --- | --- | --- |
931
- | elements | <code>Array.&lt;string&gt;</code> | list of element which can be hidden [ELEMENT](#user-content-w_ELEMENT) || [FORM_FIELD](#user-content-w_FORM_FIELD) |
930
+ | elements | <code>Array.&lt;string&gt;</code> | List of element which can be hidden [ELEMENT](#user-content-w_ELEMENT) || [FORM_FIELD](#user-content-w_FORM_FIELD) |
932
931
 
933
932
  **Example**
934
-
935
933
  ```javascript
936
934
  widget.hideElements(['submit_button', 'email']);
937
935
  ```
938
936
  <a name="w_HtmlMultiWidget+showElements" id="w_HtmlMultiWidget+showElements" href="#user-content-w_HtmlMultiWidget+showElements">&nbsp;</a>
939
937
 
940
938
  ### htmlWidget.showElements(elements)
941
- Using this method you can show any elements inside widget
942
-
943
- * @example
944
- widget.showElements(['submit_button', 'email']);
939
+ Shows the specified Widget elements by their identifier.
945
940
 
946
941
  **Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
947
942
  **Overrides**: [<code>showElements</code>](#user-content-w_HtmlMultiWidget+showElements)
948
943
 
949
944
  | Param | Type | Description |
950
945
  | --- | --- | --- |
951
- | elements | <code>Array.&lt;string&gt;</code> | list of element which can be showed [ELEMENT](#user-content-w_ELEMENT) || [FORM_FIELD](#user-content-w_FORM_FIELD) |
946
+ | elements | <code>Array.&lt;string&gt;</code> | List of elements which can be showed [ELEMENT](#user-content-w_ELEMENT) || [FORM_FIELD](#user-content-w_FORM_FIELD) |
952
947
 
948
+ **Example**
949
+ ```javascript
950
+ widget.showElements(['submit_button', 'email']);
951
+ ```
953
952
  <a name="w_HtmlMultiWidget+updateFormValues" id="w_HtmlMultiWidget+updateFormValues" href="#user-content-w_HtmlMultiWidget+updateFormValues">&nbsp;</a>
954
953
 
955
954
  ### htmlWidget.updateFormValues(fieldValues)
956
- Method for update values for form fields inside the widget
955
+ Updates the form field values inside the widget.
957
956
 
958
957
  **Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
959
958
  **Overrides**: [<code>updateFormValues</code>](#user-content-w_HtmlMultiWidget+updateFormValues)
@@ -963,53 +962,71 @@ Method for update values for form fields inside the widget
963
962
  | fieldValues | <code>IFormValues</code> | Fields with values |
964
963
 
965
964
  **Example**
966
-
967
965
  ```javascript
968
966
  widget.updateFormValues({
969
- email: 'predefined@email.com',
970
- card_name: 'Houston'
971
- });
967
+ email: 'predefined@email.com',
968
+ card_name: 'Houston'
969
+ });
970
+ ```
971
+ <a name="w_HtmlMultiWidget+updateFormValue" id="w_HtmlMultiWidget+updateFormValue" href="#user-content-w_HtmlMultiWidget+updateFormValue">&nbsp;</a>
972
+
973
+ ### htmlWidget.updateFormValue(key, value)
974
+ Updates a single form field values inside the widget by the form field name.
975
+
976
+ **Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
977
+ **Overrides**: [<code>updateFormValue</code>](#user-content-w_HtmlMultiWidget+updateFormValue)
978
+
979
+ | Param | Type | Description |
980
+ | --- | --- | --- |
981
+ | key | <code>string</code> | The form field name |
982
+ | value | <code>string</code> | The form field value |
983
+
984
+ **Example**
985
+ ```javascript
986
+ widget.updateFormValue("card_name", "John Doe");
972
987
  ```
973
988
  <a name="w_HtmlMultiWidget+onFinishInsert" id="w_HtmlMultiWidget+onFinishInsert" href="#user-content-w_HtmlMultiWidget+onFinishInsert">&nbsp;</a>
974
989
 
975
990
  ### htmlWidget.onFinishInsert(selector, dataType)
976
- After finish event of widget, data (dataType) will be insert to input (selector)
991
+ Inserts the event data (after finish event) onto the input field associated with the provided CSS selector.
977
992
 
978
993
  **Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
979
994
  **Overrides**: [<code>onFinishInsert</code>](#user-content-w_HtmlMultiWidget+onFinishInsert)
980
995
 
981
996
  | Param | Type | Description |
982
997
  | --- | --- | --- |
983
- | selector | <code>string</code> | css selector . [] # |
984
- | dataType | <code>string</code> | data type of IEventData object. |
998
+ | selector | <code>string</code> | A CSS selector. E.g., ".my-class", "#my-id", or others |
999
+ | dataType | <code>string</code> | The data type of IEventData object. |
985
1000
 
986
1001
  <a name="w_HtmlMultiWidget+interceptSubmitForm" id="w_HtmlMultiWidget+interceptSubmitForm" href="#user-content-w_HtmlMultiWidget+interceptSubmitForm">&nbsp;</a>
987
1002
 
988
1003
  ### htmlWidget.interceptSubmitForm(selector)
989
- Widget will intercept submit of your form for processing widget
1004
+ Intercepts a form submission and delegates processing to the widget.
990
1005
 
991
- Process: click by submit button in your form --> submit widget ---> submit your form
1006
+ An simplified example of the process:
1007
+ - User clicks submit button in your form
1008
+ - This implicitly triggers a submission to the widget
1009
+ - The widget submits your form
992
1010
 
993
1011
  **Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
994
1012
  **Overrides**: [<code>interceptSubmitForm</code>](#user-content-w_HtmlMultiWidget+interceptSubmitForm)
995
- **Note**: submit button in widget will be hidden.
1013
+ **Note**: The widget's submit button will be hidden.
996
1014
 
997
1015
  | Param | Type | Description |
998
1016
  | --- | --- | --- |
999
1017
  | selector | <code>string</code> | css selector of your form |
1000
1018
 
1001
1019
  **Example**
1002
-
1003
- ```javascript
1004
- <form id="myForm">
1020
+ ```html
1021
+ <body>
1022
+ <form id="myForm">
1005
1023
  <input name="amount">
1006
1024
  <button type="submit">Submit</button>
1007
1025
  </form>
1008
- <!--
1009
- -->
1010
- <script>
1026
+ <script>
1011
1027
  widget.interceptSubmitForm('#myForm');
1012
- </script>
1028
+ </script>
1029
+ </body>
1013
1030
  ```
1014
1031
  <a name="w_HtmlMultiWidget+useCheckoutAutoSubmit" id="w_HtmlMultiWidget+useCheckoutAutoSubmit" href="#user-content-w_HtmlMultiWidget+useCheckoutAutoSubmit">&nbsp;</a>
1015
1032
 
@@ -1026,7 +1043,6 @@ Use this method for resize iFrame according content height
1026
1043
  **Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
1027
1044
  **Overrides**: [<code>useAutoResize</code>](#user-content-w_HtmlMultiWidget+useAutoResize)
1028
1045
  **Example**
1029
-
1030
1046
  ```javascript
1031
1047
  widget.useAutoResize();
1032
1048
  ```
@@ -1197,13 +1213,15 @@ widget.setFormPlaceholders({
1197
1213
  ```
1198
1214
  <a name="w_MultiWidget+setIcons" id="w_MultiWidget+setIcons" href="#user-content-w_MultiWidget+setIcons">&nbsp;</a>
1199
1215
 
1200
- ### ~~htmlWidget.setIcons()~~
1201
- ***Deprecated***
1202
-
1216
+ ### htmlWidget.setIcons()
1203
1217
  The method to change the widget icons
1204
1218
 
1205
1219
  **Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
1206
1220
  **Overrides**: [<code>setIcons</code>](#user-content-w_MultiWidget+setIcons)
1221
+ **Todo**
1222
+
1223
+ - [ ] DEPRECATED
1224
+
1207
1225
  <a name="w_MultiWidget+setHiddenElements" id="w_MultiWidget+setHiddenElements" href="#user-content-w_MultiWidget+setHiddenElements">&nbsp;</a>
1208
1226
 
1209
1227
  ### htmlWidget.setHiddenElements(elements)
@@ -1331,7 +1349,7 @@ Class HtmlMultiWidget include method for working with html
1331
1349
  * [HtmlMultiWidget](#user-content-w_HtmlMultiWidget) ⇐ [<code>MultiWidget</code>](#user-content-w_MultiWidget)
1332
1350
  * [new HtmlMultiWidget(selector, publicKey, conf)](#user-content-w_new_HtmlMultiWidget_new)
1333
1351
  * [.load()](#user-content-w_HtmlMultiWidget+load)
1334
- * [.on(eventName, [cb])](#user-content-w_HtmlMultiWidget+on) ⇒ <code>Promise.&lt;(IEventData\|IEventMetaData\|IEventFinishData\|IFormValidation)&gt;</code> \| <code>void</code>
1352
+ * [.afterLoad()](#user-content-w_HtmlMultiWidget+afterLoad)
1335
1353
  * [.trigger(triggers, data)](#user-content-w_HtmlMultiWidget+trigger)
1336
1354
  * [.getValidationState()](#user-content-w_HtmlMultiWidget+getValidationState) ⇒ [<code>IFormValidation</code>](#user-content-w_IFormValidation)
1337
1355
  * [.isValidForm()](#user-content-w_HtmlMultiWidget+isValidForm) ⇒ <code>boolean</code>
@@ -1344,6 +1362,7 @@ Class HtmlMultiWidget include method for working with html
1344
1362
  * [.hideElements(elements)](#user-content-w_HtmlMultiWidget+hideElements)
1345
1363
  * [.showElements(elements)](#user-content-w_HtmlMultiWidget+showElements)
1346
1364
  * [.updateFormValues(fieldValues)](#user-content-w_HtmlMultiWidget+updateFormValues)
1365
+ * [.updateFormValue(key, value)](#user-content-w_HtmlMultiWidget+updateFormValue)
1347
1366
  * [.onFinishInsert(selector, dataType)](#user-content-w_HtmlMultiWidget+onFinishInsert)
1348
1367
  * [.interceptSubmitForm(selector)](#user-content-w_HtmlMultiWidget+interceptSubmitForm)
1349
1368
  * [.useCheckoutAutoSubmit()](#user-content-w_HtmlMultiWidget+useCheckoutAutoSubmit)
@@ -1356,7 +1375,7 @@ Class HtmlMultiWidget include method for working with html
1356
1375
  * [.setFormLabels(fieldLabels)](#user-content-w_MultiWidget+setFormLabels)
1357
1376
  * [.setFormPlaceholders(fieldPlaceholders)](#user-content-w_MultiWidget+setFormPlaceholders)
1358
1377
  * [.setFormElements(elements)](#user-content-w_MultiWidget+setFormElements)
1359
- * ~~[.setIcons()](#user-content-w_MultiWidget+setIcons)~~
1378
+ * [.setIcons()](#user-content-w_MultiWidget+setIcons)
1360
1379
  * [.setHiddenElements(elements)](#user-content-w_MultiWidget+setHiddenElements)
1361
1380
  * [.setRefId(refId)](#user-content-w_MultiWidget+setRefId)
1362
1381
  * [.useGatewayFieldValidation()](#user-content-w_MultiWidget+useGatewayFieldValidation)
@@ -1394,58 +1413,47 @@ var widget = new MultiWidget('#widget', 'publicKey',[ With Configurations
1394
1413
  <a name="w_HtmlMultiWidget+load" id="w_HtmlMultiWidget+load" href="#user-content-w_HtmlMultiWidget+load">&nbsp;</a>
1395
1414
 
1396
1415
  ### htmlMultiWidget.load()
1397
- The final method to beginning, the load process of widget to html
1398
-
1399
- **Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
1400
- <a name="w_HtmlMultiWidget+on" id="w_HtmlMultiWidget+on" href="#user-content-w_HtmlMultiWidget+on">&nbsp;</a>
1416
+ Loads the widget.
1401
1417
 
1402
- ### htmlMultiWidget.on(eventName, [cb]) <code>Promise.&lt;(IEventData\|IEventMetaData\|IEventFinishData\|IFormValidation)&gt;</code> \| <code>void</code>
1403
- Listen to events of widget
1418
+ Calling this method results in an iframe element being inserted and rendered in the DOM.
1404
1419
 
1405
1420
  **Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
1421
+ <a name="w_HtmlMultiWidget+afterLoad" id="w_HtmlMultiWidget+afterLoad" href="#user-content-w_HtmlMultiWidget+afterLoad">&nbsp;</a>
1406
1422
 
1407
- | Param | Type | Description |
1408
- | --- | --- | --- |
1409
- | eventName | <code>string</code> | Available event names [EVENT](#user-content-w_EVENT) |
1410
- | [cb] | <code>listener</code> | |
1411
-
1412
- **Example**
1423
+ ### htmlMultiWidget.afterLoad()
1424
+ Registers a form validation callback for validation events.
1413
1425
 
1414
- ```javascript
1415
- widget.on('form_submit', function (data) {
1416
- console.log(data);
1417
- });
1418
- // or
1419
- widget.on('form_submit').then(function (data) {
1420
- console.log(data);
1421
- });
1422
- ```
1426
+ **Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
1423
1427
  <a name="w_HtmlMultiWidget+trigger" id="w_HtmlMultiWidget+trigger" href="#user-content-w_HtmlMultiWidget+trigger">&nbsp;</a>
1424
1428
 
1425
1429
  ### htmlMultiWidget.trigger(triggers, data)
1426
- This callback will be called for every trigger
1430
+ Registers callback that will be invoked for every trigger.
1427
1431
 
1428
1432
  **Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
1429
1433
 
1430
1434
  | Param | Type | Description |
1431
1435
  | --- | --- | --- |
1432
- | triggers | <code>triggerName</code> | submit_form, tab |
1433
- | data | [<code>ITriggerData</code>](#user-content-w_ITriggerData) | which will be sending to widget |
1436
+ | triggers | <code>&#x27;submit\_form&#x27;</code> \| <code>&#x27;tab&#x27;</code> | The Widget element identifier that caused the trigger. |
1437
+ | data | [<code>ITriggerData</code>](#user-content-w_ITriggerData) | Data that will be sent to the widget when the trigger occurs. |
1434
1438
 
1435
1439
  <a name="w_HtmlMultiWidget+getValidationState" id="w_HtmlMultiWidget+getValidationState" href="#user-content-w_HtmlMultiWidget+getValidationState">&nbsp;</a>
1436
1440
 
1437
1441
  ### htmlMultiWidget.getValidationState() ⇒ [<code>IFormValidation</code>](#user-content-w_IFormValidation)
1438
- Using this method you can get validation state information
1442
+ Gets a reference to the form current validation state.
1443
+
1444
+ !Warning: do not directly modify the values of the returned object.
1439
1445
 
1440
1446
  **Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
1441
1447
  **Returns**: [<code>IFormValidation</code>](#user-content-w_IFormValidation) - Form validation object
1442
1448
  <a name="w_HtmlMultiWidget+isValidForm" id="w_HtmlMultiWidget+isValidForm" href="#user-content-w_HtmlMultiWidget+isValidForm">&nbsp;</a>
1443
1449
 
1444
1450
  ### htmlMultiWidget.isValidForm() ⇒ <code>boolean</code>
1445
- Using this method you can check if the form is valid
1451
+ Checks if a given form is valid.
1452
+
1453
+ A form is valid if all form fields are valid.
1446
1454
 
1447
1455
  **Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
1448
- **Returns**: <code>boolean</code> - Form is valid
1456
+ **Returns**: <code>boolean</code> - Indicates wether or not form is valid.
1449
1457
  <a name="w_HtmlMultiWidget+isInvalidField" id="w_HtmlMultiWidget+isInvalidField" href="#user-content-w_HtmlMultiWidget+isInvalidField">&nbsp;</a>
1450
1458
 
1451
1459
  ### htmlMultiWidget.isInvalidField(field) ⇒ <code>boolean</code>
@@ -1461,85 +1469,89 @@ Using this method you can check if a specific form field is invalid
1461
1469
  <a name="w_HtmlMultiWidget+isFieldErrorShowed" id="w_HtmlMultiWidget+isFieldErrorShowed" href="#user-content-w_HtmlMultiWidget+isFieldErrorShowed">&nbsp;</a>
1462
1470
 
1463
1471
  ### htmlMultiWidget.isFieldErrorShowed(field) ⇒ <code>boolean</code>
1464
- Using this method you can check if an error is displayed on a specific field
1472
+ Checks if a given form field is displaying an error.
1465
1473
 
1466
1474
  **Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
1467
- **Returns**: <code>boolean</code> - Error is showed on field
1475
+ **Returns**: <code>boolean</code> - Indicates wether or not the Error message is being displayed on the associated field.
1468
1476
 
1469
1477
  | Param | Type | Description |
1470
1478
  | --- | --- | --- |
1471
- | field | <code>string</code> | Field name |
1479
+ | field | <code>string</code> | The form field name |
1472
1480
 
1473
1481
  <a name="w_HtmlMultiWidget+isInvalidFieldByValidator" id="w_HtmlMultiWidget+isInvalidFieldByValidator" href="#user-content-w_HtmlMultiWidget+isInvalidFieldByValidator">&nbsp;</a>
1474
1482
 
1475
1483
  ### htmlMultiWidget.isInvalidFieldByValidator(field, validator) ⇒ <code>boolean</code>
1476
- Using this method you can check if a specific field is invalid
1484
+ Checks if a given form field is valid or invalid by name.
1477
1485
 
1478
1486
  **Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
1479
- **Returns**: <code>boolean</code> - Field is invalid by validator
1487
+ **Returns**: <code>boolean</code> - Indicates wether or not the field is invalid based on validator intepretation.
1480
1488
 
1481
1489
  | Param | Type | Description |
1482
1490
  | --- | --- | --- |
1483
- | field | <code>string</code> | Field name |
1484
- | validator | <code>string</code> | Validator name. Available validators: `required, cardNumberValidator, expireDateValidation` |
1491
+ | field | <code>string</code> | The form field name |
1492
+ | validator | | The name of the validator. |
1485
1493
 
1486
1494
  <a name="w_HtmlMultiWidget+hide" id="w_HtmlMultiWidget+hide" href="#user-content-w_HtmlMultiWidget+hide">&nbsp;</a>
1487
1495
 
1488
1496
  ### htmlMultiWidget.hide([saveSize])
1489
- Using this method you can hide widget after load
1497
+ Hides the widget.
1498
+
1499
+ E.g., use this method to hide the widget after it loads.
1490
1500
 
1491
1501
  **Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
1492
1502
 
1493
1503
  | Param | Type | Default | Description |
1494
1504
  | --- | --- | --- | --- |
1495
- | [saveSize] | <code>boolean</code> | <code>false</code> | using this param you can save iframe's size |
1505
+ | [saveSize] | <code>boolean</code> | <code>false</code> | Wether the original iframe element size should be saved before being hidden. |
1496
1506
 
1497
1507
  <a name="w_HtmlMultiWidget+show" id="w_HtmlMultiWidget+show" href="#user-content-w_HtmlMultiWidget+show">&nbsp;</a>
1498
1508
 
1499
1509
  ### htmlMultiWidget.show()
1500
- Using this method you can show widget after using hide method
1510
+ Shows the widget.
1511
+
1512
+ E.g., use this method to show the widget after it was explicitly hidden.
1501
1513
 
1502
1514
  **Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
1503
1515
  <a name="w_HtmlMultiWidget+reload" id="w_HtmlMultiWidget+reload" href="#user-content-w_HtmlMultiWidget+reload">&nbsp;</a>
1504
1516
 
1505
1517
  ### htmlMultiWidget.reload()
1506
- Using this method you can reload widget
1518
+ Reloads the widget.
1507
1519
 
1508
1520
  **Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
1509
1521
  <a name="w_HtmlMultiWidget+hideElements" id="w_HtmlMultiWidget+hideElements" href="#user-content-w_HtmlMultiWidget+hideElements">&nbsp;</a>
1510
1522
 
1511
1523
  ### htmlMultiWidget.hideElements(elements)
1512
- Using this method you can hide any elements inside widget
1524
+ Hides the specified Widget elements by their identifier.
1513
1525
 
1514
1526
  **Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
1515
1527
 
1516
1528
  | Param | Type | Description |
1517
1529
  | --- | --- | --- |
1518
- | elements | <code>Array.&lt;string&gt;</code> | list of element which can be hidden [ELEMENT](#user-content-w_ELEMENT) || [FORM_FIELD](#user-content-w_FORM_FIELD) |
1530
+ | elements | <code>Array.&lt;string&gt;</code> | List of element which can be hidden [ELEMENT](#user-content-w_ELEMENT) || [FORM_FIELD](#user-content-w_FORM_FIELD) |
1519
1531
 
1520
1532
  **Example**
1521
-
1522
1533
  ```javascript
1523
1534
  widget.hideElements(['submit_button', 'email']);
1524
1535
  ```
1525
1536
  <a name="w_HtmlMultiWidget+showElements" id="w_HtmlMultiWidget+showElements" href="#user-content-w_HtmlMultiWidget+showElements">&nbsp;</a>
1526
1537
 
1527
1538
  ### htmlMultiWidget.showElements(elements)
1528
- Using this method you can show any elements inside widget
1529
-
1530
- * @example
1531
- widget.showElements(['submit_button', 'email']);
1539
+ Shows the specified Widget elements by their identifier.
1532
1540
 
1533
1541
  **Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
1534
1542
 
1535
1543
  | Param | Type | Description |
1536
1544
  | --- | --- | --- |
1537
- | elements | <code>Array.&lt;string&gt;</code> | list of element which can be showed [ELEMENT](#user-content-w_ELEMENT) || [FORM_FIELD](#user-content-w_FORM_FIELD) |
1545
+ | elements | <code>Array.&lt;string&gt;</code> | List of elements which can be showed [ELEMENT](#user-content-w_ELEMENT) || [FORM_FIELD](#user-content-w_FORM_FIELD) |
1538
1546
 
1547
+ **Example**
1548
+ ```javascript
1549
+ widget.showElements(['submit_button', 'email']);
1550
+ ```
1539
1551
  <a name="w_HtmlMultiWidget+updateFormValues" id="w_HtmlMultiWidget+updateFormValues" href="#user-content-w_HtmlMultiWidget+updateFormValues">&nbsp;</a>
1540
1552
 
1541
1553
  ### htmlMultiWidget.updateFormValues(fieldValues)
1542
- Method for update values for form fields inside the widget
1554
+ Updates the form field values inside the widget.
1543
1555
 
1544
1556
  **Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
1545
1557
 
@@ -1548,51 +1560,68 @@ Method for update values for form fields inside the widget
1548
1560
  | fieldValues | <code>IFormValues</code> | Fields with values |
1549
1561
 
1550
1562
  **Example**
1551
-
1552
1563
  ```javascript
1553
1564
  widget.updateFormValues({
1554
- email: 'predefined@email.com',
1555
- card_name: 'Houston'
1556
- });
1565
+ email: 'predefined@email.com',
1566
+ card_name: 'Houston'
1567
+ });
1568
+ ```
1569
+ <a name="w_HtmlMultiWidget+updateFormValue" id="w_HtmlMultiWidget+updateFormValue" href="#user-content-w_HtmlMultiWidget+updateFormValue">&nbsp;</a>
1570
+
1571
+ ### htmlMultiWidget.updateFormValue(key, value)
1572
+ Updates a single form field values inside the widget by the form field name.
1573
+
1574
+ **Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
1575
+
1576
+ | Param | Type | Description |
1577
+ | --- | --- | --- |
1578
+ | key | <code>string</code> | The form field name |
1579
+ | value | <code>string</code> | The form field value |
1580
+
1581
+ **Example**
1582
+ ```javascript
1583
+ widget.updateFormValue("card_name", "John Doe");
1557
1584
  ```
1558
1585
  <a name="w_HtmlMultiWidget+onFinishInsert" id="w_HtmlMultiWidget+onFinishInsert" href="#user-content-w_HtmlMultiWidget+onFinishInsert">&nbsp;</a>
1559
1586
 
1560
1587
  ### htmlMultiWidget.onFinishInsert(selector, dataType)
1561
- After finish event of widget, data (dataType) will be insert to input (selector)
1588
+ Inserts the event data (after finish event) onto the input field associated with the provided CSS selector.
1562
1589
 
1563
1590
  **Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
1564
1591
 
1565
1592
  | Param | Type | Description |
1566
1593
  | --- | --- | --- |
1567
- | selector | <code>string</code> | css selector . [] # |
1568
- | dataType | <code>string</code> | data type of IEventData object. |
1594
+ | selector | <code>string</code> | A CSS selector. E.g., ".my-class", "#my-id", or others |
1595
+ | dataType | <code>string</code> | The data type of IEventData object. |
1569
1596
 
1570
1597
  <a name="w_HtmlMultiWidget+interceptSubmitForm" id="w_HtmlMultiWidget+interceptSubmitForm" href="#user-content-w_HtmlMultiWidget+interceptSubmitForm">&nbsp;</a>
1571
1598
 
1572
1599
  ### htmlMultiWidget.interceptSubmitForm(selector)
1573
- Widget will intercept submit of your form for processing widget
1600
+ Intercepts a form submission and delegates processing to the widget.
1574
1601
 
1575
- Process: click by submit button in your form --> submit widget ---> submit your form
1602
+ An simplified example of the process:
1603
+ - User clicks submit button in your form
1604
+ - This implicitly triggers a submission to the widget
1605
+ - The widget submits your form
1576
1606
 
1577
1607
  **Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
1578
- **Note**: submit button in widget will be hidden.
1608
+ **Note**: The widget's submit button will be hidden.
1579
1609
 
1580
1610
  | Param | Type | Description |
1581
1611
  | --- | --- | --- |
1582
1612
  | selector | <code>string</code> | css selector of your form |
1583
1613
 
1584
1614
  **Example**
1585
-
1586
- ```javascript
1587
- <form id="myForm">
1615
+ ```html
1616
+ <body>
1617
+ <form id="myForm">
1588
1618
  <input name="amount">
1589
1619
  <button type="submit">Submit</button>
1590
1620
  </form>
1591
- <!--
1592
- -->
1593
- <script>
1621
+ <script>
1594
1622
  widget.interceptSubmitForm('#myForm');
1595
- </script>
1623
+ </script>
1624
+ </body>
1596
1625
  ```
1597
1626
  <a name="w_HtmlMultiWidget+useCheckoutAutoSubmit" id="w_HtmlMultiWidget+useCheckoutAutoSubmit" href="#user-content-w_HtmlMultiWidget+useCheckoutAutoSubmit">&nbsp;</a>
1598
1627
 
@@ -1607,7 +1636,6 @@ Use this method for resize iFrame according content height
1607
1636
 
1608
1637
  **Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
1609
1638
  **Example**
1610
-
1611
1639
  ```javascript
1612
1640
  widget.useAutoResize();
1613
1641
  ```
@@ -1813,13 +1841,15 @@ widget.setFormElements([
1813
1841
  ```
1814
1842
  <a name="w_MultiWidget+setIcons" id="w_MultiWidget+setIcons" href="#user-content-w_MultiWidget+setIcons">&nbsp;</a>
1815
1843
 
1816
- ### ~~htmlMultiWidget.setIcons()~~
1817
- ***Deprecated***
1818
-
1844
+ ### htmlMultiWidget.setIcons()
1819
1845
  The method to change the widget icons
1820
1846
 
1821
1847
  **Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
1822
1848
  **Overrides**: [<code>setIcons</code>](#user-content-w_MultiWidget+setIcons)
1849
+ **Todo**
1850
+
1851
+ - [ ] DEPRECATED
1852
+
1823
1853
  <a name="w_MultiWidget+setHiddenElements" id="w_MultiWidget+setHiddenElements" href="#user-content-w_MultiWidget+setHiddenElements">&nbsp;</a>
1824
1854
 
1825
1855
  ### htmlMultiWidget.setHiddenElements(elements)
@@ -2132,7 +2162,7 @@ Class MultiWidget include method for for creating iframe url
2132
2162
  * [.setFormLabels(fieldLabels)](#user-content-w_MultiWidget+setFormLabels)
2133
2163
  * [.setFormPlaceholders(fieldPlaceholders)](#user-content-w_MultiWidget+setFormPlaceholders)
2134
2164
  * [.setFormElements(elements)](#user-content-w_MultiWidget+setFormElements)
2135
- * ~~[.setIcons()](#user-content-w_MultiWidget+setIcons)~~
2165
+ * [.setIcons()](#user-content-w_MultiWidget+setIcons)
2136
2166
  * [.setHiddenElements(elements)](#user-content-w_MultiWidget+setHiddenElements)
2137
2167
  * [.setRefId(refId)](#user-content-w_MultiWidget+setRefId)
2138
2168
  * [.useGatewayFieldValidation()](#user-content-w_MultiWidget+useGatewayFieldValidation)
@@ -2358,12 +2388,14 @@ widget.setFormElements([
2358
2388
  ```
2359
2389
  <a name="w_MultiWidget+setIcons" id="w_MultiWidget+setIcons" href="#user-content-w_MultiWidget+setIcons">&nbsp;</a>
2360
2390
 
2361
- ### ~~multiWidget.setIcons()~~
2362
- ***Deprecated***
2363
-
2391
+ ### multiWidget.setIcons()
2364
2392
  The method to change the widget icons
2365
2393
 
2366
2394
  **Kind**: instance method of [<code>MultiWidget</code>](#user-content-w_MultiWidget)
2395
+ **Todo**
2396
+
2397
+ - [ ] DEPRECATED
2398
+
2367
2399
  <a name="w_MultiWidget+setHiddenElements" id="w_MultiWidget+setHiddenElements" href="#user-content-w_MultiWidget+setHiddenElements">&nbsp;</a>
2368
2400
 
2369
2401
  ### multiWidget.setHiddenElements(elements)
@@ -2660,6 +2692,32 @@ Current constant include available states of element for styling
2660
2692
  | FOCUS | <code>string</code> | <code>&quot;focus&quot;</code> | focus. This state applies to: input |
2661
2693
  | HOVER | <code>string</code> | <code>&quot;hover&quot;</code> | focus. This state applies to: submit_button |
2662
2694
 
2695
+ <a name="w_CARD_VALIDATORS" id="w_CARD_VALIDATORS" href="#user-content-w_CARD_VALIDATORS">&nbsp;</a>
2696
+
2697
+ ## CARD\_VALIDATORS : <code>Record.&lt;string, string&gt;</code>
2698
+ List of available form field validators dedicated to cards and their definition
2699
+
2700
+ **Kind**: global constant
2701
+
2702
+ | Param | Type | Default | Description |
2703
+ | --- | --- | --- | --- |
2704
+ | CVV | <code>string</code> | <code>&quot;cardCvvValidation&quot;</code> | Asserts that CVV contains zero or more digits and is a number |
2705
+ | EXPIRY_DATE | <code>string</code> | <code>&quot;expireDateValidation&quot;</code> | Asserts value is a date in the future with format MM/YY |
2706
+ | HOLDER_NAME | <code>string</code> | <code>&quot;cardHoldernameValidation&quot;</code> | Asserts value is a name that respects the ITU-T T.50 standard (@see https://www.itu.int/rec/T-REC-T.50/en) |
2707
+ | NUMBER | <code>string</code> | <code>&quot;cardNumberValidation&quot;</code> | Asserts the value matches a known card scheme and as a the correct length. E.g., matches a 13, 16 or 19 digit bank card, **or**, a 13 to 25 digit Vii Gift card |
2708
+ | PIN | <code>string</code> | <code>&quot;cardPinValidation&quot;</code> | Asserts the value is a number with exactly 4 digits |
2709
+
2710
+ <a name="w_GENERIC_VALIDATORS" id="w_GENERIC_VALIDATORS" href="#user-content-w_GENERIC_VALIDATORS">&nbsp;</a>
2711
+
2712
+ ## GENERIC\_VALIDATORS : <code>Record.&lt;string, string&gt;</code>
2713
+ List of available generic form field validators and their definition
2714
+
2715
+ **Kind**: global constant
2716
+
2717
+ | Param | Type | Default | Description |
2718
+ | --- | --- | --- | --- |
2719
+ | REQUIRED | <code>string</code> | <code>&quot;required&quot;</code> | Asserts the input or form field has a value defined truthy value |
2720
+
2663
2721
  <a name="w_TRIGGER" id="w_TRIGGER" href="#user-content-w_TRIGGER">&nbsp;</a>
2664
2722
 
2665
2723
  ## TRIGGER : <code>object</code>
@@ -2707,10 +2765,10 @@ var list = new paydock.HtmlPaymentSourceWidget('#list', 'publicKey', 'queryToken
2707
2765
  list.load();
2708
2766
  ```
2709
2767
 
2710
- ```javascript
2768
+ ```javascript--es2015
2711
2769
  // ES2015 | TypeScript
2712
2770
 
2713
- import { HtmlPaymentSourceWidget } from '@paydock/client-sdk';
2771
+ import { HtmlPaymentSourceWidget } from '@paydock/client-sdk/payment-source-widget';
2714
2772
 
2715
2773
  var list = new HtmlPaymentSourceWidget('#list', 'publicKey', 'queryToken');
2716
2774
  list.load();
@@ -2916,10 +2974,10 @@ Interface of data from event.
2916
2974
 
2917
2975
  | Param | Type | Description |
2918
2976
  | --- | --- | --- |
2919
- | event | <code>string</code> | Event name |
2920
- | purpose | <code>string</code> | System variable. Purpose of event |
2921
- | message_source | <code>string</code> | System variable. Event source |
2922
- | [ref_id] | <code>string</code> | Custom value for identify result of processed operation |
2977
+ | event | <code>string</code> | The name of the event. |
2978
+ | purpose | <code>string</code> | A system variable that states the purpose of the event. |
2979
+ | message_source | <code>string</code> | A system variable that identifies the event source. |
2980
+ | [ref_id] | <code>string</code> | Custom unique value that identifies result of processed operation. |
2923
2981
  | total_item | <code>number</code> | Pagination param. Total item count |
2924
2982
  | skip | <code>number</code> | Pagination param. Skip items from first item |
2925
2983
  | limit | <code>number</code> | Pagination param. Query limit |
@@ -2933,10 +2991,10 @@ Interface of data from event.
2933
2991
 
2934
2992
  | Param | Type | Description |
2935
2993
  | --- | --- | --- |
2936
- | event | <code>string</code> | Event name |
2937
- | purpose | <code>string</code> | System variable. Purpose of event |
2938
- | message_source | <code>string</code> | System variable. Event source |
2939
- | [ref_id] | <code>string</code> | Custom value for identify result of processed operation |
2994
+ | event | <code>string</code> | The name of the event. |
2995
+ | purpose | <code>string</code> | A system variable that states the purpose of the event. |
2996
+ | message_source | <code>string</code> | A system variable that identifies the event source. |
2997
+ | [ref_id] | <code>string</code> | Custom unique value that identifies result of processed operation. |
2940
2998
 
2941
2999
  <a name="psw_IEventSizeData" id="psw_IEventSizeData" href="#user-content-psw_IEventSizeData">&nbsp;</a>
2942
3000
 
@@ -2947,10 +3005,10 @@ Interface of data from event.
2947
3005
 
2948
3006
  | Param | Type | Description |
2949
3007
  | --- | --- | --- |
2950
- | event | <code>number</code> | Event name |
2951
- | purpose | <code>number</code> | System variable. Purpose of event |
2952
- | message_source | <code>string</code> | System variable. Event source |
2953
- | [ref_id] | <code>string</code> | Custom value for identify result of processed operation |
3008
+ | event | <code>number</code> | The name of the event. |
3009
+ | purpose | <code>number</code> | A system variable that states the purpose of the event. |
3010
+ | message_source | <code>string</code> | A system variable that identifies the event source. |
3011
+ | [ref_id] | <code>string</code> | Custom unique value that identifies result of processed operation. |
2954
3012
  | height | <code>number</code> | Height of iFrame |
2955
3013
  | width | <code>number</code> | Width of iFrame |
2956
3014
 
@@ -3423,7 +3481,7 @@ You must create a button to turn it into checkout-button
3423
3481
  var button = new paydock.PaypalCheckoutButton('#button', 'publicKey', 'gatewayId');
3424
3482
  ```
3425
3483
 
3426
- ```javascript
3484
+ ```javascript--es2015
3427
3485
  // ES2015 | TypeScript
3428
3486
 
3429
3487
 
@@ -4566,11 +4624,11 @@ This wrapper helps you to work with paydock api emdpoints
4566
4624
  var browserDetails = await new paydock.Api('publicKey').setEnv('env').getBrowserDetails();
4567
4625
  ```
4568
4626
 
4569
- ```javascript
4627
+ ```javascript--es2015
4570
4628
  // ES2015 | TypeScript
4571
4629
 
4572
- import { Api } from '@paydock/client-sdk';
4573
-
4630
+ import { Api } from '@paydock/client-sdk/api';
4631
+
4574
4632
  var browserDetails = await new paydock.Api('publicKey').setEnv('env').getBrowserDetails();
4575
4633
  ```
4576
4634
 
@@ -4583,11 +4641,11 @@ var response = await new paydock.Api('publicKey').setEnv('env').charge().preAuth
4583
4641
  });
4584
4642
  ```
4585
4643
 
4586
- ```javascript
4644
+ ```javascript--es2015
4587
4645
  // ES2015 | TypeScript
4588
4646
 
4589
- import { Api } from '@paydock/client-sdk';
4590
-
4647
+ import { Api } from '@paydock/client-sdk/api';
4648
+
4591
4649
  var response = await new Api('publicKey').setEnv('env').charge().preAuth({
4592
4650
  amount: 100,
4593
4651
  currency: 'AUD',
@@ -4597,7 +4655,7 @@ var response = await new Api('publicKey').setEnv('env').charge().preAuth({
4597
4655
 
4598
4656
  Then write only need 2 lines of code in js to make request
4599
4657
 
4600
- ### Initialization full example
4658
+ ### Initialization full example
4601
4659
 
4602
4660
  ```html
4603
4661
  <!DOCTYPE html>
@@ -4644,10 +4702,10 @@ var canvas3ds = new paydock.Canvas3ds('#widget', 'token');
4644
4702
  canvas3ds.load();
4645
4703
  ```
4646
4704
 
4647
- ```javascript
4705
+ ```javascript--es2015
4648
4706
  // ES2015 | TypeScript
4649
4707
 
4650
- import { Canvas3ds } from '@paydock/client-sdk';
4708
+ import { Canvas3ds } from '@paydock/client-sdk/canvas3ds';
4651
4709
 
4652
4710
  var list = new Canvas3ds('#widget', 'token');
4653
4711
  list.load();
@@ -4868,7 +4926,7 @@ After you initialized the standalone 3ds charge via `v1/charges/standalone-3ds`
4868
4926
  ## Vault Display Widget
4869
4927
  You can find description of all methods and parameters [here](https://www.npmjs.com/package/@paydock/client-sdk#vault-display-widget)
4870
4928
 
4871
- The vault display form allows viewing card number and CVV. The form can be customised according to your needs.
4929
+ The vault display form allows viewing card number and CVV. The form can be customised according to your needs.
4872
4930
  You can set styles as well as subscribe to widget events that help monitor user’s actions in real time.
4873
4931
 
4874
4932
  ## Vault Display Widget simple example
@@ -4888,18 +4946,18 @@ var widget = new paydock.VaultDisplayWidget('#widget', 'token');
4888
4946
  widget.load();
4889
4947
  ```
4890
4948
 
4891
- ```javascript
4949
+ ```javascript--es2015
4892
4950
  // ES2015 | TypeScript
4893
4951
 
4894
- import { VaultDisplayWidget } from '@paydock/client-sdk';
4895
-
4952
+ import { VaultDisplayWidget } from '@paydock/client-sdk/vault-display-widget';
4953
+
4896
4954
  var widget = new VaultDisplayWidget('#widget', 'token');
4897
4955
  widget.load();
4898
4956
  ```
4899
4957
 
4900
4958
  Then write only need 2 lines of code in js to initialize widget
4901
4959
 
4902
- ### Full example
4960
+ ### Full example
4903
4961
 
4904
4962
  ```html
4905
4963
  <!DOCTYPE html>
@@ -4910,9 +4968,9 @@ Then write only need 2 lines of code in js to initialize widget
4910
4968
  <style>iframe {border: 0;width: 100%;height: 300px;}</style>
4911
4969
  </head>
4912
4970
  <body>
4913
-
4971
+
4914
4972
  <div id="widget"></div>
4915
-
4973
+
4916
4974
  <script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js" ></script>
4917
4975
  <script>
4918
4976
  var widget = new paydock.VaultDisplayWidget('#widget', 'token');
@@ -4950,9 +5008,9 @@ widget.setStyles({
4950
5008
  });
4951
5009
  ```
4952
5010
 
4953
- This example shows how you can use a lot of other methods to settings your form
5011
+ This example shows how you can use a lot of other methods to settings your form
4954
5012
 
4955
- ### Full example
5013
+ ### Full example
4956
5014
 
4957
5015
  ```html
4958
5016
  <!DOCTYPE html>
@@ -4963,27 +5021,27 @@ This example shows how you can use a lot of other methods to settings your form
4963
5021
  <style>iframe {border: 0;width: 40%;height: 450px;}</style>
4964
5022
  </head>
4965
5023
  <body>
4966
-
5024
+
4967
5025
  <div id="widget"></div>
4968
-
5026
+
4969
5027
  <script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js" ></script>
4970
5028
  <script>
4971
5029
  var widget = new paydock.VaultDisplayWidget('#widget', 'token');
4972
5030
 
4973
5031
  widget.setEnv('sandbox');
4974
-
5032
+
4975
5033
  widget.on('after_load', function (data) {
4976
5034
  console.log(data);
4977
5035
  });
4978
-
5036
+
4979
5037
  widget.on('cvv_secure_code_requested', function (data) {
4980
5038
  console.log(data);
4981
5039
  });
4982
-
5040
+
4983
5041
  widget.on('card_number_secure_code_requested', function (data) {
4984
5042
  console.log(data);
4985
5043
  });
4986
-
5044
+
4987
5045
  widget.setStyles({
4988
5046
  background_color: 'rgb(0, 0, 0)',
4989
5047
  border_color: 'yellow',
@@ -5127,7 +5185,7 @@ let button = new paydock.WalletButtons(
5127
5185
  button.load();
5128
5186
  ```
5129
5187
 
5130
- ```javascript
5188
+ ```javascript--es2015
5131
5189
  // ES2015 | TypeScript
5132
5190
  import { WalletButtons } from '@paydock/client-sdk';
5133
5191
 
@@ -5152,7 +5210,7 @@ let button = new paydock.WalletButtons(
5152
5210
  button.load();
5153
5211
  ```
5154
5212
 
5155
- ```javascript
5213
+ ```javascript--es2015
5156
5214
  // ES2015 | TypeScript
5157
5215
  import { WalletButtons } from '@paydock/client-sdk';
5158
5216
 
@@ -5176,7 +5234,7 @@ let button = new paydock.WalletButtons(
5176
5234
  button.load();
5177
5235
  ```
5178
5236
 
5179
- ```javascript
5237
+ ```javascript--es2015
5180
5238
  // ES2015 | TypeScript
5181
5239
  import { WalletButtons } from '@paydock/client-sdk';
5182
5240
 
@@ -5245,6 +5303,14 @@ In some situations you may want to forcibly close the checkout so that your user
5245
5303
  button.close();
5246
5304
  ```
5247
5305
 
5306
+ ### Performing actions when the wallet button is clicked
5307
+
5308
+ In some situations you may want to perform some validations or actions when the user clicks on the wallet button, for which you can use this method. Currently supported by Paypal, ApplePay and GooglePay wallets.
5309
+
5310
+ ```javascript
5311
+ button.onClick(() => console.log("Perform actions on button click"));
5312
+ ```
5313
+
5248
5314
  ### Performing actions when shipping info is updated
5249
5315
 
5250
5316
  In Flypay, Paypal, ApplePay via MPGS and GooglePay via MPGS integrations after each shipping info update the `onUpdate(data)` will be called with the selected shipping address information, plus selected shipping method when applicable for Paypal, ApplePay and GooglePay. Merchants should handle this callback, recalculate shipping costs in their server by analyzing the new data, and submit a backend to backend request to `POST charges/:id` with the new total amount and shipping amount (you can find the documentation of this call in the PayDock API documentation).
@@ -5372,30 +5438,51 @@ _(Required `meta` fields: - . Optional `meta` fields: `request_shipping`, `pay_l
5372
5438
  <script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js" ></script>
5373
5439
  <script>
5374
5440
  let button = new paydock.WalletButtons(
5375
- "#widget",
5376
- charge_token,
5377
- {
5378
- request_shipping: true,
5379
- pay_later: true,
5380
- standalone: false,
5381
- style: {
5382
- layout: 'horizontal',
5383
- color: 'blue',
5384
- shape: 'rect',
5385
- label: 'paypal',
5386
- },
5387
- }
5388
- );
5441
+ "#widget",
5442
+ charge_token,
5443
+ {
5444
+ request_shipping: true,
5445
+ pay_later: true,
5446
+ standalone: false,
5447
+ style: {
5448
+ layout: 'horizontal',
5449
+ color: 'blue',
5450
+ shape: 'rect',
5451
+ label: 'paypal',
5452
+ },
5453
+ }
5454
+ );
5389
5455
  button.setEnv('sandbox');
5390
5456
  button.onUnavailable(() => console.log("No wallet buttons available"));
5391
5457
  button.onUpdate((data) => {
5392
- console.log("Updating amount via a backend to backend call to POST charges/:id");
5393
- // call `POST charges/:id` to modify charge
5394
- button.update({ success: true });
5395
- });
5458
+ console.log("Updating amount via a backend to backend call to POST charges/:id");
5459
+ // call `POST charges/:id` to modify charge
5460
+ button.update({ success: true });
5461
+ });
5396
5462
  button.onPaymentSuccessful((data) => console.log("The payment was successful"));
5397
5463
  button.onPaymentError((data) => console.log("The payment was not successful"));
5398
5464
  button.onPaymentInReview((data) => console.log("The payment is on fraud review"));
5465
+
5466
+ // Example 1: Asynchronous onClick handler
5467
+ const asyncLogic = async () => {
5468
+ // Perform asynchronous logic. Expectation is that a Promise is returned and attached to response via `attachResult`,
5469
+ // and resolve or reject of it will dictate how wallet behaves.
5470
+ }
5471
+
5472
+ button.onClick(({ data: { attachResult } }) => {
5473
+ // Promise is attached to the result. On Paypal, when promise is resolved, the user Journey will continue.
5474
+ // If no promise is attached then the Paypal journey will not depend on the promise being resolved or rejected
5475
+ attachResult(asyncLogic());
5476
+ });
5477
+
5478
+ // Example 2: Synchronous onClick handler
5479
+ // button.onClick(({ data: { attachResult } }) => {
5480
+ // // Perform synchronous logic
5481
+ // console.log("Synchronous onClick: Button clicked");
5482
+ // // Optionally return a boolean flag to halt the operation
5483
+ // attachResult(false);
5484
+ // });
5485
+
5399
5486
  button.load();
5400
5487
  </script>
5401
5488
  </html>
@@ -5529,6 +5616,7 @@ _(Required `meta` fields: `amount_label`, `country`. Optional `meta` fields: `ra
5529
5616
  button.onUnavailable(() => console.log("No wallet buttons available"));
5530
5617
  button.onPaymentSuccessful((data) => console.log("The payment was successful"));
5531
5618
  button.onPaymentError((data) => console.log("The payment was not successful"));
5619
+ button.onClick(() => console.log("On WalletButton Click"));
5532
5620
  button.onUpdate((data) => {
5533
5621
  console.log("Updating amount via a backend to backend call to POST charges/:id");
5534
5622
  // call `POST charges/:id` to modify charge
@@ -5561,7 +5649,6 @@ _(Required `meta` fields: `amount_label`, `country`. Optional `meta` fields: `ra
5561
5649
  Also, for **ApplePay via MPGS** you can initialize the `ApplePayPaymentRequest` with your own values instead of using the default ones. Below you can see an example on how to initialize the `ApplePayPaymentRequest` with the `raw_data_initialization` meta field.
5562
5650
 
5563
5651
  Similarly, for **GooglePay via MPGS** you can initialize the `PaymentMethodSpecification` with your own values instead of using the default ones. Below you can see an example on how to initialize the `PaymentMethodSpecification` with the `raw_data_initialization` meta field.
5564
-
5565
5652
  ### ApplePay and GooglePay via MPGS Raw data initialization example
5566
5653
 
5567
5654
  ```html
@@ -5693,6 +5780,24 @@ Similarly, for **GooglePay via MPGS** you can initialize the `PaymentMethodSpeci
5693
5780
  ## Interfaces
5694
5781
 
5695
5782
  <dl>
5783
+ <dt><a href="#IEventData">IEventData</a></dt>
5784
+ <dd><p>Interface of data from events.</p>
5785
+ </dd>
5786
+ <dt><a href="#IWalletPaymentSuccessful">IWalletPaymentSuccessful</a></dt>
5787
+ <dd><p>Interface of data from a successful payment result.</p>
5788
+ </dd>
5789
+ <dt><a href="#IWalletUpdate">IWalletUpdate</a></dt>
5790
+ <dd><p>Interface of data from an update event.</p>
5791
+ </dd>
5792
+ <dt><a href="#IWalletOnClick">IWalletOnClick</a></dt>
5793
+ <dd><p>Interface of data from a wallet onClick event.</p>
5794
+ </dd>
5795
+ <dt><a href="#IWalletUnavailable">IWalletUnavailable</a></dt>
5796
+ <dd><p>Interface of data from an unavailable event.</p>
5797
+ </dd>
5798
+ <dt><a href="#IWalletUpdateData">IWalletUpdateData</a></dt>
5799
+ <dd><p>Interface of data for wallet button <code>update</code> call.</p>
5800
+ </dd>
5696
5801
  <dt><a href="#IWalletMeta">IWalletMeta</a> : <code>object</code></dt>
5697
5802
  <dd><p>Interface of data used by the wallet checkout and payment proccess.</p>
5698
5803
  </dd>
@@ -5707,6 +5812,100 @@ Similarly, for **GooglePay via MPGS** you can initialize the `PaymentMethodSpeci
5707
5812
  </dd>
5708
5813
  </dl>
5709
5814
 
5815
+ <a name="IEventData" id="IEventData" href="#IEventData">&nbsp;</a>
5816
+
5817
+ ## IEventData
5818
+ Interface of data from events.
5819
+
5820
+ **Kind**: global interface
5821
+
5822
+ | Param | Type |
5823
+ | --- | --- |
5824
+ | event | <code>string</code> |
5825
+ | data | <code>void</code> \| [<code>IWalletPaymentSuccessful</code>](#IWalletPaymentSuccessful) \| [<code>IWalletUpdate</code>](#IWalletUpdate) \| [<code>IWalletUnavailable</code>](#IWalletUnavailable) \| [<code>IWalletOnClick</code>](#IWalletOnClick) \| <code>any</code> |
5826
+
5827
+ <a name="IWalletPaymentSuccessful" id="IWalletPaymentSuccessful" href="#IWalletPaymentSuccessful">&nbsp;</a>
5828
+
5829
+ ## IWalletPaymentSuccessful
5830
+ Interface of data from a successful payment result.
5831
+
5832
+ **Kind**: global interface
5833
+
5834
+ | Param | Type |
5835
+ | --- | --- |
5836
+ | id | <code>string</code> |
5837
+ | amount | <code>number</code> |
5838
+ | currency | <code>string</code> |
5839
+ | status | <code>string</code> |
5840
+ | [payer_name] | <code>string</code> |
5841
+ | [payer_email] | <code>string</code> |
5842
+ | [payer_phone] | <code>string</code> |
5843
+
5844
+ <a name="IWalletUpdate" id="IWalletUpdate" href="#IWalletUpdate">&nbsp;</a>
5845
+
5846
+ ## IWalletUpdate
5847
+ Interface of data from an update event.
5848
+
5849
+ **Kind**: global interface
5850
+
5851
+ | Param | Type |
5852
+ | --- | --- |
5853
+ | [wallet_response_code] | <code>string</code> |
5854
+ | [wallet_session_id] | <code>string</code> |
5855
+ | [payment_source] | <code>object</code> |
5856
+ | [payment_source.wallet_payment_method_id] | <code>string</code> |
5857
+ | [payment_source.card_number_last4] | <code>string</code> |
5858
+ | [payment_source.card_scheme] | <code>string</code> |
5859
+ | [wallet_loyalty_account] | <code>object</code> |
5860
+ | [wallet_loyalty_account.id] | <code>string</code> |
5861
+ | [wallet_loyalty_account.barcode] | <code>string</code> |
5862
+ | [shipping] | <code>object</code> |
5863
+ | [shipping.address_line1] | <code>string</code> |
5864
+ | [shipping.address_line2] | <code>string</code> |
5865
+ | [shipping.address_postcode] | <code>string</code> |
5866
+ | [shipping.address_city] | <code>string</code> |
5867
+ | [shipping.address_state] | <code>string</code> |
5868
+ | [shipping.address_country] | <code>string</code> |
5869
+ | [shipping.address_company] | <code>string</code> |
5870
+ | [shipping.post_office_box_number] | <code>string</code> |
5871
+ | [shipping.wallet_address_id] | <code>string</code> |
5872
+ | [shipping.wallet_address_name] | <code>string</code> |
5873
+ | [shipping.wallet_address_created_timestamp] | <code>string</code> |
5874
+ | [shipping.wallet_address_updated_timestamp] | <code>string</code> |
5875
+
5876
+ <a name="IWalletOnClick" id="IWalletOnClick" href="#IWalletOnClick">&nbsp;</a>
5877
+
5878
+ ## IWalletOnClick
5879
+ Interface of data from a wallet onClick event.
5880
+
5881
+ **Kind**: global interface
5882
+
5883
+ | Param | Description |
5884
+ | --- | --- |
5885
+ | attachResult | Method to be called that attaches a result to the wallet onClick operation. When handler is synchronous, this method is optionally called with a boolean flag indicating validation result. When handler executes asynchronous operations, this method must be called with the Promise to have the wallet process wait for its completion or rejection. |
5886
+
5887
+ <a name="IWalletUnavailable" id="IWalletUnavailable" href="#IWalletUnavailable">&nbsp;</a>
5888
+
5889
+ ## IWalletUnavailable
5890
+ Interface of data from an unavailable event.
5891
+
5892
+ **Kind**: global interface
5893
+
5894
+ | Param | Type | Description |
5895
+ | --- | --- | --- |
5896
+ | [wallet] | <code>string</code> | For gateways with more than one wallet button available (e.g: MPGS with ApplePay and GooglePay). Possible values for wallet are 'apple' or 'google'. |
5897
+
5898
+ <a name="IWalletUpdateData" id="IWalletUpdateData" href="#IWalletUpdateData">&nbsp;</a>
5899
+
5900
+ ## IWalletUpdateData
5901
+ Interface of data for wallet button `update` call.
5902
+
5903
+ **Kind**: global interface
5904
+
5905
+ | Param | Type |
5906
+ | --- | --- |
5907
+ | success | <code>boolean</code> |
5908
+
5710
5909
  <a name="IWalletMeta" id="IWalletMeta" href="#IWalletMeta">&nbsp;</a>
5711
5910
 
5712
5911
  ## IWalletMeta : <code>object</code>
@@ -5791,14 +5990,19 @@ Class WalletButtons to work with different E-Wallets within html (currently supp
5791
5990
  * [.load()](#WalletButtons+load)
5792
5991
  * [.update()](#WalletButtons+update)
5793
5992
  * [.setEnv(env, [alias])](#WalletButtons+setEnv)
5993
+ * [.enable()](#WalletButtons+enable)
5994
+ * [.disable()](#WalletButtons+disable)
5794
5995
  * [.close()](#WalletButtons+close)
5795
- * [.on(eventName, [cb])](#WalletButtons+on) ⇒ <code>Promise.&lt;IEventData&gt;</code> \| <code>void</code>
5996
+ * [.on(eventName, [cb])](#WalletButtons+on) ⇒ [<code>Promise.&lt;IEventData&gt;</code>](#IEventData) \| <code>void</code>
5796
5997
  * [.onUnavailable([handler])](#WalletButtons+onUnavailable)
5797
5998
  * [.onUpdate([handler])](#WalletButtons+onUpdate)
5798
5999
  * [.onPaymentSuccessful([handler])](#WalletButtons+onPaymentSuccessful)
5799
6000
  * [.onPaymentInReview([handler])](#WalletButtons+onPaymentInReview)
5800
6001
  * [.onPaymentError([handler])](#WalletButtons+onPaymentError)
5801
6002
  * [.onAuthTokensChanged([handler])](#WalletButtons+onAuthTokensChanged)
6003
+ * [.onClick(handler)](#WalletButtons+onClick)
6004
+ * [.onCheckoutOpen(handler)](#WalletButtons+onCheckoutOpen)
6005
+ * [.onCheckoutClose(handler)](#WalletButtons+onCheckoutClose)
5802
6006
 
5803
6007
  <a name="new_WalletButtons_new" id="new_WalletButtons_new" href="#new_WalletButtons_new">&nbsp;</a>
5804
6008
 
@@ -5909,6 +6113,26 @@ Bear in mind that you must set an environment before calling `button.load()`.
5909
6113
  ```js
5910
6114
  button.setEnv('production', 'paydock.com');
5911
6115
  ```
6116
+ <a name="WalletButtons+enable" id="WalletButtons+enable" href="#WalletButtons+enable">&nbsp;</a>
6117
+
6118
+ ### walletButtons.enable()
6119
+ Current method can enable the payment button. This method is only supported for Flypay V2.
6120
+
6121
+ **Kind**: instance method of [<code>WalletButtons</code>](#WalletButtons)
6122
+ **Example**
6123
+ ```js
6124
+ button.enable();
6125
+ ```
6126
+ <a name="WalletButtons+disable" id="WalletButtons+disable" href="#WalletButtons+disable">&nbsp;</a>
6127
+
6128
+ ### walletButtons.disable()
6129
+ Current method can disable the payment button. This method is only supported for Flypay V2.
6130
+
6131
+ **Kind**: instance method of [<code>WalletButtons</code>](#WalletButtons)
6132
+ **Example**
6133
+ ```js
6134
+ button.disable('production', 'paydock.com');
6135
+ ```
5912
6136
  <a name="WalletButtons+close" id="WalletButtons+close" href="#WalletButtons+close">&nbsp;</a>
5913
6137
 
5914
6138
  ### walletButtons.close()
@@ -5921,7 +6145,7 @@ button.close();
5921
6145
  ```
5922
6146
  <a name="WalletButtons+on" id="WalletButtons+on" href="#WalletButtons+on">&nbsp;</a>
5923
6147
 
5924
- ### walletButtons.on(eventName, [cb]) ⇒ <code>Promise.&lt;IEventData&gt;</code> \| <code>void</code>
6148
+ ### walletButtons.on(eventName, [cb]) ⇒ [<code>Promise.&lt;IEventData&gt;</code>](#IEventData) \| <code>void</code>
5925
6149
  Listen to events of button. `unavailable` returns no data, `paymentSuccessful` returns IWalletPaymentSuccessful
5926
6150
  for Stripe or full response for Flypay, and `paymentError` an error.
5927
6151
 
@@ -6084,6 +6308,63 @@ button.onAuthTokensChanged().then((eventData) => {
6084
6308
  console.log('Authentication tokens changed:', eventData);
6085
6309
  });
6086
6310
  ```
6311
+ <a name="WalletButtons+onClick" id="WalletButtons+onClick" href="#WalletButtons+onClick">&nbsp;</a>
6312
+
6313
+ ### walletButtons.onClick(handler)
6314
+ Registers a callback function to be invoked when the wallet button gets clicked.
6315
+ There are two operational modes supported, Synchronous and Asynchronous.
6316
+ When asynchronous operations need to occur on the callback handler, attaching the Promise via `attachResult` is required to have the wallet wait for a result.
6317
+ When synchronous operations occur on the callback handler, attaching a boolean result via `attachResult` is optional to control the execution flow.
6318
+ Note this is supported for Paypal, GooglePay and ApplePay wallet buttons at the moment.
6319
+
6320
+ **Kind**: instance method of [<code>WalletButtons</code>](#WalletButtons)
6321
+
6322
+ | Param | Type | Description |
6323
+ | --- | --- | --- |
6324
+ | handler | <code>listener</code> | Function to be called when the wallet button is clicked. |
6325
+
6326
+ **Example**
6327
+ ```js
6328
+ button.onClick((data) => {
6329
+ performValidationLogic();
6330
+ });
6331
+ ```
6332
+ <a name="WalletButtons+onCheckoutOpen" id="WalletButtons+onCheckoutOpen" href="#WalletButtons+onCheckoutOpen">&nbsp;</a>
6333
+
6334
+ ### walletButtons.onCheckoutOpen(handler)
6335
+ Registers a callback function to be invoked when the wallet checkout opens.
6336
+ Note this is supported for FlypayV2 wallet button at the moment.
6337
+
6338
+ **Kind**: instance method of [<code>WalletButtons</code>](#WalletButtons)
6339
+
6340
+ | Param | Type | Description |
6341
+ | --- | --- | --- |
6342
+ | handler | <code>listener</code> | Function to be called when the wallet checkout opens. |
6343
+
6344
+ **Example**
6345
+ ```js
6346
+ button.onCheckoutOpen((data) => {
6347
+ console.log('Checkout opens');
6348
+ });
6349
+ ```
6350
+ <a name="WalletButtons+onCheckoutClose" id="WalletButtons+onCheckoutClose" href="#WalletButtons+onCheckoutClose">&nbsp;</a>
6351
+
6352
+ ### walletButtons.onCheckoutClose(handler)
6353
+ Registers a callback function to be invoked when the wallet checkout closes.
6354
+ Note this is supported for FlypayV2 wallet button at the moment.
6355
+
6356
+ **Kind**: instance method of [<code>WalletButtons</code>](#WalletButtons)
6357
+
6358
+ | Param | Type | Description |
6359
+ | --- | --- | --- |
6360
+ | handler | <code>listener</code> | Function to be called when the wallet checkout closes. |
6361
+
6362
+ **Example**
6363
+ ```js
6364
+ button.onCheckoutClose(() => {
6365
+ console.log('Wallet checkout closes');
6366
+ });
6367
+ ```
6087
6368
  <a name="EVENT" id="EVENT" href="#EVENT">&nbsp;</a>
6088
6369
 
6089
6370
  ## EVENT : <code>object</code>
@@ -6097,6 +6378,7 @@ List of available event's name in the wallet button lifecycle
6097
6378
  | UPDATE | <code>string</code> | <code>&quot;update&quot;</code> |
6098
6379
  | PAYMENT_SUCCESSFUL | <code>string</code> | <code>&quot;paymentSuccessful&quot;</code> |
6099
6380
  | PAYMENT_ERROR | <code>string</code> | <code>&quot;paymentError&quot;</code> |
6381
+ | ON_CLICK | <code>string</code> | <code>&quot;onClick&quot;</code> |
6100
6382
 
6101
6383
 
6102
6384
  ## Secure Remote Commerce
@@ -6128,7 +6410,7 @@ var src = new paydock.SRC(
6128
6410
  src.load();
6129
6411
  ```
6130
6412
 
6131
- ```javascript
6413
+ ```javascript--es2015
6132
6414
  // ES2015 | TypeScript
6133
6415
 
6134
6416
  import { SRC } from '@paydock/client-sdk';