@paydock/client-sdk 1.104.1-beta → 1.106.1-beta

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (492) hide show
  1. package/.nvmrc +1 -0
  2. package/README.md +827 -537
  3. package/api.d.ts +1 -0
  4. package/api.js +1 -0
  5. package/bundles/widget.umd.js +7068 -7120
  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 +2 -2
  25. package/lib/api/api-service-internal.js +19 -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 → 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 +17 -13
  130. package/lib/components/iframe-event.js +77 -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 +4 -4
  136. package/lib/components/link.js +60 -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 +11 -14
  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 +75 -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/lib/secure-remote-commerce/index.d.ts +102 -0
  226. package/lib/secure-remote-commerce/index.js +103 -0
  227. package/lib/secure-remote-commerce/index.js.map +1 -0
  228. package/lib/secure-remote-commerce/interfaces.d.ts +148 -0
  229. package/lib/secure-remote-commerce/interfaces.js +48 -0
  230. package/lib/secure-remote-commerce/interfaces.js.map +1 -0
  231. package/lib/secure-remote-commerce/mastercard-secure-remote-commerce.d.ts +30 -0
  232. package/lib/secure-remote-commerce/mastercard-secure-remote-commerce.js +40 -0
  233. package/lib/secure-remote-commerce/mastercard-secure-remote-commerce.js.map +1 -0
  234. package/lib/secure-remote-commerce/providers/mastercard-src/index.d.ts +1 -0
  235. package/lib/secure-remote-commerce/providers/mastercard-src/index.js +2 -0
  236. package/lib/secure-remote-commerce/providers/mastercard-src/index.js.map +1 -0
  237. package/{bundles/types/secure-remote-commerce/providers/visa-src/visa-src.d.ts → lib/secure-remote-commerce/providers/mastercard-src/mastercard-src.d.ts} +4 -8
  238. package/lib/secure-remote-commerce/providers/mastercard-src/mastercard-src.js +89 -0
  239. package/lib/secure-remote-commerce/providers/mastercard-src/mastercard-src.js.map +1 -0
  240. package/{bundles/types → lib}/secure-remote-commerce/providers/src-provider.d.ts +0 -1
  241. package/lib/secure-remote-commerce/providers/src-provider.js +1 -0
  242. package/lib/secure-remote-commerce/providers/src-provider.js.map +1 -0
  243. package/lib/secure-remote-commerce/secure-remote-commerce.d.ts +85 -0
  244. package/lib/secure-remote-commerce/secure-remote-commerce.js +155 -0
  245. package/lib/secure-remote-commerce/secure-remote-commerce.js.map +1 -0
  246. package/{bundles/types → lib}/vault-display-widget/index.d.ts +0 -1
  247. package/lib/vault-display-widget/index.js +14 -0
  248. package/lib/vault-display-widget/index.js.map +1 -0
  249. package/{bundles/types → lib}/vault-display-widget/vault-display-widget.d.ts +1 -2
  250. package/lib/vault-display-widget/vault-display-widget.js +99 -0
  251. package/lib/vault-display-widget/vault-display-widget.js.map +1 -0
  252. package/{bundles/types → lib}/wallet-buttons/afterpay.wallet-service.d.ts +0 -1
  253. package/lib/wallet-buttons/afterpay.wallet-service.js +152 -0
  254. package/lib/wallet-buttons/afterpay.wallet-service.js.map +1 -0
  255. package/{bundles/types → lib}/wallet-buttons/apple.wallet-service.d.ts +2 -1
  256. package/lib/wallet-buttons/apple.wallet-service.js +324 -0
  257. package/lib/wallet-buttons/apple.wallet-service.js.map +1 -0
  258. package/{bundles/types → lib}/wallet-buttons/flypay-v2.wallet-service.d.ts +8 -2
  259. package/lib/wallet-buttons/flypay-v2.wallet-service.js +163 -0
  260. package/lib/wallet-buttons/flypay-v2.wallet-service.js.map +1 -0
  261. package/{bundles/types → lib}/wallet-buttons/flypay.wallet-service.d.ts +0 -1
  262. package/lib/wallet-buttons/flypay.wallet-service.js +117 -0
  263. package/lib/wallet-buttons/flypay.wallet-service.js.map +1 -0
  264. package/{bundles/types → lib}/wallet-buttons/google.wallet-service.d.ts +3 -1
  265. package/lib/wallet-buttons/google.wallet-service.js +301 -0
  266. package/lib/wallet-buttons/google.wallet-service.js.map +1 -0
  267. package/lib/wallet-buttons/helpers/flypay-v2.helper.d.ts +3 -0
  268. package/lib/wallet-buttons/helpers/flypay-v2.helper.js +151 -0
  269. package/lib/wallet-buttons/helpers/flypay-v2.helper.js.map +1 -0
  270. package/lib/wallet-buttons/index.d.ts +127 -0
  271. package/lib/wallet-buttons/index.js +128 -0
  272. package/lib/wallet-buttons/index.js.map +1 -0
  273. package/{bundles/types → lib}/wallet-buttons/interfaces.d.ts +3 -1
  274. package/lib/wallet-buttons/interfaces.js +1 -0
  275. package/lib/wallet-buttons/interfaces.js.map +1 -0
  276. package/{bundles/types → lib}/wallet-buttons/mastercard.wallet-service.d.ts +0 -1
  277. package/lib/wallet-buttons/mastercard.wallet-service.js +27 -0
  278. package/lib/wallet-buttons/mastercard.wallet-service.js.map +1 -0
  279. package/{bundles/types → lib}/wallet-buttons/paypal.wallet-service.d.ts +0 -1
  280. package/lib/wallet-buttons/paypal.wallet-service.js +144 -0
  281. package/lib/wallet-buttons/paypal.wallet-service.js.map +1 -0
  282. package/{bundles/types → lib}/wallet-buttons/stripe.wallet-service.d.ts +0 -1
  283. package/lib/wallet-buttons/stripe.wallet-service.js +100 -0
  284. package/lib/wallet-buttons/stripe.wallet-service.js.map +1 -0
  285. package/{bundles/types/wallet-buttons/wallet-cba-buttons.d.ts → lib/wallet-buttons/wallet-buttons.d.ts} +92 -115
  286. package/lib/wallet-buttons/wallet-buttons.js +479 -0
  287. package/lib/wallet-buttons/wallet-buttons.js.map +1 -0
  288. package/{bundles/types → lib}/wallet-buttons/wallet-service.d.ts +7 -1
  289. package/lib/wallet-buttons/wallet-service.js +60 -0
  290. package/lib/wallet-buttons/wallet-service.js.map +1 -0
  291. package/{bundles/types → lib}/widget/configuration.d.ts +2 -3
  292. package/lib/widget/configuration.js +260 -0
  293. package/lib/widget/configuration.js.map +1 -0
  294. package/lib/widget/html-multi-widget.d.ts +336 -0
  295. package/lib/widget/html-multi-widget.js +422 -0
  296. package/lib/widget/html-multi-widget.js.map +1 -0
  297. package/{bundles/types → lib}/widget/html-widget.d.ts +1 -2
  298. package/lib/widget/html-widget.js +127 -0
  299. package/lib/widget/html-widget.js.map +1 -0
  300. package/{bundles/types → lib}/widget/index.d.ts +1 -2
  301. package/lib/widget/index.js +132 -0
  302. package/lib/widget/index.js.map +1 -0
  303. package/{bundles/types → lib}/widget/meta.d.ts +0 -1
  304. package/lib/widget/meta.js +8 -0
  305. package/lib/widget/meta.js.map +1 -0
  306. package/{bundles/types → lib}/widget/multi-widget.d.ts +1 -2
  307. package/lib/widget/multi-widget.js +437 -0
  308. package/lib/widget/multi-widget.js.map +1 -0
  309. package/{bundles/types → lib}/widget/style.d.ts +0 -1
  310. package/lib/widget/style.js +204 -0
  311. package/lib/widget/style.js.map +1 -0
  312. package/package.json +42 -164
  313. package/payment-source-widget.d.ts +1 -0
  314. package/payment-source-widget.js +1 -0
  315. package/slate.md +205 -239
  316. package/tslint.json +129 -0
  317. package/typings/globals/jasmine/index.d.ts +576 -0
  318. package/typings/globals/jasmine-ajax/index.d.ts +83 -0
  319. package/typings/globals/jquery/index.d.ts +3759 -0
  320. package/typings/index.d.ts +3 -0
  321. package/vault-display-widget.d.ts +1 -0
  322. package/vault-display-widget.js +1 -0
  323. package/vendors/zipmoney.d.ts +18 -0
  324. package/vendors/zipmoney.js +1 -0
  325. package/widget.d.ts +1 -0
  326. package/widget.js +1 -0
  327. package/bundles/index.cjs +0 -10674
  328. package/bundles/index.cjs.d.ts +0 -3163
  329. package/bundles/index.cjs.map +0 -1
  330. package/bundles/index.mjs +0 -10642
  331. package/bundles/index.mjs.d.ts +0 -3163
  332. package/bundles/index.mjs.map +0 -1
  333. package/bundles/types/api/api-base.d.ts.map +0 -1
  334. package/bundles/types/api/api-charge-internal.d.ts.map +0 -1
  335. package/bundles/types/api/api-charge.d.ts.map +0 -1
  336. package/bundles/types/api/api-internal.d.ts.map +0 -1
  337. package/bundles/types/api/api-service-internal.d.ts.map +0 -1
  338. package/bundles/types/api/api.d.ts.map +0 -1
  339. package/bundles/types/api/index.d.ts +0 -2
  340. package/bundles/types/api/index.d.ts.map +0 -1
  341. package/bundles/types/canvas-3ds/canvas-3ds.d.ts.map +0 -1
  342. package/bundles/types/canvas-3ds/index.d.ts.map +0 -1
  343. package/bundles/types/canvas-3ds/services/gpayments-service.d.ts.map +0 -1
  344. package/bundles/types/canvas-3ds/services/index.d.ts.map +0 -1
  345. package/bundles/types/canvas-3ds/services/standalone3ds-service.d.ts.map +0 -1
  346. package/bundles/types/checkout-button/afterpay/afterpay-checkout-button.d.ts.map +0 -1
  347. package/bundles/types/checkout-button/afterpay/afterpay.runner.d.ts.map +0 -1
  348. package/bundles/types/checkout-button/checkout-button.d.ts.map +0 -1
  349. package/bundles/types/checkout-button/checkout-button.interface.d.ts.map +0 -1
  350. package/bundles/types/checkout-button/checkout-contextual-handler.d.ts.map +0 -1
  351. package/bundles/types/checkout-button/index.d.ts.map +0 -1
  352. package/bundles/types/checkout-button/paypal/paypal-checkout-button.d.ts.map +0 -1
  353. package/bundles/types/checkout-button/paypal/paypal.runner.d.ts.map +0 -1
  354. package/bundles/types/checkout-button/runner/base.runner.d.ts.map +0 -1
  355. package/bundles/types/checkout-button/runner/contextual.runner.d.ts.map +0 -1
  356. package/bundles/types/checkout-button/runner/index.d.ts.map +0 -1
  357. package/bundles/types/checkout-button/runner/popup.runner.d.ts.map +0 -1
  358. package/bundles/types/checkout-button/runner/redirect.runner.d.ts.map +0 -1
  359. package/bundles/types/checkout-button/zipmoney/index.d.ts +0 -4
  360. package/bundles/types/checkout-button/zipmoney/index.d.ts.map +0 -1
  361. package/bundles/types/checkout-button/zipmoney/zipmoney-checkout-button.d.ts.map +0 -1
  362. package/bundles/types/checkout-button/zipmoney/zipmoney-contextual.runner.d.ts.map +0 -1
  363. package/bundles/types/checkout-button/zipmoney/zipmoney-redirect.runner.d.ts.map +0 -1
  364. package/bundles/types/checkout-button/zipmoney/zipmoney.config.d.ts.map +0 -1
  365. package/bundles/types/checkout-button/zipmoney/zipmoney.runner.d.ts.map +0 -1
  366. package/bundles/types/checkout-button/zipmoney/zipmoney.types.d.ts.map +0 -1
  367. package/bundles/types/components/ability-guard.d.ts.map +0 -1
  368. package/bundles/types/components/background.d.ts.map +0 -1
  369. package/bundles/types/components/container.d.ts.map +0 -1
  370. package/bundles/types/components/dispatcher.d.ts.map +0 -1
  371. package/bundles/types/components/element-style.d.ts.map +0 -1
  372. package/bundles/types/components/flypay-iframe-event.d.ts.map +0 -1
  373. package/bundles/types/components/form-Interceptor.d.ts.map +0 -1
  374. package/bundles/types/components/http-core.d.ts.map +0 -1
  375. package/bundles/types/components/iframe-event.d.ts.map +0 -1
  376. package/bundles/types/components/iframe.d.ts.map +0 -1
  377. package/bundles/types/components/link.d.ts.map +0 -1
  378. package/bundles/types/components/loader.d.ts.map +0 -1
  379. package/bundles/types/components/param.d.ts.map +0 -1
  380. package/bundles/types/components/popup.d.ts.map +0 -1
  381. package/bundles/types/components/storage-dispatcher.d.ts.map +0 -1
  382. package/bundles/types/components/trigger.d.ts.map +0 -1
  383. package/bundles/types/components/vault-display-iframe-event.d.ts.map +0 -1
  384. package/bundles/types/components/wallet-background.d.ts.map +0 -1
  385. package/bundles/types/components/wallet-trigger.d.ts.map +0 -1
  386. package/bundles/types/configs/env/environment.cba.d.ts +0 -29
  387. package/bundles/types/configs/env/environment.cba.d.ts.map +0 -1
  388. package/bundles/types/configs/env/environment.interface.d.ts +0 -12
  389. package/bundles/types/configs/env/environment.interface.d.ts.map +0 -1
  390. package/bundles/types/configs/env/environment.paydock.d.ts.map +0 -1
  391. package/bundles/types/configs/env/index.d.ts +0 -3
  392. package/bundles/types/configs/env/index.d.ts.map +0 -1
  393. package/bundles/types/configs/sdk.d.ts.map +0 -1
  394. package/bundles/types/external-checkout/builder.d.ts.map +0 -1
  395. package/bundles/types/external-checkout/checker.d.ts.map +0 -1
  396. package/bundles/types/external-checkout/index.d.ts +0 -3
  397. package/bundles/types/external-checkout/index.d.ts.map +0 -1
  398. package/bundles/types/helper/access-token.d.ts.map +0 -1
  399. package/bundles/types/helper/browser.d.ts.map +0 -1
  400. package/bundles/types/helper/event-emitter.d.ts.map +0 -1
  401. package/bundles/types/helper/event.d.ts.map +0 -1
  402. package/bundles/types/helper/ms.d.ts.map +0 -1
  403. package/bundles/types/helper/object.d.ts.map +0 -1
  404. package/bundles/types/helper/url.d.ts.map +0 -1
  405. package/bundles/types/helper/uuid.d.ts.map +0 -1
  406. package/bundles/types/index-cba.d.ts +0 -13
  407. package/bundles/types/index-cba.d.ts.map +0 -1
  408. package/bundles/types/index.d.ts +0 -14
  409. package/bundles/types/index.d.ts.map +0 -1
  410. package/bundles/types/payment-source/builder.d.ts.map +0 -1
  411. package/bundles/types/payment-source/index.d.ts.map +0 -1
  412. package/bundles/types/payment-source-widget/html-payment-source-widget.d.ts.map +0 -1
  413. package/bundles/types/payment-source-widget/index.d.ts.map +0 -1
  414. package/bundles/types/payment-source-widget/interfaces.d.ts.map +0 -1
  415. package/bundles/types/payment-source-widget/payment-source-widget.d.ts.map +0 -1
  416. package/bundles/types/secure-remote-commerce/index.d.ts +0 -2
  417. package/bundles/types/secure-remote-commerce/index.d.ts.map +0 -1
  418. package/bundles/types/secure-remote-commerce/interfaces.d.ts +0 -72
  419. package/bundles/types/secure-remote-commerce/interfaces.d.ts.map +0 -1
  420. package/bundles/types/secure-remote-commerce/providers/src-provider.d.ts.map +0 -1
  421. package/bundles/types/secure-remote-commerce/providers/visa-src/helper.d.ts +0 -8
  422. package/bundles/types/secure-remote-commerce/providers/visa-src/helper.d.ts.map +0 -1
  423. package/bundles/types/secure-remote-commerce/providers/visa-src/index.d.ts +0 -2
  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 +0 -9
  427. package/bundles/types/secure-remote-commerce/providers/visa-src/visa-src.styles.d.ts.map +0 -1
  428. package/bundles/types/secure-remote-commerce/secure-remote-commerce.d.ts +0 -164
  429. package/bundles/types/secure-remote-commerce/secure-remote-commerce.d.ts.map +0 -1
  430. package/bundles/types/vault-display-widget/index.d.ts.map +0 -1
  431. package/bundles/types/vault-display-widget/vault-display-widget.d.ts.map +0 -1
  432. package/bundles/types/wallet-buttons/afterpay.wallet-service.d.ts.map +0 -1
  433. package/bundles/types/wallet-buttons/apple.wallet-service.d.ts.map +0 -1
  434. package/bundles/types/wallet-buttons/flypay-v2.wallet-service.d.ts.map +0 -1
  435. package/bundles/types/wallet-buttons/flypay.wallet-service.d.ts.map +0 -1
  436. package/bundles/types/wallet-buttons/google.wallet-service.d.ts.map +0 -1
  437. package/bundles/types/wallet-buttons/index-cba.d.ts +0 -2
  438. package/bundles/types/wallet-buttons/index-cba.d.ts.map +0 -1
  439. package/bundles/types/wallet-buttons/index.d.ts +0 -2
  440. package/bundles/types/wallet-buttons/index.d.ts.map +0 -1
  441. package/bundles/types/wallet-buttons/interfaces.d.ts.map +0 -1
  442. package/bundles/types/wallet-buttons/mastercard.wallet-service.d.ts.map +0 -1
  443. package/bundles/types/wallet-buttons/paypal.wallet-service.d.ts.map +0 -1
  444. package/bundles/types/wallet-buttons/stripe.wallet-service.d.ts.map +0 -1
  445. package/bundles/types/wallet-buttons/wallet-buttons.d.ts +0 -366
  446. package/bundles/types/wallet-buttons/wallet-buttons.d.ts.map +0 -1
  447. package/bundles/types/wallet-buttons/wallet-cba-buttons.d.ts.map +0 -1
  448. package/bundles/types/wallet-buttons/wallet-service.d.ts.map +0 -1
  449. package/bundles/types/widget/configuration.d.ts.map +0 -1
  450. package/bundles/types/widget/html-multi-widget.d.ts +0 -266
  451. package/bundles/types/widget/html-multi-widget.d.ts.map +0 -1
  452. package/bundles/types/widget/html-widget.d.ts.map +0 -1
  453. package/bundles/types/widget/index.d.ts.map +0 -1
  454. package/bundles/types/widget/meta.d.ts.map +0 -1
  455. package/bundles/types/widget/multi-widget.d.ts.map +0 -1
  456. package/bundles/types/widget/style.d.ts.map +0 -1
  457. package/bundles/widget.umd.js.d.ts +0 -3163
  458. package/bundles/widget.umd.js.map +0 -1
  459. package/bundles/widget.umd.js.min.d.ts +0 -3163
  460. package/bundles/widget.umd.min.js.map +0 -1
  461. package/docs/api-canvas3ds.md +0 -158
  462. package/docs/api-checkout-button.md +0 -912
  463. package/docs/api-examples.md +0 -65
  464. package/docs/api-ps-widget.md +0 -585
  465. package/docs/api-vault-display.md +0 -94
  466. package/docs/api-widget.md +0 -2444
  467. package/docs/api-wrapper.md +0 -78
  468. package/docs/canvas3ds-examples.md +0 -242
  469. package/docs/cba-header.md +0 -13
  470. package/docs/cba-license.md +0 -2
  471. package/docs/checkout-examples.md +0 -248
  472. package/docs/header.md +0 -15
  473. package/docs/html/layout.html +0 -78
  474. package/docs/html/marked.js +0 -23
  475. package/docs/html/style.css +0 -365
  476. package/docs/install/npm.content.md +0 -16
  477. package/docs/install/npm.example.md +0 -24
  478. package/docs/install/umd.content.md +0 -21
  479. package/docs/install/umd.example.md +0 -6
  480. package/docs/install.md +0 -53
  481. package/docs/install.readme.t.md +0 -17
  482. package/docs/install.slate.t.md +0 -17
  483. package/docs/license.md +0 -2
  484. package/docs/partials/header.hbs +0 -3
  485. package/docs/ps-examples.md +0 -129
  486. package/docs/secure-remote-commerce-examples.md +0 -258
  487. package/docs/secure-remote-commerce.md +0 -265
  488. package/docs/vault-display-example.md +0 -132
  489. package/docs/wallet-buttons-examples.md +0 -580
  490. package/docs/wallet-buttons.md +0 -424
  491. package/docs/wallet-cba-buttons-examples.md +0 -388
  492. package/docs/widget-examples.md +0 -134
package/README.md CHANGED
@@ -16,79 +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`
29
+
30
+
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`
48
36
 
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
37
 
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');
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 being by including the Client SDK
73
- in your page using one and only of the two script tags below. After this step
74
- you will be able to access the Client SDK features via the global
75
- 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:
76
62
 
77
- For production we recommend using the compressed version (`.min.js`) since
78
- it will result in faster loading times for your end users.
63
+ *Compressed version for production*
64
+ `https://widget.paydock.com/sdk/latest/widget.umd.min.js`
79
65
 
80
- - *Compressed version for production: `https://widget.paydock.com/sdk/latest/widget.umd.min.js`*
66
+ *Full version for development and debug*
67
+ `https://widget.paydock.com/sdk/latest/widget.umd.js`
81
68
 
82
- - *Full version for development and debug: `https://widget.paydock.com/sdk/latest/widget.umd.js`*
83
69
 
84
- You may download the production version of the Client SDK scripts [here][min],
85
- and, the development version [here][max].
70
+
71
+
72
+ Also can download library the [production version][min] or the [development version][max]
86
73
 
87
74
  [min]: https://widget.paydock.com/sdk/latest/widget.umd.min.js
88
75
  [max]: https://widget.paydock.com/sdk/latest/widget.umd.js
89
76
 
90
- For more advanced use-cases, the library has [UMD](https://github.com/umdjs/umd)
91
- 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
+
92
89
 
93
90
 
94
91
  ```html
@@ -98,7 +95,6 @@ format that can be used in RequireJS, Webpack, etc.
98
95
  </script>
99
96
  ```
100
97
 
101
-
102
98
  ## Widget
103
99
  You can find description of all methods and parameters [here](https://www.npmjs.com/package/@paydock/client-sdk#widget-simple-example)
104
100
 
@@ -123,11 +119,11 @@ var widget = new paydock.HtmlWidget('#widget', 'publicKey');
123
119
  widget.load();
124
120
  ```
125
121
 
126
- ```javascript
122
+ ```javascript--es2015
127
123
  // ES2015 | TypeScript
128
124
 
129
- import { HtmlWidget } from '@paydock/client-sdk';
130
-
125
+ import { HtmlWidget } from '@paydock/client-sdk/widget';
126
+
131
127
  var widget = new HtmlWidget('#widget', 'publicKey');
132
128
  widget.load();
133
129
  ```
@@ -135,7 +131,7 @@ widget.load();
135
131
  Then write only need 2 lines of code in js to initialize widget
136
132
 
137
133
 
138
- ### Full example
134
+ ### Full example
139
135
 
140
136
  ```html
141
137
  <!DOCTYPE html>
@@ -198,9 +194,9 @@ widget.setFormFields(['phone', 'email']); // add additional fields for form of w
198
194
  widget.setSupportedCardIcons(['mastercard', 'visa']); // add icons of supported card types
199
195
  ```
200
196
 
201
- 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
202
198
 
203
- ### Full example
199
+ ### Full example
204
200
 
205
201
  ```html
206
202
  <!DOCTYPE html>
@@ -221,12 +217,12 @@ This example shows how you can use a lot of other methods to settings your form
221
217
  <script src="https://widget.paydock.com/sdk/latest/widget.umd.js" ></script>
222
218
  <script>
223
219
  var widget = new paydock.HtmlWidget('#widget', 'publicKey', 'gatewayId');
224
-
220
+
225
221
  widget.setSupportedCardIcons(['mastercard', 'visa']);
226
222
  widget.setFormFields(['phone', 'email']);
227
223
  widget.setRefId('custom-ref-id');
228
224
  widget.onFinishInsert('input[name="payment_source_token"]', 'payment_source');z
229
-
225
+
230
226
  widget.load();
231
227
  </script>
232
228
  </script>
@@ -287,6 +283,12 @@ This example shows how you can use a lot of other methods to settings your form
287
283
  <dt><a href="#user-content-w_STYLABLE_ELEMENT_STATE">STYLABLE_ELEMENT_STATE</a> : <code>object</code></dt>
288
284
  <dd><p>Current constant include available states of element for styling</p>
289
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>
290
292
  <dt><a href="#user-content-w_TRIGGER">TRIGGER</a> : <code>object</code></dt>
291
293
  <dd><p>List of available triggers</p>
292
294
  </dd>
@@ -299,7 +301,8 @@ This example shows how you can use a lot of other methods to settings your form
299
301
  <dd><p>Interface of data from validation event.</p>
300
302
  </dd>
301
303
  <dt><a href="#user-content-w_IEventMetaData">IEventMetaData</a></dt>
302
- <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>
303
306
  </dd>
304
307
  <dt><a href="#user-content-w_IEventAfterLoadData">IEventAfterLoadData</a></dt>
305
308
  <dd><p>Interface of data from event.</p>
@@ -348,33 +351,34 @@ Interface of data from validation event.
348
351
 
349
352
  | Param | Type | Description |
350
353
  | --- | --- | --- |
351
- | event | <code>string</code> | Event name |
352
- | purpose | <code>string</code> | System variable. Purpose of event |
353
- | message_source | <code>string</code> | System variable. Event source |
354
- | [ref_id] | <code>string</code> | Custom value for identify result of processed operation |
355
- | [form_valid] | <code>boolean</code> | Form is valid |
356
- | [invalid_fields] | <code>array</code> | Invalid form fields |
357
- | [invalid_showed_fields] | <code>array</code> | List of fields on which the error is already displayed |
358
- | [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), |
359
362
 
360
363
  <a name="w_IEventMetaData" id="w_IEventMetaData" href="#user-content-w_IEventMetaData">&nbsp;</a>
361
364
 
362
365
  ## IEventMetaData
363
- 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.
364
368
 
365
369
  **Kind**: global interface
366
370
 
367
371
  | Param | Type | Description |
368
372
  | --- | --- | --- |
369
- | event | <code>string</code> | Event name |
370
- | purpose | <code>string</code> | System variable. Purpose of event |
371
- | message_source | <code>string</code> | System variable. Event source |
372
- | [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. |
373
377
  | configuration_token | <code>string</code> | Token received from our API with widget data |
374
378
  | type | <code>string</code> | Payment type 'card', 'bank_account' |
375
379
  | gateway_type | <code>string</code> | Gateway type |
376
380
  | [card_number_last4] | <code>string</code> | Last 4 digit of your card |
377
- | [card_scheme] | <code>string</code> | Card scheme |
381
+ | [card_scheme] | <code>string</code> | Card scheme, e.g., (Visa, Mastercard and American Express (AmEx)) |
378
382
  | [card_number_length] | <code>number</code> | Card number length |
379
383
  | [account_name] | <code>string</code> | Bank account account name |
380
384
  | [account_number] | <code>string</code> | Bank account account number |
@@ -388,10 +392,10 @@ Interface of data from event.
388
392
 
389
393
  | Param | Type | Description |
390
394
  | --- | --- | --- |
391
- | event | <code>string</code> | Event name |
392
- | purpose | <code>string</code> | System variable. Purpose of event |
393
- | message_source | <code>string</code> | System variable. Event source |
394
- | [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. |
395
399
 
396
400
  <a name="w_IEventFinishData" id="w_IEventFinishData" href="#user-content-w_IEventFinishData">&nbsp;</a>
397
401
 
@@ -402,10 +406,10 @@ Interface of data from event.
402
406
 
403
407
  | Param | Type | Description |
404
408
  | --- | --- | --- |
405
- | event | <code>string</code> | Event name |
406
- | purpose | <code>string</code> | System variable. Purpose of event |
407
- | message_source | <code>string</code> | System variable. Event source |
408
- | [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. |
409
413
  | payment_source | <code>string</code> | One time token. Result from this endpoint [API docs](https://docs.paydock.com/#tokens) |
410
414
 
411
415
  <a name="w_IPayPalMeta" id="w_IPayPalMeta" href="#user-content-w_IPayPalMeta">&nbsp;</a>
@@ -619,7 +623,7 @@ Class Widget include method for working on html and include extended by HtmlMult
619
623
  * [.setFormElements(elements)](#user-content-w_HtmlWidget+setFormElements)
620
624
  * [.setMeta(object)](#user-content-w_HtmlWidget+setMeta)
621
625
  * [.load()](#user-content-w_HtmlMultiWidget+load)
622
- * [.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)
623
627
  * [.trigger(triggers, data)](#user-content-w_HtmlMultiWidget+trigger)
624
628
  * [.getValidationState()](#user-content-w_HtmlMultiWidget+getValidationState) ⇒ [<code>IFormValidation</code>](#user-content-w_IFormValidation)
625
629
  * [.isValidForm()](#user-content-w_HtmlMultiWidget+isValidForm) ⇒ <code>boolean</code>
@@ -632,6 +636,7 @@ Class Widget include method for working on html and include extended by HtmlMult
632
636
  * [.hideElements(elements)](#user-content-w_HtmlMultiWidget+hideElements)
633
637
  * [.showElements(elements)](#user-content-w_HtmlMultiWidget+showElements)
634
638
  * [.updateFormValues(fieldValues)](#user-content-w_HtmlMultiWidget+updateFormValues)
639
+ * [.updateFormValue(key, value)](#user-content-w_HtmlMultiWidget+updateFormValue)
635
640
  * [.onFinishInsert(selector, dataType)](#user-content-w_HtmlMultiWidget+onFinishInsert)
636
641
  * [.interceptSubmitForm(selector)](#user-content-w_HtmlMultiWidget+interceptSubmitForm)
637
642
  * [.useCheckoutAutoSubmit()](#user-content-w_HtmlMultiWidget+useCheckoutAutoSubmit)
@@ -643,7 +648,7 @@ Class Widget include method for working on html and include extended by HtmlMult
643
648
  * [.setFormValues(fieldValues)](#user-content-w_MultiWidget+setFormValues)
644
649
  * [.setFormLabels(fieldLabels)](#user-content-w_MultiWidget+setFormLabels)
645
650
  * [.setFormPlaceholders(fieldPlaceholders)](#user-content-w_MultiWidget+setFormPlaceholders)
646
- * ~~[.setIcons()](#user-content-w_MultiWidget+setIcons)~~
651
+ * [.setIcons()](#user-content-w_MultiWidget+setIcons)
647
652
  * [.setHiddenElements(elements)](#user-content-w_MultiWidget+setHiddenElements)
648
653
  * [.setRefId(refId)](#user-content-w_MultiWidget+setRefId)
649
654
  * [.useGatewayFieldValidation()](#user-content-w_MultiWidget+useGatewayFieldValidation)
@@ -796,51 +801,38 @@ config.setMeta({
796
801
  <a name="w_HtmlMultiWidget+load" id="w_HtmlMultiWidget+load" href="#user-content-w_HtmlMultiWidget+load">&nbsp;</a>
797
802
 
798
803
  ### htmlWidget.load()
799
- 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.
800
807
 
801
808
  **Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
802
809
  **Overrides**: [<code>load</code>](#user-content-w_HtmlMultiWidget+load)
803
- <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>
804
811
 
805
- ### htmlWidget.on(eventName, [cb]) ⇒ <code>Promise.&lt;(IEventData\|IEventMetaData\|IEventFinishData\|IFormValidation)&gt;</code> \| <code>void</code>
806
- Listen to events of widget
812
+ ### htmlWidget.afterLoad()
813
+ Registers a form validation callback for validation events.
807
814
 
808
815
  **Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
809
- **Overrides**: [<code>on</code>](#user-content-w_HtmlMultiWidget+on)
810
-
811
- | Param | Type | Description |
812
- | --- | --- | --- |
813
- | eventName | <code>string</code> | Available event names [EVENT](#user-content-w_EVENT) |
814
- | [cb] | <code>listener</code> | |
815
-
816
- **Example**
817
-
818
- ```javascript
819
- widget.on('form_submit', function (data) {
820
- console.log(data);
821
- });
822
- // or
823
- widget.on('form_submit').then(function (data) {
824
- console.log(data);
825
- });
826
- ```
816
+ **Overrides**: [<code>afterLoad</code>](#user-content-w_HtmlMultiWidget+afterLoad)
827
817
  <a name="w_HtmlMultiWidget+trigger" id="w_HtmlMultiWidget+trigger" href="#user-content-w_HtmlMultiWidget+trigger">&nbsp;</a>
828
818
 
829
819
  ### htmlWidget.trigger(triggers, data)
830
- This callback will be called for every trigger
820
+ Registers callback that will be invoked for every trigger.
831
821
 
832
822
  **Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
833
823
  **Overrides**: [<code>trigger</code>](#user-content-w_HtmlMultiWidget+trigger)
834
824
 
835
825
  | Param | Type | Description |
836
826
  | --- | --- | --- |
837
- | triggers | <code>triggerName</code> | submit_form, tab |
838
- | 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. |
839
829
 
840
830
  <a name="w_HtmlMultiWidget+getValidationState" id="w_HtmlMultiWidget+getValidationState" href="#user-content-w_HtmlMultiWidget+getValidationState">&nbsp;</a>
841
831
 
842
832
  ### htmlWidget.getValidationState() ⇒ [<code>IFormValidation</code>](#user-content-w_IFormValidation)
843
- 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.
844
836
 
845
837
  **Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
846
838
  **Overrides**: [<code>getValidationState</code>](#user-content-w_HtmlMultiWidget+getValidationState)
@@ -848,11 +840,13 @@ Using this method you can get validation state information
848
840
  <a name="w_HtmlMultiWidget+isValidForm" id="w_HtmlMultiWidget+isValidForm" href="#user-content-w_HtmlMultiWidget+isValidForm">&nbsp;</a>
849
841
 
850
842
  ### htmlWidget.isValidForm() ⇒ <code>boolean</code>
851
- 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.
852
846
 
853
847
  **Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
854
848
  **Overrides**: [<code>isValidForm</code>](#user-content-w_HtmlMultiWidget+isValidForm)
855
- **Returns**: <code>boolean</code> - Form is valid
849
+ **Returns**: <code>boolean</code> - Indicates wether or not form is valid.
856
850
  <a name="w_HtmlMultiWidget+isInvalidField" id="w_HtmlMultiWidget+isInvalidField" href="#user-content-w_HtmlMultiWidget+isInvalidField">&nbsp;</a>
857
851
 
858
852
  ### htmlWidget.isInvalidField(field) ⇒ <code>boolean</code>
@@ -869,92 +863,96 @@ Using this method you can check if a specific form field is invalid
869
863
  <a name="w_HtmlMultiWidget+isFieldErrorShowed" id="w_HtmlMultiWidget+isFieldErrorShowed" href="#user-content-w_HtmlMultiWidget+isFieldErrorShowed">&nbsp;</a>
870
864
 
871
865
  ### htmlWidget.isFieldErrorShowed(field) ⇒ <code>boolean</code>
872
- 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.
873
867
 
874
868
  **Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
875
869
  **Overrides**: [<code>isFieldErrorShowed</code>](#user-content-w_HtmlMultiWidget+isFieldErrorShowed)
876
- **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.
877
871
 
878
872
  | Param | Type | Description |
879
873
  | --- | --- | --- |
880
- | field | <code>string</code> | Field name |
874
+ | field | <code>string</code> | The form field name |
881
875
 
882
876
  <a name="w_HtmlMultiWidget+isInvalidFieldByValidator" id="w_HtmlMultiWidget+isInvalidFieldByValidator" href="#user-content-w_HtmlMultiWidget+isInvalidFieldByValidator">&nbsp;</a>
883
877
 
884
878
  ### htmlWidget.isInvalidFieldByValidator(field, validator) ⇒ <code>boolean</code>
885
- 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.
886
880
 
887
881
  **Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
888
882
  **Overrides**: [<code>isInvalidFieldByValidator</code>](#user-content-w_HtmlMultiWidget+isInvalidFieldByValidator)
889
- **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.
890
884
 
891
885
  | Param | Type | Description |
892
886
  | --- | --- | --- |
893
- | field | <code>string</code> | Field name |
894
- | 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. |
895
889
 
896
890
  <a name="w_HtmlMultiWidget+hide" id="w_HtmlMultiWidget+hide" href="#user-content-w_HtmlMultiWidget+hide">&nbsp;</a>
897
891
 
898
892
  ### htmlWidget.hide([saveSize])
899
- 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.
900
896
 
901
897
  **Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
902
898
  **Overrides**: [<code>hide</code>](#user-content-w_HtmlMultiWidget+hide)
903
899
 
904
900
  | Param | Type | Default | Description |
905
901
  | --- | --- | --- | --- |
906
- | [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. |
907
903
 
908
904
  <a name="w_HtmlMultiWidget+show" id="w_HtmlMultiWidget+show" href="#user-content-w_HtmlMultiWidget+show">&nbsp;</a>
909
905
 
910
906
  ### htmlWidget.show()
911
- 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.
912
910
 
913
911
  **Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
914
912
  **Overrides**: [<code>show</code>](#user-content-w_HtmlMultiWidget+show)
915
913
  <a name="w_HtmlMultiWidget+reload" id="w_HtmlMultiWidget+reload" href="#user-content-w_HtmlMultiWidget+reload">&nbsp;</a>
916
914
 
917
915
  ### htmlWidget.reload()
918
- Using this method you can reload widget
916
+ Reloads the widget.
919
917
 
920
918
  **Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
921
919
  **Overrides**: [<code>reload</code>](#user-content-w_HtmlMultiWidget+reload)
922
920
  <a name="w_HtmlMultiWidget+hideElements" id="w_HtmlMultiWidget+hideElements" href="#user-content-w_HtmlMultiWidget+hideElements">&nbsp;</a>
923
921
 
924
922
  ### htmlWidget.hideElements(elements)
925
- Using this method you can hide any elements inside widget
923
+ Hides the specified Widget elements by their identifier.
926
924
 
927
925
  **Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
928
926
  **Overrides**: [<code>hideElements</code>](#user-content-w_HtmlMultiWidget+hideElements)
929
927
 
930
928
  | Param | Type | Description |
931
929
  | --- | --- | --- |
932
- | 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) |
933
931
 
934
932
  **Example**
935
-
936
933
  ```javascript
937
934
  widget.hideElements(['submit_button', 'email']);
938
935
  ```
939
936
  <a name="w_HtmlMultiWidget+showElements" id="w_HtmlMultiWidget+showElements" href="#user-content-w_HtmlMultiWidget+showElements">&nbsp;</a>
940
937
 
941
938
  ### htmlWidget.showElements(elements)
942
- Using this method you can show any elements inside widget
943
-
944
- * @example
945
- widget.showElements(['submit_button', 'email']);
939
+ Shows the specified Widget elements by their identifier.
946
940
 
947
941
  **Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
948
942
  **Overrides**: [<code>showElements</code>](#user-content-w_HtmlMultiWidget+showElements)
949
943
 
950
944
  | Param | Type | Description |
951
945
  | --- | --- | --- |
952
- | 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) |
953
947
 
948
+ **Example**
949
+ ```javascript
950
+ widget.showElements(['submit_button', 'email']);
951
+ ```
954
952
  <a name="w_HtmlMultiWidget+updateFormValues" id="w_HtmlMultiWidget+updateFormValues" href="#user-content-w_HtmlMultiWidget+updateFormValues">&nbsp;</a>
955
953
 
956
954
  ### htmlWidget.updateFormValues(fieldValues)
957
- Method for update values for form fields inside the widget
955
+ Updates the form field values inside the widget.
958
956
 
959
957
  **Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
960
958
  **Overrides**: [<code>updateFormValues</code>](#user-content-w_HtmlMultiWidget+updateFormValues)
@@ -964,53 +962,71 @@ Method for update values for form fields inside the widget
964
962
  | fieldValues | <code>IFormValues</code> | Fields with values |
965
963
 
966
964
  **Example**
967
-
968
965
  ```javascript
969
966
  widget.updateFormValues({
970
- email: 'predefined@email.com',
971
- card_name: 'Houston'
972
- });
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");
973
987
  ```
974
988
  <a name="w_HtmlMultiWidget+onFinishInsert" id="w_HtmlMultiWidget+onFinishInsert" href="#user-content-w_HtmlMultiWidget+onFinishInsert">&nbsp;</a>
975
989
 
976
990
  ### htmlWidget.onFinishInsert(selector, dataType)
977
- 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.
978
992
 
979
993
  **Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
980
994
  **Overrides**: [<code>onFinishInsert</code>](#user-content-w_HtmlMultiWidget+onFinishInsert)
981
995
 
982
996
  | Param | Type | Description |
983
997
  | --- | --- | --- |
984
- | selector | <code>string</code> | css selector . [] # |
985
- | 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. |
986
1000
 
987
1001
  <a name="w_HtmlMultiWidget+interceptSubmitForm" id="w_HtmlMultiWidget+interceptSubmitForm" href="#user-content-w_HtmlMultiWidget+interceptSubmitForm">&nbsp;</a>
988
1002
 
989
1003
  ### htmlWidget.interceptSubmitForm(selector)
990
- Widget will intercept submit of your form for processing widget
1004
+ Intercepts a form submission and delegates processing to the widget.
991
1005
 
992
- 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
993
1010
 
994
1011
  **Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
995
1012
  **Overrides**: [<code>interceptSubmitForm</code>](#user-content-w_HtmlMultiWidget+interceptSubmitForm)
996
- **Note**: submit button in widget will be hidden.
1013
+ **Note**: The widget's submit button will be hidden.
997
1014
 
998
1015
  | Param | Type | Description |
999
1016
  | --- | --- | --- |
1000
1017
  | selector | <code>string</code> | css selector of your form |
1001
1018
 
1002
1019
  **Example**
1003
-
1004
- ```javascript
1005
- <form id="myForm">
1020
+ ```html
1021
+ <body>
1022
+ <form id="myForm">
1006
1023
  <input name="amount">
1007
1024
  <button type="submit">Submit</button>
1008
1025
  </form>
1009
- <!--
1010
- -->
1011
- <script>
1026
+ <script>
1012
1027
  widget.interceptSubmitForm('#myForm');
1013
- </script>
1028
+ </script>
1029
+ </body>
1014
1030
  ```
1015
1031
  <a name="w_HtmlMultiWidget+useCheckoutAutoSubmit" id="w_HtmlMultiWidget+useCheckoutAutoSubmit" href="#user-content-w_HtmlMultiWidget+useCheckoutAutoSubmit">&nbsp;</a>
1016
1032
 
@@ -1027,7 +1043,6 @@ Use this method for resize iFrame according content height
1027
1043
  **Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
1028
1044
  **Overrides**: [<code>useAutoResize</code>](#user-content-w_HtmlMultiWidget+useAutoResize)
1029
1045
  **Example**
1030
-
1031
1046
  ```javascript
1032
1047
  widget.useAutoResize();
1033
1048
  ```
@@ -1198,13 +1213,15 @@ widget.setFormPlaceholders({
1198
1213
  ```
1199
1214
  <a name="w_MultiWidget+setIcons" id="w_MultiWidget+setIcons" href="#user-content-w_MultiWidget+setIcons">&nbsp;</a>
1200
1215
 
1201
- ### ~~htmlWidget.setIcons()~~
1202
- ***Deprecated***
1203
-
1216
+ ### htmlWidget.setIcons()
1204
1217
  The method to change the widget icons
1205
1218
 
1206
1219
  **Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
1207
1220
  **Overrides**: [<code>setIcons</code>](#user-content-w_MultiWidget+setIcons)
1221
+ **Todo**
1222
+
1223
+ - [ ] DEPRECATED
1224
+
1208
1225
  <a name="w_MultiWidget+setHiddenElements" id="w_MultiWidget+setHiddenElements" href="#user-content-w_MultiWidget+setHiddenElements">&nbsp;</a>
1209
1226
 
1210
1227
  ### htmlWidget.setHiddenElements(elements)
@@ -1332,7 +1349,7 @@ Class HtmlMultiWidget include method for working with html
1332
1349
  * [HtmlMultiWidget](#user-content-w_HtmlMultiWidget) ⇐ [<code>MultiWidget</code>](#user-content-w_MultiWidget)
1333
1350
  * [new HtmlMultiWidget(selector, publicKey, conf)](#user-content-w_new_HtmlMultiWidget_new)
1334
1351
  * [.load()](#user-content-w_HtmlMultiWidget+load)
1335
- * [.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)
1336
1353
  * [.trigger(triggers, data)](#user-content-w_HtmlMultiWidget+trigger)
1337
1354
  * [.getValidationState()](#user-content-w_HtmlMultiWidget+getValidationState) ⇒ [<code>IFormValidation</code>](#user-content-w_IFormValidation)
1338
1355
  * [.isValidForm()](#user-content-w_HtmlMultiWidget+isValidForm) ⇒ <code>boolean</code>
@@ -1345,6 +1362,7 @@ Class HtmlMultiWidget include method for working with html
1345
1362
  * [.hideElements(elements)](#user-content-w_HtmlMultiWidget+hideElements)
1346
1363
  * [.showElements(elements)](#user-content-w_HtmlMultiWidget+showElements)
1347
1364
  * [.updateFormValues(fieldValues)](#user-content-w_HtmlMultiWidget+updateFormValues)
1365
+ * [.updateFormValue(key, value)](#user-content-w_HtmlMultiWidget+updateFormValue)
1348
1366
  * [.onFinishInsert(selector, dataType)](#user-content-w_HtmlMultiWidget+onFinishInsert)
1349
1367
  * [.interceptSubmitForm(selector)](#user-content-w_HtmlMultiWidget+interceptSubmitForm)
1350
1368
  * [.useCheckoutAutoSubmit()](#user-content-w_HtmlMultiWidget+useCheckoutAutoSubmit)
@@ -1357,7 +1375,7 @@ Class HtmlMultiWidget include method for working with html
1357
1375
  * [.setFormLabels(fieldLabels)](#user-content-w_MultiWidget+setFormLabels)
1358
1376
  * [.setFormPlaceholders(fieldPlaceholders)](#user-content-w_MultiWidget+setFormPlaceholders)
1359
1377
  * [.setFormElements(elements)](#user-content-w_MultiWidget+setFormElements)
1360
- * ~~[.setIcons()](#user-content-w_MultiWidget+setIcons)~~
1378
+ * [.setIcons()](#user-content-w_MultiWidget+setIcons)
1361
1379
  * [.setHiddenElements(elements)](#user-content-w_MultiWidget+setHiddenElements)
1362
1380
  * [.setRefId(refId)](#user-content-w_MultiWidget+setRefId)
1363
1381
  * [.useGatewayFieldValidation()](#user-content-w_MultiWidget+useGatewayFieldValidation)
@@ -1395,58 +1413,47 @@ var widget = new MultiWidget('#widget', 'publicKey',[ With Configurations
1395
1413
  <a name="w_HtmlMultiWidget+load" id="w_HtmlMultiWidget+load" href="#user-content-w_HtmlMultiWidget+load">&nbsp;</a>
1396
1414
 
1397
1415
  ### htmlMultiWidget.load()
1398
- The final method to beginning, the load process of widget to html
1399
-
1400
- **Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
1401
- <a name="w_HtmlMultiWidget+on" id="w_HtmlMultiWidget+on" href="#user-content-w_HtmlMultiWidget+on">&nbsp;</a>
1416
+ Loads the widget.
1402
1417
 
1403
- ### htmlMultiWidget.on(eventName, [cb]) <code>Promise.&lt;(IEventData\|IEventMetaData\|IEventFinishData\|IFormValidation)&gt;</code> \| <code>void</code>
1404
- Listen to events of widget
1418
+ Calling this method results in an iframe element being inserted and rendered in the DOM.
1405
1419
 
1406
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>
1407
1422
 
1408
- | Param | Type | Description |
1409
- | --- | --- | --- |
1410
- | eventName | <code>string</code> | Available event names [EVENT](#user-content-w_EVENT) |
1411
- | [cb] | <code>listener</code> | |
1412
-
1413
- **Example**
1423
+ ### htmlMultiWidget.afterLoad()
1424
+ Registers a form validation callback for validation events.
1414
1425
 
1415
- ```javascript
1416
- widget.on('form_submit', function (data) {
1417
- console.log(data);
1418
- });
1419
- // or
1420
- widget.on('form_submit').then(function (data) {
1421
- console.log(data);
1422
- });
1423
- ```
1426
+ **Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
1424
1427
  <a name="w_HtmlMultiWidget+trigger" id="w_HtmlMultiWidget+trigger" href="#user-content-w_HtmlMultiWidget+trigger">&nbsp;</a>
1425
1428
 
1426
1429
  ### htmlMultiWidget.trigger(triggers, data)
1427
- This callback will be called for every trigger
1430
+ Registers callback that will be invoked for every trigger.
1428
1431
 
1429
1432
  **Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
1430
1433
 
1431
1434
  | Param | Type | Description |
1432
1435
  | --- | --- | --- |
1433
- | triggers | <code>triggerName</code> | submit_form, tab |
1434
- | 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. |
1435
1438
 
1436
1439
  <a name="w_HtmlMultiWidget+getValidationState" id="w_HtmlMultiWidget+getValidationState" href="#user-content-w_HtmlMultiWidget+getValidationState">&nbsp;</a>
1437
1440
 
1438
1441
  ### htmlMultiWidget.getValidationState() ⇒ [<code>IFormValidation</code>](#user-content-w_IFormValidation)
1439
- 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.
1440
1445
 
1441
1446
  **Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
1442
1447
  **Returns**: [<code>IFormValidation</code>](#user-content-w_IFormValidation) - Form validation object
1443
1448
  <a name="w_HtmlMultiWidget+isValidForm" id="w_HtmlMultiWidget+isValidForm" href="#user-content-w_HtmlMultiWidget+isValidForm">&nbsp;</a>
1444
1449
 
1445
1450
  ### htmlMultiWidget.isValidForm() ⇒ <code>boolean</code>
1446
- 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.
1447
1454
 
1448
1455
  **Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
1449
- **Returns**: <code>boolean</code> - Form is valid
1456
+ **Returns**: <code>boolean</code> - Indicates wether or not form is valid.
1450
1457
  <a name="w_HtmlMultiWidget+isInvalidField" id="w_HtmlMultiWidget+isInvalidField" href="#user-content-w_HtmlMultiWidget+isInvalidField">&nbsp;</a>
1451
1458
 
1452
1459
  ### htmlMultiWidget.isInvalidField(field) ⇒ <code>boolean</code>
@@ -1462,85 +1469,89 @@ Using this method you can check if a specific form field is invalid
1462
1469
  <a name="w_HtmlMultiWidget+isFieldErrorShowed" id="w_HtmlMultiWidget+isFieldErrorShowed" href="#user-content-w_HtmlMultiWidget+isFieldErrorShowed">&nbsp;</a>
1463
1470
 
1464
1471
  ### htmlMultiWidget.isFieldErrorShowed(field) ⇒ <code>boolean</code>
1465
- 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.
1466
1473
 
1467
1474
  **Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
1468
- **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.
1469
1476
 
1470
1477
  | Param | Type | Description |
1471
1478
  | --- | --- | --- |
1472
- | field | <code>string</code> | Field name |
1479
+ | field | <code>string</code> | The form field name |
1473
1480
 
1474
1481
  <a name="w_HtmlMultiWidget+isInvalidFieldByValidator" id="w_HtmlMultiWidget+isInvalidFieldByValidator" href="#user-content-w_HtmlMultiWidget+isInvalidFieldByValidator">&nbsp;</a>
1475
1482
 
1476
1483
  ### htmlMultiWidget.isInvalidFieldByValidator(field, validator) ⇒ <code>boolean</code>
1477
- 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.
1478
1485
 
1479
1486
  **Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
1480
- **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.
1481
1488
 
1482
1489
  | Param | Type | Description |
1483
1490
  | --- | --- | --- |
1484
- | field | <code>string</code> | Field name |
1485
- | 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. |
1486
1493
 
1487
1494
  <a name="w_HtmlMultiWidget+hide" id="w_HtmlMultiWidget+hide" href="#user-content-w_HtmlMultiWidget+hide">&nbsp;</a>
1488
1495
 
1489
1496
  ### htmlMultiWidget.hide([saveSize])
1490
- 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.
1491
1500
 
1492
1501
  **Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
1493
1502
 
1494
1503
  | Param | Type | Default | Description |
1495
1504
  | --- | --- | --- | --- |
1496
- | [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. |
1497
1506
 
1498
1507
  <a name="w_HtmlMultiWidget+show" id="w_HtmlMultiWidget+show" href="#user-content-w_HtmlMultiWidget+show">&nbsp;</a>
1499
1508
 
1500
1509
  ### htmlMultiWidget.show()
1501
- 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.
1502
1513
 
1503
1514
  **Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
1504
1515
  <a name="w_HtmlMultiWidget+reload" id="w_HtmlMultiWidget+reload" href="#user-content-w_HtmlMultiWidget+reload">&nbsp;</a>
1505
1516
 
1506
1517
  ### htmlMultiWidget.reload()
1507
- Using this method you can reload widget
1518
+ Reloads the widget.
1508
1519
 
1509
1520
  **Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
1510
1521
  <a name="w_HtmlMultiWidget+hideElements" id="w_HtmlMultiWidget+hideElements" href="#user-content-w_HtmlMultiWidget+hideElements">&nbsp;</a>
1511
1522
 
1512
1523
  ### htmlMultiWidget.hideElements(elements)
1513
- Using this method you can hide any elements inside widget
1524
+ Hides the specified Widget elements by their identifier.
1514
1525
 
1515
1526
  **Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
1516
1527
 
1517
1528
  | Param | Type | Description |
1518
1529
  | --- | --- | --- |
1519
- | 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) |
1520
1531
 
1521
1532
  **Example**
1522
-
1523
1533
  ```javascript
1524
1534
  widget.hideElements(['submit_button', 'email']);
1525
1535
  ```
1526
1536
  <a name="w_HtmlMultiWidget+showElements" id="w_HtmlMultiWidget+showElements" href="#user-content-w_HtmlMultiWidget+showElements">&nbsp;</a>
1527
1537
 
1528
1538
  ### htmlMultiWidget.showElements(elements)
1529
- Using this method you can show any elements inside widget
1530
-
1531
- * @example
1532
- widget.showElements(['submit_button', 'email']);
1539
+ Shows the specified Widget elements by their identifier.
1533
1540
 
1534
1541
  **Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
1535
1542
 
1536
1543
  | Param | Type | Description |
1537
1544
  | --- | --- | --- |
1538
- | 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) |
1539
1546
 
1547
+ **Example**
1548
+ ```javascript
1549
+ widget.showElements(['submit_button', 'email']);
1550
+ ```
1540
1551
  <a name="w_HtmlMultiWidget+updateFormValues" id="w_HtmlMultiWidget+updateFormValues" href="#user-content-w_HtmlMultiWidget+updateFormValues">&nbsp;</a>
1541
1552
 
1542
1553
  ### htmlMultiWidget.updateFormValues(fieldValues)
1543
- Method for update values for form fields inside the widget
1554
+ Updates the form field values inside the widget.
1544
1555
 
1545
1556
  **Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
1546
1557
 
@@ -1549,51 +1560,68 @@ Method for update values for form fields inside the widget
1549
1560
  | fieldValues | <code>IFormValues</code> | Fields with values |
1550
1561
 
1551
1562
  **Example**
1552
-
1553
1563
  ```javascript
1554
1564
  widget.updateFormValues({
1555
- email: 'predefined@email.com',
1556
- card_name: 'Houston'
1557
- });
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");
1558
1584
  ```
1559
1585
  <a name="w_HtmlMultiWidget+onFinishInsert" id="w_HtmlMultiWidget+onFinishInsert" href="#user-content-w_HtmlMultiWidget+onFinishInsert">&nbsp;</a>
1560
1586
 
1561
1587
  ### htmlMultiWidget.onFinishInsert(selector, dataType)
1562
- 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.
1563
1589
 
1564
1590
  **Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
1565
1591
 
1566
1592
  | Param | Type | Description |
1567
1593
  | --- | --- | --- |
1568
- | selector | <code>string</code> | css selector . [] # |
1569
- | 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. |
1570
1596
 
1571
1597
  <a name="w_HtmlMultiWidget+interceptSubmitForm" id="w_HtmlMultiWidget+interceptSubmitForm" href="#user-content-w_HtmlMultiWidget+interceptSubmitForm">&nbsp;</a>
1572
1598
 
1573
1599
  ### htmlMultiWidget.interceptSubmitForm(selector)
1574
- Widget will intercept submit of your form for processing widget
1600
+ Intercepts a form submission and delegates processing to the widget.
1575
1601
 
1576
- 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
1577
1606
 
1578
1607
  **Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
1579
- **Note**: submit button in widget will be hidden.
1608
+ **Note**: The widget's submit button will be hidden.
1580
1609
 
1581
1610
  | Param | Type | Description |
1582
1611
  | --- | --- | --- |
1583
1612
  | selector | <code>string</code> | css selector of your form |
1584
1613
 
1585
1614
  **Example**
1586
-
1587
- ```javascript
1588
- <form id="myForm">
1615
+ ```html
1616
+ <body>
1617
+ <form id="myForm">
1589
1618
  <input name="amount">
1590
1619
  <button type="submit">Submit</button>
1591
1620
  </form>
1592
- <!--
1593
- -->
1594
- <script>
1621
+ <script>
1595
1622
  widget.interceptSubmitForm('#myForm');
1596
- </script>
1623
+ </script>
1624
+ </body>
1597
1625
  ```
1598
1626
  <a name="w_HtmlMultiWidget+useCheckoutAutoSubmit" id="w_HtmlMultiWidget+useCheckoutAutoSubmit" href="#user-content-w_HtmlMultiWidget+useCheckoutAutoSubmit">&nbsp;</a>
1599
1627
 
@@ -1608,7 +1636,6 @@ Use this method for resize iFrame according content height
1608
1636
 
1609
1637
  **Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
1610
1638
  **Example**
1611
-
1612
1639
  ```javascript
1613
1640
  widget.useAutoResize();
1614
1641
  ```
@@ -1814,13 +1841,15 @@ widget.setFormElements([
1814
1841
  ```
1815
1842
  <a name="w_MultiWidget+setIcons" id="w_MultiWidget+setIcons" href="#user-content-w_MultiWidget+setIcons">&nbsp;</a>
1816
1843
 
1817
- ### ~~htmlMultiWidget.setIcons()~~
1818
- ***Deprecated***
1819
-
1844
+ ### htmlMultiWidget.setIcons()
1820
1845
  The method to change the widget icons
1821
1846
 
1822
1847
  **Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
1823
1848
  **Overrides**: [<code>setIcons</code>](#user-content-w_MultiWidget+setIcons)
1849
+ **Todo**
1850
+
1851
+ - [ ] DEPRECATED
1852
+
1824
1853
  <a name="w_MultiWidget+setHiddenElements" id="w_MultiWidget+setHiddenElements" href="#user-content-w_MultiWidget+setHiddenElements">&nbsp;</a>
1825
1854
 
1826
1855
  ### htmlMultiWidget.setHiddenElements(elements)
@@ -2133,7 +2162,7 @@ Class MultiWidget include method for for creating iframe url
2133
2162
  * [.setFormLabels(fieldLabels)](#user-content-w_MultiWidget+setFormLabels)
2134
2163
  * [.setFormPlaceholders(fieldPlaceholders)](#user-content-w_MultiWidget+setFormPlaceholders)
2135
2164
  * [.setFormElements(elements)](#user-content-w_MultiWidget+setFormElements)
2136
- * ~~[.setIcons()](#user-content-w_MultiWidget+setIcons)~~
2165
+ * [.setIcons()](#user-content-w_MultiWidget+setIcons)
2137
2166
  * [.setHiddenElements(elements)](#user-content-w_MultiWidget+setHiddenElements)
2138
2167
  * [.setRefId(refId)](#user-content-w_MultiWidget+setRefId)
2139
2168
  * [.useGatewayFieldValidation()](#user-content-w_MultiWidget+useGatewayFieldValidation)
@@ -2359,12 +2388,14 @@ widget.setFormElements([
2359
2388
  ```
2360
2389
  <a name="w_MultiWidget+setIcons" id="w_MultiWidget+setIcons" href="#user-content-w_MultiWidget+setIcons">&nbsp;</a>
2361
2390
 
2362
- ### ~~multiWidget.setIcons()~~
2363
- ***Deprecated***
2364
-
2391
+ ### multiWidget.setIcons()
2365
2392
  The method to change the widget icons
2366
2393
 
2367
2394
  **Kind**: instance method of [<code>MultiWidget</code>](#user-content-w_MultiWidget)
2395
+ **Todo**
2396
+
2397
+ - [ ] DEPRECATED
2398
+
2368
2399
  <a name="w_MultiWidget+setHiddenElements" id="w_MultiWidget+setHiddenElements" href="#user-content-w_MultiWidget+setHiddenElements">&nbsp;</a>
2369
2400
 
2370
2401
  ### multiWidget.setHiddenElements(elements)
@@ -2661,6 +2692,32 @@ Current constant include available states of element for styling
2661
2692
  | FOCUS | <code>string</code> | <code>&quot;focus&quot;</code> | focus. This state applies to: input |
2662
2693
  | HOVER | <code>string</code> | <code>&quot;hover&quot;</code> | focus. This state applies to: submit_button |
2663
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
+
2664
2721
  <a name="w_TRIGGER" id="w_TRIGGER" href="#user-content-w_TRIGGER">&nbsp;</a>
2665
2722
 
2666
2723
  ## TRIGGER : <code>object</code>
@@ -2708,10 +2765,10 @@ var list = new paydock.HtmlPaymentSourceWidget('#list', 'publicKey', 'queryToken
2708
2765
  list.load();
2709
2766
  ```
2710
2767
 
2711
- ```javascript
2768
+ ```javascript--es2015
2712
2769
  // ES2015 | TypeScript
2713
2770
 
2714
- import { HtmlPaymentSourceWidget } from '@paydock/client-sdk';
2771
+ import { HtmlPaymentSourceWidget } from '@paydock/client-sdk/payment-source-widget';
2715
2772
 
2716
2773
  var list = new HtmlPaymentSourceWidget('#list', 'publicKey', 'queryToken');
2717
2774
  list.load();
@@ -2917,10 +2974,10 @@ Interface of data from event.
2917
2974
 
2918
2975
  | Param | Type | Description |
2919
2976
  | --- | --- | --- |
2920
- | event | <code>string</code> | Event name |
2921
- | purpose | <code>string</code> | System variable. Purpose of event |
2922
- | message_source | <code>string</code> | System variable. Event source |
2923
- | [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. |
2924
2981
  | total_item | <code>number</code> | Pagination param. Total item count |
2925
2982
  | skip | <code>number</code> | Pagination param. Skip items from first item |
2926
2983
  | limit | <code>number</code> | Pagination param. Query limit |
@@ -2934,10 +2991,10 @@ Interface of data from event.
2934
2991
 
2935
2992
  | Param | Type | Description |
2936
2993
  | --- | --- | --- |
2937
- | event | <code>string</code> | Event name |
2938
- | purpose | <code>string</code> | System variable. Purpose of event |
2939
- | message_source | <code>string</code> | System variable. Event source |
2940
- | [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. |
2941
2998
 
2942
2999
  <a name="psw_IEventSizeData" id="psw_IEventSizeData" href="#user-content-psw_IEventSizeData">&nbsp;</a>
2943
3000
 
@@ -2948,10 +3005,10 @@ Interface of data from event.
2948
3005
 
2949
3006
  | Param | Type | Description |
2950
3007
  | --- | --- | --- |
2951
- | event | <code>number</code> | Event name |
2952
- | purpose | <code>number</code> | System variable. Purpose of event |
2953
- | message_source | <code>string</code> | System variable. Event source |
2954
- | [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. |
2955
3012
  | height | <code>number</code> | Height of iFrame |
2956
3013
  | width | <code>number</code> | Width of iFrame |
2957
3014
 
@@ -3424,7 +3481,7 @@ You must create a button to turn it into checkout-button
3424
3481
  var button = new paydock.PaypalCheckoutButton('#button', 'publicKey', 'gatewayId');
3425
3482
  ```
3426
3483
 
3427
- ```javascript
3484
+ ```javascript--es2015
3428
3485
  // ES2015 | TypeScript
3429
3486
 
3430
3487
 
@@ -4567,11 +4624,11 @@ This wrapper helps you to work with paydock api emdpoints
4567
4624
  var browserDetails = await new paydock.Api('publicKey').setEnv('env').getBrowserDetails();
4568
4625
  ```
4569
4626
 
4570
- ```javascript
4627
+ ```javascript--es2015
4571
4628
  // ES2015 | TypeScript
4572
4629
 
4573
- import { Api } from '@paydock/client-sdk';
4574
-
4630
+ import { Api } from '@paydock/client-sdk/api';
4631
+
4575
4632
  var browserDetails = await new paydock.Api('publicKey').setEnv('env').getBrowserDetails();
4576
4633
  ```
4577
4634
 
@@ -4584,11 +4641,11 @@ var response = await new paydock.Api('publicKey').setEnv('env').charge().preAuth
4584
4641
  });
4585
4642
  ```
4586
4643
 
4587
- ```javascript
4644
+ ```javascript--es2015
4588
4645
  // ES2015 | TypeScript
4589
4646
 
4590
- import { Api } from '@paydock/client-sdk';
4591
-
4647
+ import { Api } from '@paydock/client-sdk/api';
4648
+
4592
4649
  var response = await new Api('publicKey').setEnv('env').charge().preAuth({
4593
4650
  amount: 100,
4594
4651
  currency: 'AUD',
@@ -4598,7 +4655,7 @@ var response = await new Api('publicKey').setEnv('env').charge().preAuth({
4598
4655
 
4599
4656
  Then write only need 2 lines of code in js to make request
4600
4657
 
4601
- ### Initialization full example
4658
+ ### Initialization full example
4602
4659
 
4603
4660
  ```html
4604
4661
  <!DOCTYPE html>
@@ -4645,10 +4702,10 @@ var canvas3ds = new paydock.Canvas3ds('#widget', 'token');
4645
4702
  canvas3ds.load();
4646
4703
  ```
4647
4704
 
4648
- ```javascript
4705
+ ```javascript--es2015
4649
4706
  // ES2015 | TypeScript
4650
4707
 
4651
- import { Canvas3ds } from '@paydock/client-sdk';
4708
+ import { Canvas3ds } from '@paydock/client-sdk/canvas3ds';
4652
4709
 
4653
4710
  var list = new Canvas3ds('#widget', 'token');
4654
4711
  list.load();
@@ -4869,7 +4926,7 @@ After you initialized the standalone 3ds charge via `v1/charges/standalone-3ds`
4869
4926
  ## Vault Display Widget
4870
4927
  You can find description of all methods and parameters [here](https://www.npmjs.com/package/@paydock/client-sdk#vault-display-widget)
4871
4928
 
4872
- 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.
4873
4930
  You can set styles as well as subscribe to widget events that help monitor user’s actions in real time.
4874
4931
 
4875
4932
  ## Vault Display Widget simple example
@@ -4889,18 +4946,18 @@ var widget = new paydock.VaultDisplayWidget('#widget', 'token');
4889
4946
  widget.load();
4890
4947
  ```
4891
4948
 
4892
- ```javascript
4949
+ ```javascript--es2015
4893
4950
  // ES2015 | TypeScript
4894
4951
 
4895
- import { VaultDisplayWidget } from '@paydock/client-sdk';
4896
-
4952
+ import { VaultDisplayWidget } from '@paydock/client-sdk/vault-display-widget';
4953
+
4897
4954
  var widget = new VaultDisplayWidget('#widget', 'token');
4898
4955
  widget.load();
4899
4956
  ```
4900
4957
 
4901
4958
  Then write only need 2 lines of code in js to initialize widget
4902
4959
 
4903
- ### Full example
4960
+ ### Full example
4904
4961
 
4905
4962
  ```html
4906
4963
  <!DOCTYPE html>
@@ -4911,9 +4968,9 @@ Then write only need 2 lines of code in js to initialize widget
4911
4968
  <style>iframe {border: 0;width: 100%;height: 300px;}</style>
4912
4969
  </head>
4913
4970
  <body>
4914
-
4971
+
4915
4972
  <div id="widget"></div>
4916
-
4973
+
4917
4974
  <script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js" ></script>
4918
4975
  <script>
4919
4976
  var widget = new paydock.VaultDisplayWidget('#widget', 'token');
@@ -4951,9 +5008,9 @@ widget.setStyles({
4951
5008
  });
4952
5009
  ```
4953
5010
 
4954
- 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
4955
5012
 
4956
- ### Full example
5013
+ ### Full example
4957
5014
 
4958
5015
  ```html
4959
5016
  <!DOCTYPE html>
@@ -4964,27 +5021,27 @@ This example shows how you can use a lot of other methods to settings your form
4964
5021
  <style>iframe {border: 0;width: 40%;height: 450px;}</style>
4965
5022
  </head>
4966
5023
  <body>
4967
-
5024
+
4968
5025
  <div id="widget"></div>
4969
-
5026
+
4970
5027
  <script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js" ></script>
4971
5028
  <script>
4972
5029
  var widget = new paydock.VaultDisplayWidget('#widget', 'token');
4973
5030
 
4974
5031
  widget.setEnv('sandbox');
4975
-
5032
+
4976
5033
  widget.on('after_load', function (data) {
4977
5034
  console.log(data);
4978
5035
  });
4979
-
5036
+
4980
5037
  widget.on('cvv_secure_code_requested', function (data) {
4981
5038
  console.log(data);
4982
5039
  });
4983
-
5040
+
4984
5041
  widget.on('card_number_secure_code_requested', function (data) {
4985
5042
  console.log(data);
4986
5043
  });
4987
-
5044
+
4988
5045
  widget.setStyles({
4989
5046
  background_color: 'rgb(0, 0, 0)',
4990
5047
  border_color: 'yellow',
@@ -5128,7 +5185,7 @@ let button = new paydock.WalletButtons(
5128
5185
  button.load();
5129
5186
  ```
5130
5187
 
5131
- ```javascript
5188
+ ```javascript--es2015
5132
5189
  // ES2015 | TypeScript
5133
5190
  import { WalletButtons } from '@paydock/client-sdk';
5134
5191
 
@@ -5153,7 +5210,7 @@ let button = new paydock.WalletButtons(
5153
5210
  button.load();
5154
5211
  ```
5155
5212
 
5156
- ```javascript
5213
+ ```javascript--es2015
5157
5214
  // ES2015 | TypeScript
5158
5215
  import { WalletButtons } from '@paydock/client-sdk';
5159
5216
 
@@ -5177,7 +5234,7 @@ let button = new paydock.WalletButtons(
5177
5234
  button.load();
5178
5235
  ```
5179
5236
 
5180
- ```javascript
5237
+ ```javascript--es2015
5181
5238
  // ES2015 | TypeScript
5182
5239
  import { WalletButtons } from '@paydock/client-sdk';
5183
5240
 
@@ -5246,6 +5303,14 @@ In some situations you may want to forcibly close the checkout so that your user
5246
5303
  button.close();
5247
5304
  ```
5248
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
+
5249
5314
  ### Performing actions when shipping info is updated
5250
5315
 
5251
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).
@@ -5373,30 +5438,51 @@ _(Required `meta` fields: - . Optional `meta` fields: `request_shipping`, `pay_l
5373
5438
  <script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js" ></script>
5374
5439
  <script>
5375
5440
  let button = new paydock.WalletButtons(
5376
- "#widget",
5377
- charge_token,
5378
- {
5379
- request_shipping: true,
5380
- pay_later: true,
5381
- standalone: false,
5382
- style: {
5383
- layout: 'horizontal',
5384
- color: 'blue',
5385
- shape: 'rect',
5386
- label: 'paypal',
5387
- },
5388
- }
5389
- );
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
+ );
5390
5455
  button.setEnv('sandbox');
5391
5456
  button.onUnavailable(() => console.log("No wallet buttons available"));
5392
5457
  button.onUpdate((data) => {
5393
- console.log("Updating amount via a backend to backend call to POST charges/:id");
5394
- // call `POST charges/:id` to modify charge
5395
- button.update({ success: true });
5396
- });
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
+ });
5397
5462
  button.onPaymentSuccessful((data) => console.log("The payment was successful"));
5398
5463
  button.onPaymentError((data) => console.log("The payment was not successful"));
5399
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
+
5400
5486
  button.load();
5401
5487
  </script>
5402
5488
  </html>
@@ -5530,6 +5616,7 @@ _(Required `meta` fields: `amount_label`, `country`. Optional `meta` fields: `ra
5530
5616
  button.onUnavailable(() => console.log("No wallet buttons available"));
5531
5617
  button.onPaymentSuccessful((data) => console.log("The payment was successful"));
5532
5618
  button.onPaymentError((data) => console.log("The payment was not successful"));
5619
+ button.onClick(() => console.log("On WalletButton Click"));
5533
5620
  button.onUpdate((data) => {
5534
5621
  console.log("Updating amount via a backend to backend call to POST charges/:id");
5535
5622
  // call `POST charges/:id` to modify charge
@@ -5562,7 +5649,6 @@ _(Required `meta` fields: `amount_label`, `country`. Optional `meta` fields: `ra
5562
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.
5563
5650
 
5564
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.
5565
-
5566
5652
  ### ApplePay and GooglePay via MPGS Raw data initialization example
5567
5653
 
5568
5654
  ```html
@@ -5694,6 +5780,24 @@ Similarly, for **GooglePay via MPGS** you can initialize the `PaymentMethodSpeci
5694
5780
  ## Interfaces
5695
5781
 
5696
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>
5697
5801
  <dt><a href="#IWalletMeta">IWalletMeta</a> : <code>object</code></dt>
5698
5802
  <dd><p>Interface of data used by the wallet checkout and payment proccess.</p>
5699
5803
  </dd>
@@ -5708,6 +5812,100 @@ Similarly, for **GooglePay via MPGS** you can initialize the `PaymentMethodSpeci
5708
5812
  </dd>
5709
5813
  </dl>
5710
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
+
5711
5909
  <a name="IWalletMeta" id="IWalletMeta" href="#IWalletMeta">&nbsp;</a>
5712
5910
 
5713
5911
  ## IWalletMeta : <code>object</code>
@@ -5792,14 +5990,19 @@ Class WalletButtons to work with different E-Wallets within html (currently supp
5792
5990
  * [.load()](#WalletButtons+load)
5793
5991
  * [.update()](#WalletButtons+update)
5794
5992
  * [.setEnv(env, [alias])](#WalletButtons+setEnv)
5993
+ * [.enable()](#WalletButtons+enable)
5994
+ * [.disable()](#WalletButtons+disable)
5795
5995
  * [.close()](#WalletButtons+close)
5796
- * [.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>
5797
5997
  * [.onUnavailable([handler])](#WalletButtons+onUnavailable)
5798
5998
  * [.onUpdate([handler])](#WalletButtons+onUpdate)
5799
5999
  * [.onPaymentSuccessful([handler])](#WalletButtons+onPaymentSuccessful)
5800
6000
  * [.onPaymentInReview([handler])](#WalletButtons+onPaymentInReview)
5801
6001
  * [.onPaymentError([handler])](#WalletButtons+onPaymentError)
5802
6002
  * [.onAuthTokensChanged([handler])](#WalletButtons+onAuthTokensChanged)
6003
+ * [.onClick(handler)](#WalletButtons+onClick)
6004
+ * [.onCheckoutOpen(handler)](#WalletButtons+onCheckoutOpen)
6005
+ * [.onCheckoutClose(handler)](#WalletButtons+onCheckoutClose)
5803
6006
 
5804
6007
  <a name="new_WalletButtons_new" id="new_WalletButtons_new" href="#new_WalletButtons_new">&nbsp;</a>
5805
6008
 
@@ -5910,6 +6113,26 @@ Bear in mind that you must set an environment before calling `button.load()`.
5910
6113
  ```js
5911
6114
  button.setEnv('production', 'paydock.com');
5912
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
+ ```
5913
6136
  <a name="WalletButtons+close" id="WalletButtons+close" href="#WalletButtons+close">&nbsp;</a>
5914
6137
 
5915
6138
  ### walletButtons.close()
@@ -5922,7 +6145,7 @@ button.close();
5922
6145
  ```
5923
6146
  <a name="WalletButtons+on" id="WalletButtons+on" href="#WalletButtons+on">&nbsp;</a>
5924
6147
 
5925
- ### 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>
5926
6149
  Listen to events of button. `unavailable` returns no data, `paymentSuccessful` returns IWalletPaymentSuccessful
5927
6150
  for Stripe or full response for Flypay, and `paymentError` an error.
5928
6151
 
@@ -6085,6 +6308,63 @@ button.onAuthTokensChanged().then((eventData) => {
6085
6308
  console.log('Authentication tokens changed:', eventData);
6086
6309
  });
6087
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
+ ```
6088
6368
  <a name="EVENT" id="EVENT" href="#EVENT">&nbsp;</a>
6089
6369
 
6090
6370
  ## EVENT : <code>object</code>
@@ -6098,56 +6378,45 @@ List of available event's name in the wallet button lifecycle
6098
6378
  | UPDATE | <code>string</code> | <code>&quot;update&quot;</code> |
6099
6379
  | PAYMENT_SUCCESSFUL | <code>string</code> | <code>&quot;paymentSuccessful&quot;</code> |
6100
6380
  | PAYMENT_ERROR | <code>string</code> | <code>&quot;paymentError&quot;</code> |
6381
+ | ON_CLICK | <code>string</code> | <code>&quot;onClick&quot;</code> |
6101
6382
 
6102
6383
 
6103
- ## Secure Remote Commerce
6104
- You can find description of all methods and parameters [here](https://www.npmjs.com/package/@paydock/client-sdk#SRC).
6105
-
6106
- This widget provides you with the ability to easily integrate with SRC providers. Currently Visa SRC is supported.
6107
-
6384
+ # Secure Remote Commerce
6385
+ ## Overview
6386
+ Integrate with Mastercard SRC using Paydock's Mastercard SRC widget.
6387
+ For a full description of the methods and parameters, reference the [README file](https://www.npmjs.com/package/@paydock/client-sdk#SRC).
6108
6388
  ## SRC simple example
6109
-
6110
- ### Container
6111
-
6389
+ The following section provides an example use case and integration for the widget.
6390
+ ### Create a Container
6391
+ To integrate the SRC checkout iFrame, create a container in your HTML code. This container serves as the placeholder for the iFrame.
6112
6392
  ```html
6113
- <div id="checkoutButton"></div>
6114
6393
  <div id="checkoutIframe"></div>
6115
6394
  ```
6116
-
6117
- You must create a container for the initial checkout button, and a different one for the checkout iFrame. Inside the first tag the button will be initialized, and inside the second one the iFrame will be loaded once the button is clicked.
6118
-
6119
-
6120
- ### Initialization
6395
+ ### Initialize the Widget
6396
+ Use the following code to initialize your widget:
6121
6397
  ```javascript
6122
- var src = new paydock.SRC(
6123
- "#checkoutButton",
6398
+ var src = new paydock.MastercardSRCClickToPay(
6124
6399
  "#checkoutIframe",
6125
- "scheme_service_id",
6400
+ "service_id",
6126
6401
  "paydock_public_key_or_access_token",
6127
6402
  {}, // meta
6128
6403
  );
6129
6404
  src.load();
6130
6405
  ```
6131
-
6132
- ```javascript
6406
+ ```javascript--es2015
6133
6407
  // ES2015 | TypeScript
6134
-
6135
- import { SRC } from '@paydock/client-sdk';
6136
-
6137
- var src = new SRC(
6138
- "#checkoutButton",
6408
+ import { MastercardSRCClickToPay } from '@paydock/client-sdk';
6409
+ var src = new MastercardSRCClickToPay(
6139
6410
  "#checkoutIframe",
6140
- "scheme_service_id",
6411
+ "service_id",
6141
6412
  "paydock_public_key_or_access_token",
6142
6413
  {}, // meta
6143
6414
  );
6144
6415
  src.load();
6145
6416
  ```
6146
-
6147
- *NOTE:* it's highly recommended to use a Paydock Access Token instead of the public key for security reasons. When creating it, you will need to enable the `Secure Remote Commerce` and add a whiteliste for the domain of your checkout screen.
6148
-
6417
+ *NOTE:* Paydock recommends that you use a Paydock Access Token instead of a public key for security reasons in production environments. When creating your access token, you must enable the `Secure Remote Commerce` and add a whitelist for the domain of your checkout screen.
6149
6418
  ### Full example
6150
-
6419
+ A full example of the container and the initialized widget is as follows:
6151
6420
  ```html
6152
6421
  <!DOCTYPE html>
6153
6422
  <html lang="en">
@@ -6157,14 +6426,12 @@ src.load();
6157
6426
  <style>iframe {border: 0;width: 40%;height: 300px;}</style>
6158
6427
  </head>
6159
6428
  <body>
6160
- <div id="checkoutButton"></div>
6161
6429
  <div id="checkoutIframe"></div>
6162
6430
  <script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js" ></script>
6163
6431
  <script>
6164
- var src = new paydock.SRC(
6165
- "#checkoutButton",
6432
+ var src = new paydock.MastercardSRCClickToPay(
6166
6433
  "#checkoutIframe",
6167
- "scheme_service_id",
6434
+ "service_id",
6168
6435
  "paydock_public_key_or_access_token",
6169
6436
  {},
6170
6437
  );
@@ -6173,53 +6440,27 @@ src.load();
6173
6440
  </body>
6174
6441
  </html>
6175
6442
  ```
6176
-
6177
-
6178
- ## SRC advanced example
6179
-
6443
+ ## Customize your SRC Checkout
6444
+ The following is an advanced example that includes customization. You can use these methods to enhance your checkout experience.
6180
6445
  ### Settings
6181
-
6182
6446
  ```javascript
6183
-
6184
- src.setEnv('sandbox'); // set enviroment
6185
-
6186
- src.hideButton(); // hide button
6187
-
6188
- src.showButton(); // show button
6189
-
6447
+ src.setEnv('sandbox'); // set environment
6190
6448
  src.hideCheckout(); // hide checkout iframe
6191
-
6192
6449
  src.showCheckout(); // show checkout iframe
6193
-
6194
- src.on('checkoutButtonLoaded', () => {
6195
- console.log("Button loaded");
6196
- });
6197
-
6198
- src.on('checkoutButtonClicked', () => {
6199
- console.log("Button clicked");
6200
- });
6201
-
6202
6450
  src.on('iframeLoaded', () => {
6203
6451
  console.log("Initial iframe loaded");
6204
6452
  });
6205
-
6206
6453
  src.on('checkoutReady', () => {
6207
6454
  console.log("Checkout ready to be used");
6208
6455
  });
6209
-
6210
6456
  src.on('checkoutCompleted', (token) => {
6211
6457
  console.log(token);
6212
6458
  });
6213
-
6214
6459
  src.on('checkoutError', (error) => {
6215
6460
  console.log(error);
6216
6461
  });
6217
6462
  ```
6218
-
6219
- Here you can see how you can use this methods to customize your checkout experience
6220
-
6221
6463
  ### Full example
6222
-
6223
6464
  ```html
6224
6465
  <!DOCTYPE html>
6225
6466
  <html lang="en">
@@ -6229,64 +6470,67 @@ Here you can see how you can use this methods to customize your checkout experie
6229
6470
  <style>iframe {border: 0;width: 40%;height: 450px;}</style>
6230
6471
  </head>
6231
6472
  <body>
6232
- <div id="checkoutButton"></div>
6233
6473
  <div id="checkoutIframe"></div>
6234
6474
  <script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js" ></script>
6235
6475
  <script>
6236
- var src = new paydock.SRC(
6237
- "#checkoutButton",
6476
+ var src = new paydock.MastercardSRCClickToPay(
6238
6477
  "#checkoutIframe",
6239
- "scheme_service_id",
6478
+ "service_id",
6240
6479
  "paydock_public_key_or_access_token",
6241
6480
  {},
6242
6481
  );
6243
-
6482
+ src.on('iframeLoaded', () => {
6483
+ console.log("Initial iframe loaded");
6484
+ });
6244
6485
  src.on('checkoutReady', () => {
6245
6486
  console.log("Checkout ready to be used");
6246
6487
  });
6247
-
6248
6488
  src.on('checkoutCompleted', (token) => {
6249
6489
  console.log(token);
6250
6490
  });
6491
+ src.on('checkoutError', (error) => {
6492
+ console.log(error);
6493
+ });
6251
6494
  src.load();
6252
6495
  </script>
6253
6496
  </body>
6254
6497
  </html>
6255
6498
  ```
6256
-
6257
- ## Customization options for address fields
6258
- ### Shipping address:
6259
-
6260
- To customize shipping address experience we use a flag that manages how VisaSRC requires or not shipping address to the customer. Options are NONE (default option), POSTAL_COUNTRY or ALL.
6261
-
6499
+ ## Customize your billing address fields
6500
+ To customize your billing address experience, Paydock uses a flag that manages whether a customer's billing address is mandatory.
6501
+ The options for this customization are NONE (default option), and POSTAL_COUNTRY or FULL.
6262
6502
  ```
6263
- var src = new paydock.SRC(
6264
- "#checkoutButton",
6503
+ var src = new paydock.MastercardSRCClickToPay(
6265
6504
  "#checkoutIframe",
6266
- "scheme_service_id",
6505
+ "service_id",
6267
6506
  "paydock_public_key_or_access_token",
6268
6507
  {
6269
6508
  "dpa_transaction_options": {
6270
- "dpa_shipping_preference": "ALL"
6509
+ "dpa_billing_preference": "FULL"
6271
6510
  }
6272
6511
  },
6273
6512
  );
6274
6513
  ```
6275
-
6276
- With this the Visa popup requires the shipping address from consumer, and these information will be stored in the Paydock charge.
6277
-
6278
- Another option is at time of creating the charge. Say that you have a different way of collecting the shipping address (outside Paydock checkout), you can then disable the shipping address on our SRC widget and send it when creating the charge creation after getting the One Time Token out of the SRC widget:
6279
-
6514
+ The SRC checkout in the example requires the billing address from the customer, which is then returned as a part of the checkout data. The data is then stored and leveraged in the Paydock charge.
6515
+ You can also provide the billing address at the time of creating the charge. For example, if you have a different method for collecting the billing address, such as outside of the SRC checkout, you can provide it alongside other information at the charge creation step:
6516
+ 1. Disable the billing address in Paydock's SRC widget.
6517
+ 2. Get your One Time Token from the SRC widget alongside other details that may have been collected outside the SRC checkout as the shipping address.
6518
+ 3. Send the billing address when creating the charge.
6280
6519
  ```
6281
6520
  POST v1/charges
6282
-
6283
6521
  {
6284
6522
  "amount": "10.00",
6285
6523
  "currency": "AUD",
6286
- "token": "token",
6524
+ "token": "one_time_token",
6287
6525
  "customer": {
6288
6526
  "payment_source": {
6289
- "gateway_id": "gateway_id"
6527
+ "gateway_id": "gateway_id",
6528
+ "address_line1": "address_line1",
6529
+ "address_line2": "address_line2",
6530
+ "address_city": "address_city",
6531
+ "address_postcode": "address_postcode",
6532
+ "address_state": "address_state",
6533
+ "address_country": "address_country"
6290
6534
  }
6291
6535
  },
6292
6536
  "shipping": {
@@ -6300,202 +6544,254 @@ POST v1/charges
6300
6544
  }
6301
6545
  }
6302
6546
  ```
6303
-
6304
- - Billing address:
6305
-
6306
- Billing address fields are always present on the checkout and required when adding a new credit card (or for new consumer checkout). You can send billing fields on the meta data to pre-fill these fields inside the customer object:
6307
-
6547
+ ## How to customize accepted cards
6548
+ You can send a flag `unaccepted_card_type` to block the usage of a specific card type. The available options are 'DEBIT' and 'CREDIT'.
6549
+ ### Example code
6550
+ The following example demonstrates how to block the card:
6308
6551
  ```
6309
- var src = new paydock.SRC(
6310
- "#checkoutButton",
6552
+ var src = new paydock.MastercardSRCClickToPay(
6311
6553
  "#checkoutIframe",
6312
- "scheme_service_id",
6313
- "paydock_public_key_or_access_token",
6554
+ "service_id",
6555
+ "paydock_public_key",
6314
6556
  {
6315
- "customer": {
6316
- "email": "test@email.com",
6317
- "first_name": "Name",
6318
- "last_name": "Surname",
6319
- "phone": {
6320
- "country_code": "1",
6321
- "phone": "2124567890"
6322
- },
6323
- "payment_source": {
6324
- "address_line1": "Line 1",
6325
- "address_line2": "Line 2",
6326
- "address_city": "Miami",
6327
- "address_postcode": "33126",
6328
- "address_state": "FL",
6329
- "address_country": "US"
6330
- }
6331
- }
6557
+ unaccepted_card_type: 'DEBIT'
6332
6558
  },
6333
6559
  );
6334
6560
  ```
6335
-
6336
- ## Personalization Styling
6337
-
6338
- To improve the experience in the use of the widget, it is allowed to send props that customize the UI.
6339
-
6561
+ ## Personalize the Style
6562
+ Customize the look and feel of your UI. The following example demonstrates changes in the styling of the buttons.
6340
6563
  ### Example code
6341
-
6342
6564
  ```
6343
- var src = new paydock.SRC(
6344
- "#checkoutButton",
6565
+ var src = new paydock.MastercardSRCClickToPay(
6345
6566
  "#checkoutIframe",
6346
- "scheme_service_id",
6567
+ "service_id",
6347
6568
  "paydock_public_key",
6569
+ {},
6348
6570
  );
6349
-
6350
- button.setStyles({"primary_color":"#a83232","button_text_color":"#171e9c","font_family":"sans-serif"})
6351
-
6571
+ src.setStyles({
6572
+ enable_src_popup: true,
6573
+ primary_button_color: 'red',
6574
+ secondary_button_color: 'red',
6575
+ primary_button_text_color: 'red',
6576
+ secondary_button_text_color: 'red',
6577
+ font_family: 'Arial',
6578
+ });
6352
6579
  ```
6353
- ## Event and Values
6354
-
6355
- | Event Value | Type | Description |
6356
- | ------------------- | ------------------- | -------------------------------------------------------------- |
6357
- | primary_color | <code>string</code> | HEX color for the principal buttons, example : #32a852 |
6358
- | button_text_color | <code>string</code> | HEX color for the text of the buttons, example : #32a852|
6359
- | font_family | <code>string</code> | Look more [mozilla.org/color](https://developer.mozilla.org/en-US/docs/Web/CSS/font-family)|
6360
- | card_schemes | <code>[string] - array of string</code> | Possible values "visa", "mastercard", "amex" and "discover" - Default show all logos
6361
6580
 
6362
6581
  ## Classes
6363
6582
 
6364
6583
  <dl>
6365
- <dt><a href="#SRC">SRC</a></dt>
6366
- <dd><p>Class SRC include methods for interacting with different secure remote commerce options such as Visa SRC</p>
6584
+ <dt><a href="#MastercardSRCClickToPay">MastercardSRCClickToPay</a> ⇐ <code>SRC</code></dt>
6585
+ <dd><p>Class MastercardSRCClickToPay include methods for interacting with the MastercardSRC checkout and Manual Card option</p>
6367
6586
  </dd>
6368
6587
  </dl>
6369
6588
 
6370
6589
  ## Interfaces
6371
6590
 
6372
6591
  <dl>
6373
- <dt><a href="#IVisaSRCMeta">IVisaSRCMeta</a> : <code>object</code></dt>
6374
- <dd><p>Interface of data used for the Visa Checkout.</p>
6592
+ <dt><a href="#IMastercardSRCMeta">IMastercardSRCMeta</a> : <code>object</code></dt>
6593
+ <dd><p>Interface of data used for the Mastercard Checkout. For further information refer to <a href="https://developer.mastercard.com/unified-checkout-solutions/documentation/sdk-reference/init">the documentation</a>.</p>
6594
+ </dd>
6595
+ <dt><a href="#EventData">EventData</a> : <code>object</code></dt>
6596
+ <dd><p>Interface for data returned in callbacks</p>
6597
+ </dd>
6598
+ <dt><a href="#EventDataCheckoutCompletedData">EventDataCheckoutCompletedData</a> : <code>object</code></dt>
6599
+ <dd><p>Event data returned for checkoutCompleted callback, holding the One Time Token and the flow type completed.
6600
+ When the flow type is src, masked checkoutData available is also returned</p>
6601
+ </dd>
6602
+ <dt><a href="#IStyles">IStyles</a> : <code>object</code></dt>
6603
+ <dd><p>Interface for style configs inyected to the SRC checkout</p>
6375
6604
  </dd>
6376
6605
  </dl>
6377
6606
 
6378
- <a name="IVisaSRCMeta" id="IVisaSRCMeta" href="#IVisaSRCMeta">&nbsp;</a>
6607
+ <a name="IMastercardSRCMeta" id="IMastercardSRCMeta" href="#IMastercardSRCMeta">&nbsp;</a>
6379
6608
 
6380
- ## IVisaSRCMeta : <code>object</code>
6381
- Interface of data used for the Visa Checkout.
6609
+ ## IMastercardSRCMeta : <code>object</code>
6610
+ Interface of data used for the Mastercard Checkout. For further information refer to [the documentation](https://developer.mastercard.com/unified-checkout-solutions/documentation/sdk-reference/init).
6382
6611
 
6383
6612
  **Kind**: global interface
6384
6613
 
6385
6614
  | Param | Type | Description |
6386
6615
  | --- | --- | --- |
6387
- | [srci_transaction_id] | <code>string</code> | Used to identify the SRC Id. |
6616
+ | [disable_summary_screen] | <code>boolean</code> | Boolean flag that controls if a final summary screen is presented in the checkout flow. |
6388
6617
  | [dpa_data] | <code>object</code> | Object where the DPA creation data is stored. |
6389
- | [dpa_data.dpa_presentation_name] | <code>string</code> | Name in which the DPA is presented in. |
6618
+ | [dpa_data.dpa_presentation_name] | <code>string</code> | Name in which the DPA is presented. |
6390
6619
  | [dpa_data.dpa_uri] | <code>string</code> | Used for indicating the DPA URI. |
6391
- | [dpa_transaction_options] | <code>object</code> | Object that stores options for creating a trasaction with DPA. |
6620
+ | [dpa_data.dpa_address] | <code>string</code> | Address associated with the DPA. |
6621
+ | [dpa_data.dpa_email_address] | <code>string</code> | Email address for DPA communication. |
6622
+ | [dpa_data.dpa_phone_number] | <code>object</code> | Phone number structure for DPA communication. |
6623
+ | [dpa_data.dpa_phone_number.country_code] | <code>string</code> | The country code of the phone number. |
6624
+ | [dpa_data.dpa_phone_number.phone_number] | <code>string</code> | The phone number part of the phone number. |
6625
+ | [dpa_data.dpa_logo_uri] | <code>string</code> | URI for the DPA logo. |
6626
+ | [dpa_data.dpa_supported_email_address] | <code>string</code> | Supported email address for DPA support. |
6627
+ | [dpa_data.dpa_supported_phone_number] | <code>object</code> | Supported phone number for DPA support. |
6628
+ | [dpa_data.dpa_supported_phone_number.country_code] | <code>string</code> | The country code of the phone number. |
6629
+ | [dpa_data.dpa_supported_phone_number.phone_number] | <code>string</code> | The phone number part of the phone number. |
6630
+ | [dpa_data.dpa_support_uri] | <code>string</code> | URI for DPA support. |
6631
+ | [dpa_data.application_type] | <code>string</code> | Application type, either 'WEB_BROWSER' or 'MOBILE_APP'. |
6632
+ | [co_brand_names] | <code>Array.&lt;string&gt;</code> | List of co-brand names associated with the SRC experience. |
6633
+ | [checkout_experience] | <code>string</code> | Checkout experience type, either 'WITHIN_CHECKOUT' or 'PAYMENT_SETTINGS'. |
6634
+ | [services] | <code>string</code> | Services offered, such as 'INLINE_CHECKOUT' or 'INLINE_INSTALLMENTS'. |
6635
+ | [dpa_transaction_options] | <code>object</code> | Object that stores options for creating a transaction with DPA. |
6392
6636
  | [dpa_transaction_options.dpa_locale] | <code>string</code> | DPA’s preferred locale, example en_US. |
6393
- | [dpa_transaction_options.dpa_accepted_billing_countries] | <code>Array</code> | Used to indicate list of accepted billing countries for DPA. |
6394
- | [dpa_transaction_options.dpa_accepted_shipping_countries] | <code>Array</code> | Used to indicate list of accepted shipping countries for DPA. |
6395
- | [dpa_transaction_options.dpa_billing_preference] | <code>string</code> | Used for listing the enumeration for billing preferences for DPA. Options are 'ALL', 'POSTAL_COUNTRY' and 'NONE'. |
6396
- | [dpa_transaction_options.dpa_shipping_preference] | <code>string</code> | Used for listing the enumeration for shipping preferences for DPA. Options are 'ALL', 'POSTAL_COUNTRY' and 'NONE'. |
6397
- | [dpa_transaction_options.consumer_name_requested] | <code>boolean</code> | Used to check if the name of the consumer is needed. |
6398
- | [dpa_transaction_options.consumer_email_address_requested] | <code>boolean</code> | Used to check if the email of the consumer is needed. |
6399
- | [dpa_transaction_options.consumer_phone_number_requested] | <code>boolean</code> | Used to check if the phone number of the consumer is needed. |
6400
- | [dpa_transaction_options.payment_options] | <code>object</code> | Object used to check the payment options that are included. |
6401
- | [dpa_transaction_options.payment_options.dpa_dynamic_data_ttl_minutes] | <code>number</code> | The minimum requested validity period for the transaction credentials. |
6402
- | [dpa_transaction_options.payment_options.dynamic_data_type] | <code>string</code> | Used for listing the enumeration for dynamic data types. Options are 'TAVV' and 'DTVV'. |
6403
- | [dpa_transaction_options.payment_options.dpa_pan_requested] | <code>boolean</code> | Used to check if PAN number was requested. |
6404
- | [dpa_transaction_options.review_action] | <code>string</code> | Used for listing the enumeration of review actions. Options are 'pay' and 'continue'. |
6405
- | [dpa_transaction_options.checkout_description] | <code>string</code> | Used for indicating the description of the checkout. |
6406
- | [dpa_transaction_options.transaction_type] | <code>string</code> | Used for listing the enumeration of the type of the transaction. 'PURCHASE', 'BILL_PAYMENT' and 'MONEY_TRANSFER' |
6407
- | [dpa_transaction_options.order_type] | <code>string</code> | Used for listing the enumeration of the type of the order. Options are 'REAUTHORIZATION', 'RECURRING' and 'INSTALLMENT'. |
6408
- | [dpa_transaction_options.transaction_amount] | <code>object</code> | Object used to describe the details of the transaction. |
6409
- | [dpa_transaction_options.transaction_amount.transaction_amount] | <code>number</code> | Used to indicate the amount of the transaction. |
6410
- | [dpa_transaction_options.transaction_amount.transaction_currency_code] | <code>string</code> | Used to indicate the currency code of the transaction. 3 letter ISO code format. |
6411
- | [dpa_transaction_options.merchant_order_id] | <code>string</code> | Used to indicate the merchants order Id. |
6412
- | [dpa_transaction_options.merchant_category_code] | <code>string</code> | Used to indicate the merchants category code. |
6413
- | [dpa_transaction_options.merchant_country_code] | <code>string</code> | Used to indicate the merchants country code. 2 letter ISO code format. |
6637
+ | [dpa_transaction_options.dpa_accepted_billing_countries] | <code>Array.&lt;string&gt;</code> | List of accepted billing countries for DPA in ISO 3166-1 alpha-2 format. |
6638
+ | [dpa_transaction_options.dpa_billing_preference] | <code>string</code> | Billing preferences for DPA, options are 'FULL', 'POSTAL_COUNTRY', 'NONE'. |
6639
+ | [dpa_transaction_options.payment_options] | <code>Array.&lt;object&gt;</code> | Payment options included in the transaction. |
6640
+ | [dpa_transaction_options.payment_options.dynamic_data_type] | <code>string</code> | Dynamic data types. |
6641
+ | [dpa_transaction_options.order_type] | <code>string</code> | Type of the order, options are 'SPLIT_SHIPMENT', 'PREFERRED_CARD'. |
6642
+ | [dpa_transaction_options.three_ds_preference] | <code>string</code> | Preference for 3DS usage in the transaction. |
6643
+ | [dpa_transaction_options.confirm_payment] | <code>boolean</code> | Indicates if payment confirmation is required. |
6644
+ | [dpa_transaction_options.consumer_name_requested] | <code>boolean</code> | Indicates if consumer name is requested. |
6645
+ | [dpa_transaction_options.consumer_email_address_requested] | <code>boolean</code> | Indicates if consumer email address is requested. |
6646
+ | [dpa_transaction_options.consumer_phone_number_requested] | <code>boolean</code> | Indicates if consumer phone number is requested. |
6647
+ | [dpa_transaction_options.transaction_amount] | <code>object</code> | Details of the transaction amount. |
6648
+ | [dpa_transaction_options.transaction_amount.transaction_amount] | <code>number</code> | Amount of the transaction. |
6649
+ | [dpa_transaction_options.transaction_amount.transaction_currency_code] | <code>string</code> | Currency code of the transaction in 3 letter ISO code format. |
6650
+ | [dpa_transaction_options.merchant_order_id] | <code>string</code> | Merchant's order ID. |
6651
+ | [dpa_transaction_options.merchant_category_code] | <code>string</code> | Merchant's category code. |
6652
+ | [dpa_transaction_options.merchant_country_code] | <code>string</code> | Merchant's country code in ISO 3166-1 alpha-2 format. |
6414
6653
  | [customer] | <code>object</code> | Object where the customer data is stored to prefill in the checkout. |
6415
6654
  | [customer.email] | <code>string</code> | Customer email. |
6416
6655
  | [customer.first_name] | <code>string</code> | Customer first name. |
6417
6656
  | [customer.last_name] | <code>string</code> | Customer last name. |
6418
6657
  | [customer.phone] | <code>object</code> | Object where the customer phone is stored. |
6419
- | [customer.phone.country_code] | <code>string</code> | Customer phone country code (example "1" for US). |
6658
+ | [customer.phone.country_code] | <code>string</code> | Customer phone country code (example "1" for US). // TODO: Confirm if it can be removed! |
6420
6659
  | [customer.phone.phone] | <code>string</code> | Customer phone number. |
6421
- | [customer.payment_source] | <code>object</code> | Object where the customer billing address data is stored. |
6422
- | [customer.payment_source.address_line1] | <code>string</code> | Customer billing address line 1. |
6423
- | [customer.payment_source.address_line2] | <code>string</code> | Customer billing address line 2. |
6424
- | [customer.payment_source.address_city] | <code>string</code> | Customer billing address city. |
6425
- | [customer.payment_source.address_postcode] | <code>string</code> | Customer billing address postcode. |
6426
- | [customer.payment_source.address_state] | <code>string</code> | Customer billing address state code (if applicable for the country, example "FL" for Florida). |
6427
- | [customer.payment_source.address_country] | <code>string</code> | Customer billing address country code (example "US"). |
6660
+ | [unaccepted_card_type] | <code>string</code> | Used to block a specific card type. Options are 'CREDIT', 'DEBIT'. |
6661
+
6662
+ <a name="EventData" id="EventData" href="#EventData">&nbsp;</a>
6663
+
6664
+ ## EventData : <code>object</code>
6665
+ Interface for data returned in callbacks
6666
+
6667
+ **Kind**: global interface
6668
+
6669
+ | Param | Type | Description |
6670
+ | --- | --- | --- |
6671
+ | type | [<code>EVENT\_DATA\_TYPE</code>](#EVENT_DATA_TYPE) | Event type of type [EVENT_DATA_TYPE](#EVENT_DATA_TYPE) |
6672
+ | data | <code>string</code> \| [<code>EventDataCheckoutCompletedData</code>](#EventDataCheckoutCompletedData) | optional data returning a string for checkoutError event or [EventDataCheckoutCompletedData](#EventDataCheckoutCompletedData) for checkoutCompleted |
6673
+
6674
+ <a name="EventDataCheckoutCompletedData" id="EventDataCheckoutCompletedData" href="#EventDataCheckoutCompletedData">&nbsp;</a>
6675
+
6676
+ ## EventDataCheckoutCompletedData : <code>object</code>
6677
+ Event data returned for checkoutCompleted callback, holding the One Time Token and the flow type completed.
6678
+ When the flow type is src, masked checkoutData available is also returned
6679
+
6680
+ **Kind**: global interface
6681
+
6682
+ | Param | Type | Description |
6683
+ | --- | --- | --- |
6684
+ | type | <code>string</code> | type of the checkout, can be `src` or `manual`. |
6685
+ | token | <code>string</code> | one time token value. |
6686
+ | [checkoutData] | <code>object</code> | Optional checkout data related to the checkout information. Only available on src flow. |
6687
+ | [checkoutData.card_number_bin] | <code>string</code> | The BIN of the card used for the transaction. |
6688
+ | [checkoutData.card_number_last4] | <code>string</code> | The last four digits of the card number. |
6689
+ | [checkoutData.card_scheme] | <code>string</code> | The card scheme. Values: visa, mastercard, amex, diners, discover. |
6690
+ | [checkoutData.card_type] | <code>string</code> | The type of card. Values: credit, debit, prepaid, combo, flex. |
6691
+ | [checkoutData.address_line1] | <code>string</code> | Address line 1 for billing address. |
6692
+ | [checkoutData.address_line2] | <code>string</code> | Address line 2 for billing address. |
6693
+ | [checkoutData.address_line3] | <code>string</code> | Address line 3 for billing address. |
6694
+ | [checkoutData.address_city] | <code>string</code> | City for billing address. |
6695
+ | [checkoutData.address_postcode] | <code>string</code> | Postal code for billing address. |
6696
+ | [checkoutData.address_state] | <code>string</code> | State or province for billing address. |
6697
+ | [checkoutData.address_country] | <code>string</code> | Country for billing address. |
6698
+ | [checkoutData.shipping] | <code>object</code> | Optional shipping information. |
6699
+ | [checkoutData.shipping.address_line1] | <code>string</code> | Address line 1 for shipping address. |
6700
+ | [checkoutData.shipping.address_line2] | <code>string</code> | Address line 2 for shipping address. |
6701
+ | [checkoutData.shipping.address_line3] | <code>string</code> | Address line 3 for shipping address. |
6702
+ | [checkoutData.shipping.address_city] | <code>string</code> | City for shipping address. |
6703
+ | [checkoutData.shipping.address_postcode] | <code>string</code> | Postal code for shipping address. |
6704
+ | [checkoutData.shipping.address_state] | <code>string</code> | State or province for shipping address. |
6705
+ | [checkoutData.shipping.address_country] | <code>string</code> | Country for shipping address. |
6706
+
6707
+ <a name="IStyles" id="IStyles" href="#IStyles">&nbsp;</a>
6708
+
6709
+ ## IStyles : <code>object</code>
6710
+ Interface for style configs inyected to the SRC checkout
6711
+
6712
+ **Kind**: global interface
6713
+
6714
+ | Param | Type | Description |
6715
+ | --- | --- | --- |
6716
+ | [primary_button_color] | <code>string</code> | Color Code for primary button. |
6717
+ | [primary_button_text_color] | <code>string</code> | Color Code for primary button text. |
6718
+ | [secondary_button_color] | <code>string</code> | Color Code for secondary button. |
6719
+ | [secondary_button_text_color] | <code>string</code> | Color Code for secondary button text. |
6720
+ | [font_family] | <code>string</code> | Font family to be used. |
6721
+ | [enable_src_popup] | <code>boolean</code> | Boolean flag to make the SRC checkout show in a popup window instead of embedded in iframe. |
6428
6722
 
6429
- <a name="SRC" id="SRC" href="#SRC">&nbsp;</a>
6723
+ <a name="MastercardSRCClickToPay" id="MastercardSRCClickToPay" href="#MastercardSRCClickToPay">&nbsp;</a>
6430
6724
 
6431
- ## SRC
6432
- Class SRC include methods for interacting with different secure remote commerce options such as Visa SRC
6725
+ ## MastercardSRCClickToPay ⇐ <code>SRC</code>
6726
+ Class MastercardSRCClickToPay include methods for interacting with the MastercardSRC checkout and Manual Card option
6433
6727
 
6434
6728
  **Kind**: global class
6729
+ **Extends**: <code>SRC</code>
6435
6730
 
6436
- * [SRC](#SRC)
6437
- * [new SRC(button_selector, iframe_selector, service_id, public_key_or_access_token, meta)](#new_SRC_new)
6731
+ * [MastercardSRCClickToPay](#MastercardSRCClickToPay) ⇐ <code>SRC</code>
6732
+ * [new MastercardSRCClickToPay(iframe_selector, service_id, public_key_or_access_token, meta)](#new_MastercardSRCClickToPay_new)
6733
+ * [.load()](#MastercardSRCClickToPay+load)
6438
6734
  * [.setStyles(fields)](#SRC+setStyles)
6439
- * [.load()](#SRC+load)
6440
6735
  * [.setEnv(env, [alias])](#SRC+setEnv)
6441
6736
  * [.getEnv()](#SRC+getEnv)
6442
6737
  * [.on(eventName, [cb])](#SRC+on) ⇒ <code>Promise.&lt;any&gt;</code> \| <code>void</code>
6443
- * [.hideButton([saveSize])](#SRC+hideButton)
6444
- * [.showButton()](#SRC+showButton)
6445
6738
  * [.hideCheckout([saveSize])](#SRC+hideCheckout)
6446
6739
  * [.showCheckout()](#SRC+showCheckout)
6447
6740
  * [.reload()](#SRC+reload)
6448
6741
  * [.useAutoResize()](#SRC+useAutoResize)
6449
6742
 
6450
- <a name="new_SRC_new" id="new_SRC_new" href="#new_SRC_new">&nbsp;</a>
6743
+ <a name="new_MastercardSRCClickToPay_new" id="new_MastercardSRCClickToPay_new" href="#new_MastercardSRCClickToPay_new">&nbsp;</a>
6451
6744
 
6452
- ### new SRC(button_selector, iframe_selector, service_id, public_key_or_access_token, meta)
6745
+ ### new MastercardSRCClickToPay(iframe_selector, service_id, public_key_or_access_token, meta)
6453
6746
 
6454
6747
  | Param | Type | Description |
6455
6748
  | --- | --- | --- |
6456
- | button_selector | <code>string</code> | Selector of html element. Container for SRC checkout button. |
6457
6749
  | iframe_selector | <code>string</code> | Selector of html element. Container for SRC checkout iFrame. |
6458
6750
  | service_id | <code>string</code> | Card Scheme Service ID |
6459
6751
  | public_key_or_access_token | <code>string</code> | Paydock public key or Access Token |
6460
- | meta | [<code>IVisaSRCMeta</code>](#IVisaSRCMeta) | Data that configures the SRC checkout |
6752
+ | meta | [<code>IMastercardSRCMeta</code>](#IMastercardSRCMeta) | Data that configures the SRC checkout |
6461
6753
 
6462
6754
  **Example**
6463
6755
  ```js
6464
- var SRC = new SRC('#checkoutButton', '#checkoutIframe', 'service_id', 'public_key', {});
6756
+ var mastercardSRC = new MastercardSRCClickToPay('#checkoutIframe', 'service_id', 'public_key', {});
6465
6757
  ```
6758
+ <a name="MastercardSRCClickToPay+load" id="MastercardSRCClickToPay+load" href="#MastercardSRCClickToPay+load">&nbsp;</a>
6759
+
6760
+ ### mastercardSRCClickToPay.load()
6761
+ The final method after configuring the SRC to start the load process of SRC checkout
6762
+
6763
+ **Kind**: instance method of [<code>MastercardSRCClickToPay</code>](#MastercardSRCClickToPay)
6466
6764
  <a name="SRC+setStyles" id="SRC+setStyles" href="#SRC+setStyles">&nbsp;</a>
6467
6765
 
6468
- ### srC.setStyles(fields)
6766
+ ### mastercardSRCClickToPay.setStyles(fields)
6469
6767
  Object contain styles for widget - call before `.load()`.
6470
6768
 
6471
- **Kind**: instance method of [<code>SRC</code>](#SRC)
6769
+ **Kind**: instance method of [<code>MastercardSRCClickToPay</code>](#MastercardSRCClickToPay)
6770
+ **Overrides**: [<code>setStyles</code>](#SRC+setStyles)
6472
6771
 
6473
6772
  | Param | Type | Description |
6474
6773
  | --- | --- | --- |
6475
- | fields | <code>IStyles</code> | name of styles which can be shown in widget [STYLE](STYLE) |
6774
+ | fields | [<code>IStyles</code>](#IStyles) | name of styles which can be shown in widget [STYLE](STYLE) |
6476
6775
 
6477
6776
  **Example**
6478
6777
  ```js
6479
6778
  widget.setStyles({
6480
- button_text_color: '#32a852',
6481
- primary_color: '#32a852',
6482
- font_family: 'sans-serif',
6483
- card_schemes: ['visa']
6484
- });
6779
+ enable_src_popup: true
6780
+ primary_button_color: 'red',
6781
+ secondary_button_color: 'blue',
6782
+ primary_button_text_color: 'white',
6783
+ secondary_button_text_color: 'white',
6784
+ font_family: 'Arial',
6785
+ });
6485
6786
  ```
6486
- <a name="SRC+load" id="SRC+load" href="#SRC+load">&nbsp;</a>
6487
-
6488
- ### srC.load()
6489
- The final method after configuring the SRC to start the load process of SRC checkout
6490
-
6491
- **Kind**: instance method of [<code>SRC</code>](#SRC)
6492
6787
  <a name="SRC+setEnv" id="SRC+setEnv" href="#SRC+setEnv">&nbsp;</a>
6493
6788
 
6494
- ### srC.setEnv(env, [alias])
6789
+ ### mastercardSRCClickToPay.setEnv(env, [alias])
6495
6790
  Current method can change environment. By default environment = sandbox.
6496
6791
  Also we can change domain alias for this environment. By default domain_alias = paydock.com
6497
6792
 
6498
- **Kind**: instance method of [<code>SRC</code>](#SRC)
6793
+ **Kind**: instance method of [<code>MastercardSRCClickToPay</code>](#MastercardSRCClickToPay)
6794
+ **Overrides**: [<code>setEnv</code>](#SRC+setEnv)
6499
6795
 
6500
6796
  | Param | Type | Description |
6501
6797
  | --- | --- | --- |
@@ -6508,25 +6804,27 @@ SRC.setEnv('production');
6508
6804
  ```
6509
6805
  <a name="SRC+getEnv" id="SRC+getEnv" href="#SRC+getEnv">&nbsp;</a>
6510
6806
 
6511
- ### srC.getEnv()
6807
+ ### mastercardSRCClickToPay.getEnv()
6512
6808
  Method to read the current environment
6513
6809
 
6514
- **Kind**: instance method of [<code>SRC</code>](#SRC)
6810
+ **Kind**: instance method of [<code>MastercardSRCClickToPay</code>](#MastercardSRCClickToPay)
6811
+ **Overrides**: [<code>getEnv</code>](#SRC+getEnv)
6515
6812
  **Example**
6516
6813
  ```js
6517
6814
  SRC.getEnv();
6518
6815
  ```
6519
6816
  <a name="SRC+on" id="SRC+on" href="#SRC+on">&nbsp;</a>
6520
6817
 
6521
- ### srC.on(eventName, [cb]) ⇒ <code>Promise.&lt;any&gt;</code> \| <code>void</code>
6818
+ ### mastercardSRCClickToPay.on(eventName, [cb]) ⇒ <code>Promise.&lt;any&gt;</code> \| <code>void</code>
6522
6819
  Listen to events of SRC
6523
6820
 
6524
- **Kind**: instance method of [<code>SRC</code>](#SRC)
6821
+ **Kind**: instance method of [<code>MastercardSRCClickToPay</code>](#MastercardSRCClickToPay)
6822
+ **Overrides**: [<code>on</code>](#SRC+on)
6525
6823
 
6526
6824
  | Param | Type | Description |
6527
6825
  | --- | --- | --- |
6528
6826
  | eventName | <code>string</code> | Available event names [EVENT](#EVENT) |
6529
- | [cb] | <code>listener</code> | |
6827
+ | [cb] | <code>listener</code> | The callback to handle the event. When available, it will send back data of type [EventData](#EventData) |
6530
6828
 
6531
6829
  **Example**
6532
6830
  ```js
@@ -6538,37 +6836,13 @@ SRC.on('checkoutCompleted').then(function (token) {
6538
6836
  console.log(token);
6539
6837
  });
6540
6838
  ```
6541
- <a name="SRC+hideButton" id="SRC+hideButton" href="#SRC+hideButton">&nbsp;</a>
6542
-
6543
- ### srC.hideButton([saveSize])
6544
- Using this method you can hide button
6545
-
6546
- **Kind**: instance method of [<code>SRC</code>](#SRC)
6547
-
6548
- | Param | Type | Default | Description |
6549
- | --- | --- | --- | --- |
6550
- | [saveSize] | <code>boolean</code> | <code>false</code> | using this param you can save iframe's size (if applicable) |
6551
-
6552
- **Example**
6553
- ```js
6554
- SRC.hideButton();
6555
- ```
6556
- <a name="SRC+showButton" id="SRC+showButton" href="#SRC+showButton">&nbsp;</a>
6557
-
6558
- ### srC.showButton()
6559
- Using this method you can show the SRC button after using hideButton method
6560
-
6561
- **Kind**: instance method of [<code>SRC</code>](#SRC)
6562
- **Example**
6563
- ```js
6564
- SRC.showButton();
6565
- ```
6566
6839
  <a name="SRC+hideCheckout" id="SRC+hideCheckout" href="#SRC+hideCheckout">&nbsp;</a>
6567
6840
 
6568
- ### srC.hideCheckout([saveSize])
6841
+ ### mastercardSRCClickToPay.hideCheckout([saveSize])
6569
6842
  Using this method you can hide checkout after load and button click
6570
6843
 
6571
- **Kind**: instance method of [<code>SRC</code>](#SRC)
6844
+ **Kind**: instance method of [<code>MastercardSRCClickToPay</code>](#MastercardSRCClickToPay)
6845
+ **Overrides**: [<code>hideCheckout</code>](#SRC+hideCheckout)
6572
6846
 
6573
6847
  | Param | Type | Default | Description |
6574
6848
  | --- | --- | --- | --- |
@@ -6580,30 +6854,33 @@ SRC.hideCheckout();
6580
6854
  ```
6581
6855
  <a name="SRC+showCheckout" id="SRC+showCheckout" href="#SRC+showCheckout">&nbsp;</a>
6582
6856
 
6583
- ### srC.showCheckout()
6857
+ ### mastercardSRCClickToPay.showCheckout()
6584
6858
  Using this method you can show checkout after using hideCheckout method
6585
6859
 
6586
- **Kind**: instance method of [<code>SRC</code>](#SRC)
6860
+ **Kind**: instance method of [<code>MastercardSRCClickToPay</code>](#MastercardSRCClickToPay)
6861
+ **Overrides**: [<code>showCheckout</code>](#SRC+showCheckout)
6587
6862
  **Example**
6588
6863
  ```js
6589
6864
  SRC.showCheckout()
6590
6865
  ```
6591
6866
  <a name="SRC+reload" id="SRC+reload" href="#SRC+reload">&nbsp;</a>
6592
6867
 
6593
- ### srC.reload()
6868
+ ### mastercardSRCClickToPay.reload()
6594
6869
  Using this method you can reload the whole checkout
6595
6870
 
6596
- **Kind**: instance method of [<code>SRC</code>](#SRC)
6871
+ **Kind**: instance method of [<code>MastercardSRCClickToPay</code>](#MastercardSRCClickToPay)
6872
+ **Overrides**: [<code>reload</code>](#SRC+reload)
6597
6873
  **Example**
6598
6874
  ```js
6599
6875
  SRC.reload()
6600
6876
  ```
6601
6877
  <a name="SRC+useAutoResize" id="SRC+useAutoResize" href="#SRC+useAutoResize">&nbsp;</a>
6602
6878
 
6603
- ### srC.useAutoResize()
6879
+ ### mastercardSRCClickToPay.useAutoResize()
6604
6880
  Use this method for resize checkout iFrame according to content height, if applicable
6605
6881
 
6606
- **Kind**: instance method of [<code>SRC</code>](#SRC)
6882
+ **Kind**: instance method of [<code>MastercardSRCClickToPay</code>](#MastercardSRCClickToPay)
6883
+ **Overrides**: [<code>useAutoResize</code>](#SRC+useAutoResize)
6607
6884
  **Example**
6608
6885
  ```js
6609
6886
  SRC.useAutoResize();
@@ -6615,15 +6892,28 @@ List of available event's name in the SRC checkout lifecycle
6615
6892
 
6616
6893
  **Kind**: global enum
6617
6894
 
6618
- | Param | Type | Default |
6619
- | --- | --- | --- |
6620
- | CHECKOUT_BUTTON_LOADED | <code>string</code> | <code>&quot;checkoutButtonLoaded&quot;</code> |
6621
- | CHECKOUT_BUTTON_CLICKED | <code>string</code> | <code>&quot;checkoutButtonClicked&quot;</code> |
6622
- | IFRAME_LOADED | <code>string</code> | <code>&quot;iframeLoaded&quot;</code> |
6623
- | CHECKOUT_READY | <code>string</code> | <code>&quot;checkoutReady&quot;</code> |
6624
- | CHECKOUT_COMPLETED | <code>string</code> | <code>&quot;checkoutCompleted&quot;</code> |
6625
- | CHECKOUT_ERROR | <code>string</code> | <code>&quot;checkoutError&quot;</code> |
6895
+ | Param | Type | Default | Description |
6896
+ | --- | --- | --- | --- |
6897
+ | IFRAME_LOADED | <code>string</code> | <code>&quot;iframeLoaded&quot;</code> | Initial event sent when IFrame is initially loaded. |
6898
+ | CHECKOUT_READY | <code>string</code> | <code>&quot;checkoutReady&quot;</code> | Event sent when checkout is loaded and ready to be used by customer. Leverage alongside [showCheckout](#SRC+showCheckout) and [hideCheckout](#SRC+hideCheckout). |
6899
+ | CHECKOUT_POPUP_OPEN | <code>string</code> | <code>&quot;checkoutPopupOpen&quot;</code> | Event sent when SRC Checkout flow is started, regardless of embedded or windowed mode. |
6900
+ | CHECKOUT_POPUP_CLOSE | <code>string</code> | <code>&quot;checkoutPopupClose&quot;</code> | Event sent when SRC Checkout flow is closed, regardless of embedded or windowed mode. |
6901
+ | CHECKOUT_COMPLETED | <code>string</code> | <code>&quot;checkoutCompleted&quot;</code> | Event sent on successful checkout by customer. Check [data](#EventDataCheckoutCompletedData) for more information. |
6902
+ | CHECKOUT_ERROR | <code>string</code> | <code>&quot;checkoutError&quot;</code> | Event sent on error checkout by customer. Check [data](#EventData) for more information. |
6903
+
6904
+ <a name="EVENT_DATA_TYPE" id="EVENT_DATA_TYPE" href="#EVENT_DATA_TYPE">&nbsp;</a>
6905
+
6906
+ ## EVENT\_DATA\_TYPE : <code>enum</code>
6907
+ List of available event data types
6908
+
6909
+ **Kind**: global enum
6910
+
6911
+ | Param | Type | Default | Description |
6912
+ | --- | --- | --- | --- |
6913
+ | CRITICAL_ERROR | <code>string</code> | <code>&quot;CriticalError&quot;</code> | in this error scenario the checkout is understood to be in a non-recoverable state and should be closed by the merchant and give alternate payment options to the user |
6914
+ | USER_ERROR | <code>string</code> | <code>&quot;UserError&quot;</code> | in this error scenario the error in likely a user input error and the checkout is in a recoverable state, so the user will be kept within the checkout and can retry the flow |
6915
+ | SUCCESS | <code>string</code> | <code>&quot;Success&quot;</code> | |
6626
6916
 
6627
6917
 
6628
6918
  ## License
6629
- Copyright (c) 2023 paydock
6919
+ Copyright (c) 2024 paydock