@paydock/client-sdk 1.103.1 → 1.104.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 (482) hide show
  1. package/README.md +102 -104
  2. package/bundles/index.cjs +10674 -0
  3. package/bundles/index.cjs.d.ts +3163 -0
  4. package/bundles/index.cjs.map +1 -0
  5. package/bundles/index.mjs +10642 -0
  6. package/bundles/index.mjs.d.ts +3163 -0
  7. package/bundles/index.mjs.map +1 -0
  8. package/{lib → bundles/types}/api/api-base.d.ts +2 -1
  9. package/bundles/types/api/api-base.d.ts.map +1 -0
  10. package/{lib → bundles/types}/api/api-charge-internal.d.ts +1 -0
  11. package/bundles/types/api/api-charge-internal.d.ts.map +1 -0
  12. package/{lib → bundles/types}/api/api-charge.d.ts +1 -0
  13. package/bundles/types/api/api-charge.d.ts.map +1 -0
  14. package/{lib → bundles/types}/api/api-internal.d.ts +1 -0
  15. package/bundles/types/api/api-internal.d.ts.map +1 -0
  16. package/{lib → bundles/types}/api/api-service-internal.d.ts +1 -0
  17. package/bundles/types/api/api-service-internal.d.ts.map +1 -0
  18. package/{lib → bundles/types}/api/api.d.ts +1 -0
  19. package/bundles/types/api/api.d.ts.map +1 -0
  20. package/bundles/types/api/index.d.ts +2 -0
  21. package/bundles/types/api/index.d.ts.map +1 -0
  22. package/{lib → bundles/types}/canvas-3ds/canvas-3ds.d.ts +1 -0
  23. package/bundles/types/canvas-3ds/canvas-3ds.d.ts.map +1 -0
  24. package/{lib → bundles/types}/canvas-3ds/index.d.ts +1 -0
  25. package/bundles/types/canvas-3ds/index.d.ts.map +1 -0
  26. package/{lib → bundles/types}/canvas-3ds/services/gpayments-service.d.ts +1 -0
  27. package/bundles/types/canvas-3ds/services/gpayments-service.d.ts.map +1 -0
  28. package/{lib → bundles/types}/canvas-3ds/services/index.d.ts +1 -0
  29. package/bundles/types/canvas-3ds/services/index.d.ts.map +1 -0
  30. package/{lib → bundles/types}/canvas-3ds/services/standalone3ds-service.d.ts +1 -0
  31. package/bundles/types/canvas-3ds/services/standalone3ds-service.d.ts.map +1 -0
  32. package/{lib → bundles/types}/checkout-button/afterpay/afterpay-checkout-button.d.ts +1 -0
  33. package/bundles/types/checkout-button/afterpay/afterpay-checkout-button.d.ts.map +1 -0
  34. package/{lib → bundles/types}/checkout-button/afterpay/afterpay.runner.d.ts +1 -0
  35. package/bundles/types/checkout-button/afterpay/afterpay.runner.d.ts.map +1 -0
  36. package/{lib → bundles/types}/checkout-button/checkout-button.d.ts +1 -0
  37. package/bundles/types/checkout-button/checkout-button.d.ts.map +1 -0
  38. package/{lib → bundles/types}/checkout-button/checkout-button.interface.d.ts +1 -0
  39. package/bundles/types/checkout-button/checkout-button.interface.d.ts.map +1 -0
  40. package/{lib → bundles/types}/checkout-button/checkout-contextual-handler.d.ts +1 -0
  41. package/bundles/types/checkout-button/checkout-contextual-handler.d.ts.map +1 -0
  42. package/{lib → bundles/types}/checkout-button/index.d.ts +2 -1
  43. package/bundles/types/checkout-button/index.d.ts.map +1 -0
  44. package/{lib → bundles/types}/checkout-button/paypal/paypal-checkout-button.d.ts +1 -0
  45. package/bundles/types/checkout-button/paypal/paypal-checkout-button.d.ts.map +1 -0
  46. package/{lib → bundles/types}/checkout-button/paypal/paypal.runner.d.ts +1 -0
  47. package/bundles/types/checkout-button/paypal/paypal.runner.d.ts.map +1 -0
  48. package/{lib → bundles/types}/checkout-button/runner/base.runner.d.ts +4 -3
  49. package/bundles/types/checkout-button/runner/base.runner.d.ts.map +1 -0
  50. package/{lib → bundles/types}/checkout-button/runner/contextual.runner.d.ts +2 -1
  51. package/bundles/types/checkout-button/runner/contextual.runner.d.ts.map +1 -0
  52. package/{lib → bundles/types}/checkout-button/runner/index.d.ts +1 -0
  53. package/bundles/types/checkout-button/runner/index.d.ts.map +1 -0
  54. package/{lib → bundles/types}/checkout-button/runner/popup.runner.d.ts +2 -1
  55. package/bundles/types/checkout-button/runner/popup.runner.d.ts.map +1 -0
  56. package/{lib → bundles/types}/checkout-button/runner/redirect.runner.d.ts +2 -1
  57. package/bundles/types/checkout-button/runner/redirect.runner.d.ts.map +1 -0
  58. package/bundles/types/checkout-button/zipmoney/index.d.ts +4 -0
  59. package/bundles/types/checkout-button/zipmoney/index.d.ts.map +1 -0
  60. package/{lib → bundles/types}/checkout-button/zipmoney/zipmoney-checkout-button.d.ts +1 -0
  61. package/bundles/types/checkout-button/zipmoney/zipmoney-checkout-button.d.ts.map +1 -0
  62. package/{lib → bundles/types}/checkout-button/zipmoney/zipmoney-contextual.runner.d.ts +2 -1
  63. package/bundles/types/checkout-button/zipmoney/zipmoney-contextual.runner.d.ts.map +1 -0
  64. package/{lib → bundles/types}/checkout-button/zipmoney/zipmoney-redirect.runner.d.ts +2 -1
  65. package/bundles/types/checkout-button/zipmoney/zipmoney-redirect.runner.d.ts.map +1 -0
  66. package/{lib → bundles/types}/checkout-button/zipmoney/zipmoney.config.d.ts +1 -0
  67. package/bundles/types/checkout-button/zipmoney/zipmoney.config.d.ts.map +1 -0
  68. package/{lib → bundles/types}/checkout-button/zipmoney/zipmoney.runner.d.ts +2 -1
  69. package/bundles/types/checkout-button/zipmoney/zipmoney.runner.d.ts.map +1 -0
  70. package/{lib → bundles/types}/checkout-button/zipmoney/zipmoney.types.d.ts +1 -0
  71. package/bundles/types/checkout-button/zipmoney/zipmoney.types.d.ts.map +1 -0
  72. package/{lib → bundles/types}/components/ability-guard.d.ts +1 -0
  73. package/bundles/types/components/ability-guard.d.ts.map +1 -0
  74. package/{lib → bundles/types}/components/background.d.ts +1 -0
  75. package/bundles/types/components/background.d.ts.map +1 -0
  76. package/{lib → bundles/types}/components/container.d.ts +1 -0
  77. package/bundles/types/components/container.d.ts.map +1 -0
  78. package/{lib → bundles/types}/components/dispatcher.d.ts +2 -1
  79. package/bundles/types/components/dispatcher.d.ts.map +1 -0
  80. package/{lib → bundles/types}/components/element-style.d.ts +2 -1
  81. package/bundles/types/components/element-style.d.ts.map +1 -0
  82. package/{lib → bundles/types}/components/flypay-iframe-event.d.ts +1 -0
  83. package/bundles/types/components/flypay-iframe-event.d.ts.map +1 -0
  84. package/{lib → bundles/types}/components/form-Interceptor.d.ts +1 -0
  85. package/bundles/types/components/form-Interceptor.d.ts.map +1 -0
  86. package/{lib → bundles/types}/components/http-core.d.ts +1 -0
  87. package/bundles/types/components/http-core.d.ts.map +1 -0
  88. package/{lib → bundles/types}/components/iframe-event.d.ts +2 -0
  89. package/bundles/types/components/iframe-event.d.ts.map +1 -0
  90. package/{lib → bundles/types}/components/iframe.d.ts +1 -0
  91. package/bundles/types/components/iframe.d.ts.map +1 -0
  92. package/{lib → bundles/types}/components/link.d.ts +2 -1
  93. package/bundles/types/components/link.d.ts.map +1 -0
  94. package/{lib → bundles/types}/components/loader.d.ts +1 -0
  95. package/bundles/types/components/loader.d.ts.map +1 -0
  96. package/{lib → bundles/types}/components/param.d.ts +6 -5
  97. package/bundles/types/components/param.d.ts.map +1 -0
  98. package/{lib → bundles/types}/components/popup.d.ts +1 -0
  99. package/bundles/types/components/popup.d.ts.map +1 -0
  100. package/{lib → bundles/types}/components/storage-dispatcher.d.ts +1 -0
  101. package/bundles/types/components/storage-dispatcher.d.ts.map +1 -0
  102. package/{lib → bundles/types}/components/trigger.d.ts +1 -0
  103. package/bundles/types/components/trigger.d.ts.map +1 -0
  104. package/{lib → bundles/types}/components/vault-display-iframe-event.d.ts +1 -0
  105. package/bundles/types/components/vault-display-iframe-event.d.ts.map +1 -0
  106. package/{lib → bundles/types}/components/wallet-background.d.ts +1 -0
  107. package/bundles/types/components/wallet-background.d.ts.map +1 -0
  108. package/{lib → bundles/types}/components/wallet-trigger.d.ts +1 -0
  109. package/bundles/types/components/wallet-trigger.d.ts.map +1 -0
  110. package/bundles/types/configs/env/environment.cba.d.ts +29 -0
  111. package/bundles/types/configs/env/environment.cba.d.ts.map +1 -0
  112. package/bundles/types/configs/env/environment.interface.d.ts +12 -0
  113. package/bundles/types/configs/env/environment.interface.d.ts.map +1 -0
  114. package/{lib/configs/env/env.d.ts → bundles/types/configs/env/environment.paydock.d.ts} +5 -8
  115. package/bundles/types/configs/env/environment.paydock.d.ts.map +1 -0
  116. package/bundles/types/configs/env/index.d.ts +3 -0
  117. package/bundles/types/configs/env/index.d.ts.map +1 -0
  118. package/{lib → bundles/types}/configs/sdk.d.ts +3 -2
  119. package/bundles/types/configs/sdk.d.ts.map +1 -0
  120. package/{lib → bundles/types}/external-checkout/builder.d.ts +1 -0
  121. package/bundles/types/external-checkout/builder.d.ts.map +1 -0
  122. package/{lib → bundles/types}/external-checkout/checker.d.ts +1 -0
  123. package/bundles/types/external-checkout/checker.d.ts.map +1 -0
  124. package/bundles/types/external-checkout/index.d.ts +3 -0
  125. package/bundles/types/external-checkout/index.d.ts.map +1 -0
  126. package/{lib → bundles/types}/helper/access-token.d.ts +1 -0
  127. package/bundles/types/helper/access-token.d.ts.map +1 -0
  128. package/{lib → bundles/types}/helper/browser.d.ts +1 -0
  129. package/bundles/types/helper/browser.d.ts.map +1 -0
  130. package/{lib → bundles/types}/helper/event-emitter.d.ts +1 -0
  131. package/bundles/types/helper/event-emitter.d.ts.map +1 -0
  132. package/{lib → bundles/types}/helper/event.d.ts +1 -0
  133. package/bundles/types/helper/event.d.ts.map +1 -0
  134. package/{lib → bundles/types}/helper/ms.d.ts +1 -0
  135. package/bundles/types/helper/ms.d.ts.map +1 -0
  136. package/{lib → bundles/types}/helper/object.d.ts +1 -0
  137. package/bundles/types/helper/object.d.ts.map +1 -0
  138. package/{lib → bundles/types}/helper/url.d.ts +1 -0
  139. package/bundles/types/helper/url.d.ts.map +1 -0
  140. package/{lib → bundles/types}/helper/uuid.d.ts +1 -0
  141. package/bundles/types/helper/uuid.d.ts.map +1 -0
  142. package/bundles/types/index-cba.d.ts +13 -0
  143. package/bundles/types/index-cba.d.ts.map +1 -0
  144. package/bundles/types/index.d.ts +14 -0
  145. package/bundles/types/index.d.ts.map +1 -0
  146. package/{lib → bundles/types}/payment-source/builder.d.ts +1 -0
  147. package/bundles/types/payment-source/builder.d.ts.map +1 -0
  148. package/{lib → bundles/types}/payment-source/index.d.ts +1 -0
  149. package/bundles/types/payment-source/index.d.ts.map +1 -0
  150. package/{lib → bundles/types}/payment-source-widget/html-payment-source-widget.d.ts +1 -0
  151. package/bundles/types/payment-source-widget/html-payment-source-widget.d.ts.map +1 -0
  152. package/{lib → bundles/types}/payment-source-widget/index.d.ts +1 -0
  153. package/bundles/types/payment-source-widget/index.d.ts.map +1 -0
  154. package/{lib → bundles/types}/payment-source-widget/interfaces.d.ts +1 -0
  155. package/bundles/types/payment-source-widget/interfaces.d.ts.map +1 -0
  156. package/{lib → bundles/types}/payment-source-widget/payment-source-widget.d.ts +1 -0
  157. package/bundles/types/payment-source-widget/payment-source-widget.d.ts.map +1 -0
  158. package/{lib → bundles/types}/secure-remote-commerce/index.d.ts +1 -0
  159. package/bundles/types/secure-remote-commerce/index.d.ts.map +1 -0
  160. package/{lib → bundles/types}/secure-remote-commerce/interfaces.d.ts +6 -5
  161. package/bundles/types/secure-remote-commerce/interfaces.d.ts.map +1 -0
  162. package/{lib → bundles/types}/secure-remote-commerce/providers/src-provider.d.ts +1 -0
  163. package/bundles/types/secure-remote-commerce/providers/src-provider.d.ts.map +1 -0
  164. package/{lib → bundles/types}/secure-remote-commerce/providers/visa-src/helper.d.ts +1 -0
  165. package/bundles/types/secure-remote-commerce/providers/visa-src/helper.d.ts.map +1 -0
  166. package/{lib → bundles/types}/secure-remote-commerce/providers/visa-src/index.d.ts +1 -0
  167. package/bundles/types/secure-remote-commerce/providers/visa-src/index.d.ts.map +1 -0
  168. package/{lib → bundles/types}/secure-remote-commerce/providers/visa-src/visa-src.d.ts +1 -0
  169. package/bundles/types/secure-remote-commerce/providers/visa-src/visa-src.d.ts.map +1 -0
  170. package/{lib → bundles/types}/secure-remote-commerce/providers/visa-src/visa-src.styles.d.ts +1 -0
  171. package/bundles/types/secure-remote-commerce/providers/visa-src/visa-src.styles.d.ts.map +1 -0
  172. package/{lib → bundles/types}/secure-remote-commerce/secure-remote-commerce.d.ts +1 -0
  173. package/bundles/types/secure-remote-commerce/secure-remote-commerce.d.ts.map +1 -0
  174. package/{lib → bundles/types}/vault-display-widget/index.d.ts +1 -0
  175. package/bundles/types/vault-display-widget/index.d.ts.map +1 -0
  176. package/{lib → bundles/types}/vault-display-widget/vault-display-widget.d.ts +1 -0
  177. package/bundles/types/vault-display-widget/vault-display-widget.d.ts.map +1 -0
  178. package/{lib → bundles/types}/wallet-buttons/afterpay.wallet-service.d.ts +1 -0
  179. package/bundles/types/wallet-buttons/afterpay.wallet-service.d.ts.map +1 -0
  180. package/{lib → bundles/types}/wallet-buttons/apple.wallet-service.d.ts +1 -0
  181. package/bundles/types/wallet-buttons/apple.wallet-service.d.ts.map +1 -0
  182. package/{lib → bundles/types}/wallet-buttons/flypay-v2.wallet-service.d.ts +1 -0
  183. package/bundles/types/wallet-buttons/flypay-v2.wallet-service.d.ts.map +1 -0
  184. package/{lib → bundles/types}/wallet-buttons/flypay.wallet-service.d.ts +1 -0
  185. package/bundles/types/wallet-buttons/flypay.wallet-service.d.ts.map +1 -0
  186. package/{lib → bundles/types}/wallet-buttons/google.wallet-service.d.ts +1 -0
  187. package/bundles/types/wallet-buttons/google.wallet-service.d.ts.map +1 -0
  188. package/bundles/types/wallet-buttons/index-cba.d.ts +2 -0
  189. package/bundles/types/wallet-buttons/index-cba.d.ts.map +1 -0
  190. package/{lib → bundles/types}/wallet-buttons/index.d.ts +1 -0
  191. package/bundles/types/wallet-buttons/index.d.ts.map +1 -0
  192. package/{lib → bundles/types}/wallet-buttons/interfaces.d.ts +1 -0
  193. package/bundles/types/wallet-buttons/interfaces.d.ts.map +1 -0
  194. package/{lib → bundles/types}/wallet-buttons/mastercard.wallet-service.d.ts +1 -0
  195. package/bundles/types/wallet-buttons/mastercard.wallet-service.d.ts.map +1 -0
  196. package/{lib → bundles/types}/wallet-buttons/paypal.wallet-service.d.ts +1 -0
  197. package/bundles/types/wallet-buttons/paypal.wallet-service.d.ts.map +1 -0
  198. package/{lib → bundles/types}/wallet-buttons/stripe.wallet-service.d.ts +1 -0
  199. package/bundles/types/wallet-buttons/stripe.wallet-service.d.ts.map +1 -0
  200. package/{lib → bundles/types}/wallet-buttons/wallet-buttons.d.ts +1 -0
  201. package/bundles/types/wallet-buttons/wallet-buttons.d.ts.map +1 -0
  202. package/bundles/types/wallet-buttons/wallet-cba-buttons.d.ts +330 -0
  203. package/bundles/types/wallet-buttons/wallet-cba-buttons.d.ts.map +1 -0
  204. package/{lib → bundles/types}/wallet-buttons/wallet-service.d.ts +1 -0
  205. package/bundles/types/wallet-buttons/wallet-service.d.ts.map +1 -0
  206. package/{lib → bundles/types}/widget/configuration.d.ts +2 -1
  207. package/bundles/types/widget/configuration.d.ts.map +1 -0
  208. package/{lib → bundles/types}/widget/html-multi-widget.d.ts +1 -0
  209. package/bundles/types/widget/html-multi-widget.d.ts.map +1 -0
  210. package/{lib → bundles/types}/widget/html-widget.d.ts +1 -0
  211. package/bundles/types/widget/html-widget.d.ts.map +1 -0
  212. package/{lib → bundles/types}/widget/index.d.ts +2 -1
  213. package/bundles/types/widget/index.d.ts.map +1 -0
  214. package/{lib → bundles/types}/widget/meta.d.ts +1 -0
  215. package/bundles/types/widget/meta.d.ts.map +1 -0
  216. package/{lib → bundles/types}/widget/multi-widget.d.ts +2 -1
  217. package/bundles/types/widget/multi-widget.d.ts.map +1 -0
  218. package/{lib → bundles/types}/widget/style.d.ts +1 -0
  219. package/bundles/types/widget/style.d.ts.map +1 -0
  220. package/bundles/widget.umd.js +6813 -6963
  221. package/bundles/widget.umd.js.d.ts +3163 -0
  222. package/bundles/widget.umd.js.map +1 -0
  223. package/bundles/widget.umd.js.min.d.ts +3163 -0
  224. package/bundles/widget.umd.min.js +2 -1
  225. package/bundles/widget.umd.min.js.map +1 -0
  226. package/docs/api-canvas3ds.md +158 -0
  227. package/docs/api-checkout-button.md +912 -0
  228. package/docs/api-examples.md +65 -0
  229. package/docs/api-ps-widget.md +585 -0
  230. package/docs/api-vault-display.md +94 -0
  231. package/docs/api-widget.md +2444 -0
  232. package/docs/api-wrapper.md +78 -0
  233. package/docs/canvas3ds-examples.md +242 -0
  234. package/docs/cba-header.md +13 -0
  235. package/docs/cba-license.md +2 -0
  236. package/docs/checkout-examples.md +248 -0
  237. package/docs/header.md +15 -0
  238. package/docs/html/layout.html +78 -0
  239. package/docs/html/marked.js +23 -0
  240. package/docs/html/style.css +365 -0
  241. package/docs/install/npm.content.md +16 -0
  242. package/docs/install/npm.example.md +24 -0
  243. package/docs/install/umd.content.md +21 -0
  244. package/docs/install/umd.example.md +6 -0
  245. package/docs/install.md +53 -0
  246. package/docs/install.readme.t.md +17 -0
  247. package/docs/install.slate.t.md +17 -0
  248. package/docs/license.md +2 -0
  249. package/docs/partials/header.hbs +3 -0
  250. package/docs/ps-examples.md +129 -0
  251. package/docs/secure-remote-commerce-examples.md +258 -0
  252. package/docs/secure-remote-commerce.md +265 -0
  253. package/docs/vault-display-example.md +132 -0
  254. package/docs/wallet-buttons-examples.md +580 -0
  255. package/docs/wallet-buttons.md +424 -0
  256. package/docs/wallet-cba-buttons-examples.md +388 -0
  257. package/docs/widget-examples.md +134 -0
  258. package/package.json +164 -42
  259. package/slate.md +89 -88
  260. package/.nvmrc +0 -1
  261. package/api.d.ts +0 -1
  262. package/api.js +0 -1
  263. package/canvas3ds.d.ts +0 -1
  264. package/canvas3ds.js +0 -1
  265. package/checkout-button.d.ts +0 -1
  266. package/checkout-button.js +0 -1
  267. package/inicialization-guide.md +0 -7
  268. package/lib/api/api-base.js +0 -101
  269. package/lib/api/api-base.js.map +0 -1
  270. package/lib/api/api-charge-internal.js +0 -30
  271. package/lib/api/api-charge-internal.js.map +0 -1
  272. package/lib/api/api-charge.js +0 -49
  273. package/lib/api/api-charge.js.map +0 -1
  274. package/lib/api/api-internal.js +0 -13
  275. package/lib/api/api-internal.js.map +0 -1
  276. package/lib/api/api-service-internal.js +0 -18
  277. package/lib/api/api-service-internal.js.map +0 -1
  278. package/lib/api/api.js +0 -61
  279. package/lib/api/api.js.map +0 -1
  280. package/lib/api/index.d.ts +0 -1
  281. package/lib/api/index.js +0 -2
  282. package/lib/api/index.js.map +0 -1
  283. package/lib/canvas-3ds/canvas-3ds.js +0 -156
  284. package/lib/canvas-3ds/canvas-3ds.js.map +0 -1
  285. package/lib/canvas-3ds/index.js +0 -2
  286. package/lib/canvas-3ds/index.js.map +0 -1
  287. package/lib/canvas-3ds/services/gpayments-service.js +0 -181
  288. package/lib/canvas-3ds/services/gpayments-service.js.map +0 -1
  289. package/lib/canvas-3ds/services/index.js +0 -2
  290. package/lib/canvas-3ds/services/index.js.map +0 -1
  291. package/lib/canvas-3ds/services/standalone3ds-service.js +0 -32
  292. package/lib/canvas-3ds/services/standalone3ds-service.js.map +0 -1
  293. package/lib/checkout-button/afterpay/afterpay-checkout-button.js +0 -49
  294. package/lib/checkout-button/afterpay/afterpay-checkout-button.js.map +0 -1
  295. package/lib/checkout-button/afterpay/afterpay.runner.js +0 -41
  296. package/lib/checkout-button/afterpay/afterpay.runner.js.map +0 -1
  297. package/lib/checkout-button/checkout-button.interface.js +0 -45
  298. package/lib/checkout-button/checkout-button.interface.js.map +0 -1
  299. package/lib/checkout-button/checkout-button.js +0 -265
  300. package/lib/checkout-button/checkout-button.js.map +0 -1
  301. package/lib/checkout-button/checkout-contextual-handler.js +0 -75
  302. package/lib/checkout-button/checkout-contextual-handler.js.map +0 -1
  303. package/lib/checkout-button/index.js +0 -85
  304. package/lib/checkout-button/index.js.map +0 -1
  305. package/lib/checkout-button/paypal/paypal-checkout-button.js +0 -24
  306. package/lib/checkout-button/paypal/paypal-checkout-button.js.map +0 -1
  307. package/lib/checkout-button/paypal/paypal.runner.js +0 -14
  308. package/lib/checkout-button/paypal/paypal.runner.js.map +0 -1
  309. package/lib/checkout-button/runner/base.runner.js +0 -13
  310. package/lib/checkout-button/runner/base.runner.js.map +0 -1
  311. package/lib/checkout-button/runner/contextual.runner.js +0 -40
  312. package/lib/checkout-button/runner/contextual.runner.js.map +0 -1
  313. package/lib/checkout-button/runner/index.js +0 -11
  314. package/lib/checkout-button/runner/index.js.map +0 -1
  315. package/lib/checkout-button/runner/popup.runner.js +0 -68
  316. package/lib/checkout-button/runner/popup.runner.js.map +0 -1
  317. package/lib/checkout-button/runner/redirect.runner.js +0 -15
  318. package/lib/checkout-button/runner/redirect.runner.js.map +0 -1
  319. package/lib/checkout-button/zipmoney/zipmoney-checkout-button.js +0 -63
  320. package/lib/checkout-button/zipmoney/zipmoney-checkout-button.js.map +0 -1
  321. package/lib/checkout-button/zipmoney/zipmoney-contextual.runner.js +0 -78
  322. package/lib/checkout-button/zipmoney/zipmoney-contextual.runner.js.map +0 -1
  323. package/lib/checkout-button/zipmoney/zipmoney-redirect.runner.js +0 -49
  324. package/lib/checkout-button/zipmoney/zipmoney-redirect.runner.js.map +0 -1
  325. package/lib/checkout-button/zipmoney/zipmoney.config.js +0 -4
  326. package/lib/checkout-button/zipmoney/zipmoney.config.js.map +0 -1
  327. package/lib/checkout-button/zipmoney/zipmoney.runner.js +0 -23
  328. package/lib/checkout-button/zipmoney/zipmoney.runner.js.map +0 -1
  329. package/lib/checkout-button/zipmoney/zipmoney.types.js +0 -1
  330. package/lib/checkout-button/zipmoney/zipmoney.types.js.map +0 -1
  331. package/lib/components/ability-guard.js +0 -44
  332. package/lib/components/ability-guard.js.map +0 -1
  333. package/lib/components/background.js +0 -193
  334. package/lib/components/background.js.map +0 -1
  335. package/lib/components/container.js +0 -60
  336. package/lib/components/container.js.map +0 -1
  337. package/lib/components/dispatcher.js +0 -39
  338. package/lib/components/dispatcher.js.map +0 -1
  339. package/lib/components/element-style.js +0 -52
  340. package/lib/components/element-style.js.map +0 -1
  341. package/lib/components/flypay-iframe-event.js +0 -28
  342. package/lib/components/flypay-iframe-event.js.map +0 -1
  343. package/lib/components/form-Interceptor.js +0 -38
  344. package/lib/components/form-Interceptor.js.map +0 -1
  345. package/lib/components/http-core.js +0 -57
  346. package/lib/components/http-core.js.map +0 -1
  347. package/lib/components/iframe-event.js +0 -84
  348. package/lib/components/iframe-event.js.map +0 -1
  349. package/lib/components/iframe.js +0 -62
  350. package/lib/components/iframe.js.map +0 -1
  351. package/lib/components/link.js +0 -59
  352. package/lib/components/link.js.map +0 -1
  353. package/lib/components/loader.js +0 -234
  354. package/lib/components/loader.js.map +0 -1
  355. package/lib/components/param.js +0 -147
  356. package/lib/components/param.js.map +0 -1
  357. package/lib/components/popup.js +0 -104
  358. package/lib/components/popup.js.map +0 -1
  359. package/lib/components/storage-dispatcher.js +0 -75
  360. package/lib/components/storage-dispatcher.js.map +0 -1
  361. package/lib/components/trigger.js +0 -49
  362. package/lib/components/trigger.js.map +0 -1
  363. package/lib/components/vault-display-iframe-event.js +0 -27
  364. package/lib/components/vault-display-iframe-event.js.map +0 -1
  365. package/lib/components/wallet-background.js +0 -60
  366. package/lib/components/wallet-background.js.map +0 -1
  367. package/lib/components/wallet-trigger.js +0 -27
  368. package/lib/components/wallet-trigger.js.map +0 -1
  369. package/lib/configs/env/env.js +0 -117
  370. package/lib/configs/env/env.js.map +0 -1
  371. package/lib/configs/sdk.js +0 -16
  372. package/lib/configs/sdk.js.map +0 -1
  373. package/lib/external-checkout/builder.js +0 -45
  374. package/lib/external-checkout/builder.js.map +0 -1
  375. package/lib/external-checkout/checker.js +0 -22
  376. package/lib/external-checkout/checker.js.map +0 -1
  377. package/lib/external-checkout/index.d.ts +0 -2
  378. package/lib/external-checkout/index.js +0 -3
  379. package/lib/external-checkout/index.js.map +0 -1
  380. package/lib/helper/access-token.js +0 -44
  381. package/lib/helper/access-token.js.map +0 -1
  382. package/lib/helper/browser.js +0 -79
  383. package/lib/helper/browser.js.map +0 -1
  384. package/lib/helper/event-emitter.js +0 -23
  385. package/lib/helper/event-emitter.js.map +0 -1
  386. package/lib/helper/event.js +0 -23
  387. package/lib/helper/event.js.map +0 -1
  388. package/lib/helper/ms.js +0 -32
  389. package/lib/helper/ms.js.map +0 -1
  390. package/lib/helper/object.js +0 -6
  391. package/lib/helper/object.js.map +0 -1
  392. package/lib/helper/url.js +0 -11
  393. package/lib/helper/url.js.map +0 -1
  394. package/lib/helper/uuid.js +0 -26
  395. package/lib/helper/uuid.js.map +0 -1
  396. package/lib/index.d.ts +0 -15
  397. package/lib/index.js +0 -15
  398. package/lib/index.js.map +0 -1
  399. package/lib/payment-source/builder.js +0 -49
  400. package/lib/payment-source/builder.js.map +0 -1
  401. package/lib/payment-source/index.js +0 -2
  402. package/lib/payment-source/index.js.map +0 -1
  403. package/lib/payment-source-widget/html-payment-source-widget.js +0 -167
  404. package/lib/payment-source-widget/html-payment-source-widget.js.map +0 -1
  405. package/lib/payment-source-widget/index.js +0 -35
  406. package/lib/payment-source-widget/index.js.map +0 -1
  407. package/lib/payment-source-widget/interfaces.js +0 -2
  408. package/lib/payment-source-widget/interfaces.js.map +0 -1
  409. package/lib/payment-source-widget/payment-source-widget.js +0 -141
  410. package/lib/payment-source-widget/payment-source-widget.js.map +0 -1
  411. package/lib/secure-remote-commerce/index.js +0 -2
  412. package/lib/secure-remote-commerce/index.js.map +0 -1
  413. package/lib/secure-remote-commerce/interfaces.js +0 -28
  414. package/lib/secure-remote-commerce/interfaces.js.map +0 -1
  415. package/lib/secure-remote-commerce/providers/src-provider.js +0 -1
  416. package/lib/secure-remote-commerce/providers/src-provider.js.map +0 -1
  417. package/lib/secure-remote-commerce/providers/visa-src/helper.js +0 -36
  418. package/lib/secure-remote-commerce/providers/visa-src/helper.js.map +0 -1
  419. package/lib/secure-remote-commerce/providers/visa-src/index.js +0 -2
  420. package/lib/secure-remote-commerce/providers/visa-src/index.js.map +0 -1
  421. package/lib/secure-remote-commerce/providers/visa-src/visa-src.js +0 -113
  422. package/lib/secure-remote-commerce/providers/visa-src/visa-src.js.map +0 -1
  423. package/lib/secure-remote-commerce/providers/visa-src/visa-src.styles.js +0 -10
  424. package/lib/secure-remote-commerce/providers/visa-src/visa-src.styles.js.map +0 -1
  425. package/lib/secure-remote-commerce/secure-remote-commerce.js +0 -238
  426. package/lib/secure-remote-commerce/secure-remote-commerce.js.map +0 -1
  427. package/lib/vault-display-widget/index.js +0 -14
  428. package/lib/vault-display-widget/index.js.map +0 -1
  429. package/lib/vault-display-widget/vault-display-widget.js +0 -98
  430. package/lib/vault-display-widget/vault-display-widget.js.map +0 -1
  431. package/lib/wallet-buttons/afterpay.wallet-service.js +0 -152
  432. package/lib/wallet-buttons/afterpay.wallet-service.js.map +0 -1
  433. package/lib/wallet-buttons/apple.wallet-service.js +0 -291
  434. package/lib/wallet-buttons/apple.wallet-service.js.map +0 -1
  435. package/lib/wallet-buttons/flypay-v2.wallet-service.js +0 -192
  436. package/lib/wallet-buttons/flypay-v2.wallet-service.js.map +0 -1
  437. package/lib/wallet-buttons/flypay.wallet-service.js +0 -117
  438. package/lib/wallet-buttons/flypay.wallet-service.js.map +0 -1
  439. package/lib/wallet-buttons/google.wallet-service.js +0 -268
  440. package/lib/wallet-buttons/google.wallet-service.js.map +0 -1
  441. package/lib/wallet-buttons/index.js +0 -2
  442. package/lib/wallet-buttons/index.js.map +0 -1
  443. package/lib/wallet-buttons/interfaces.js +0 -1
  444. package/lib/wallet-buttons/interfaces.js.map +0 -1
  445. package/lib/wallet-buttons/mastercard.wallet-service.js +0 -27
  446. package/lib/wallet-buttons/mastercard.wallet-service.js.map +0 -1
  447. package/lib/wallet-buttons/paypal.wallet-service.js +0 -129
  448. package/lib/wallet-buttons/paypal.wallet-service.js.map +0 -1
  449. package/lib/wallet-buttons/stripe.wallet-service.js +0 -100
  450. package/lib/wallet-buttons/stripe.wallet-service.js.map +0 -1
  451. package/lib/wallet-buttons/wallet-buttons.js +0 -454
  452. package/lib/wallet-buttons/wallet-buttons.js.map +0 -1
  453. package/lib/wallet-buttons/wallet-service.js +0 -49
  454. package/lib/wallet-buttons/wallet-service.js.map +0 -1
  455. package/lib/widget/configuration.js +0 -259
  456. package/lib/widget/configuration.js.map +0 -1
  457. package/lib/widget/html-multi-widget.js +0 -380
  458. package/lib/widget/html-multi-widget.js.map +0 -1
  459. package/lib/widget/html-widget.js +0 -126
  460. package/lib/widget/html-widget.js.map +0 -1
  461. package/lib/widget/index.js +0 -132
  462. package/lib/widget/index.js.map +0 -1
  463. package/lib/widget/meta.js +0 -8
  464. package/lib/widget/meta.js.map +0 -1
  465. package/lib/widget/multi-widget.js +0 -436
  466. package/lib/widget/multi-widget.js.map +0 -1
  467. package/lib/widget/style.js +0 -204
  468. package/lib/widget/style.js.map +0 -1
  469. package/payment-source-widget.d.ts +0 -1
  470. package/payment-source-widget.js +0 -1
  471. package/tslint.json +0 -130
  472. package/typings/globals/@auspayplus/open-payments-checkout/index.d.ts +0 -43
  473. package/typings/globals/jasmine/index.d.ts +0 -576
  474. package/typings/globals/jasmine-ajax/index.d.ts +0 -83
  475. package/typings/globals/jquery/index.d.ts +0 -3759
  476. package/typings/index.d.ts +0 -4
  477. package/vault-display-widget.d.ts +0 -1
  478. package/vault-display-widget.js +0 -1
  479. package/vendors/zipmoney.d.ts +0 -18
  480. package/vendors/zipmoney.js +0 -2
  481. package/widget.d.ts +0 -1
  482. package/widget.js +0 -1
@@ -1,259 +0,0 @@
1
- import { AccessToken } from './../helper/access-token';
2
- import { API_URL, Env } from '../configs/env/env';
3
- import { SDK } from '../configs/sdk';
4
- import { ObjectHelper } from '../helper/object';
5
- import { FORM_FIELD, SUPPORTED_CHECKOUT_META_COLLECTION, } from "../components/param";
6
- /**
7
- * List of available payment source types
8
- *
9
- * @type {object}
10
- * @param {string} CARD=card
11
- * @param {string} BANK_ACCOUNT=bank_account
12
- * @param {string} CHECKOUT=checkout
13
- */
14
- export const PAYMENT_TYPE = {
15
- CARD: 'card',
16
- GIFT_CARD: 'gift_card',
17
- BANK_ACCOUNT: 'bank_account',
18
- CHECKOUT: 'checkout',
19
- };
20
- /**
21
- * Purposes
22
- * @type {object}
23
- * @param {string} PAYMENT_SOURCE=payment_source
24
- * @param {string} CARD_PAYMENT_SOURCE_WITH_CVV=card_payment_source_with_cvv
25
- * @param {string} CARD_PAYMENT_SOURCE_WITHOUT_CVV=card_payment_source_without_cvv
26
- * */
27
- export const PURPOSE = {
28
- PAYMENT_SOURCE: 'payment_source',
29
- CARD_PAYMENT_SOURCE_WITH_CVV: 'card_payment_source_with_cvv',
30
- CARD_PAYMENT_SOURCE_WITHOUT_CVV: 'card_payment_source_without_cvv',
31
- };
32
- const CONFIGURATION_LINK = '/v1/remote-action/configs';
33
- /**
34
- * Class Configuration include methods for creating configuration token
35
- * @constructor
36
- *
37
- * @example
38
- * var config = new Configuration('gatewayId'); // short
39
- *
40
- * var config = new Configuration('gatewayId', 'bank_account', 'paymentSource'); // extend
41
- *
42
- * var config = new Configuration('not_configured'); // without gateway
43
- *
44
- * @param {string} [gatewayID=default] - gateway ID. By default or if put 'default', it will use the selected default gateway. If put 'not_configured', it won’t use gateway to create downstream token.
45
- * @param {string} paymentType - Type of payment source which shows in widget form. Available parameters [PAYMENT_TYPE]{@link PAYMENT_TYPE}
46
- * @param {string} purpose - Param which describes payment purpose. By default uses Available parameters [PURPOSE]{@link PURPOSE}
47
- */
48
- class Configuration {
49
- constructor(gatewayID = 'default', paymentType = PAYMENT_TYPE.CARD, purpose = PURPOSE.PAYMENT_SOURCE) {
50
- if (ObjectHelper.values(PAYMENT_TYPE).indexOf(paymentType) === -1)
51
- throw new Error('unsupported payment type');
52
- else if (paymentType === PAYMENT_TYPE.CHECKOUT)
53
- throw new Error('Payment type "checkout" is deprecated. Use CheckoutButton for this type of payments https://www.npmjs.com/package/@paydock/client-sdk#checkout-button');
54
- if (ObjectHelper.values(PURPOSE).indexOf(purpose) === -1)
55
- throw new Error('unsupported purpose');
56
- this.env = new Env(API_URL);
57
- this.configs = {
58
- purpose: purpose,
59
- meta: {},
60
- dynamic_fields_position: true,
61
- predefined_fields: {
62
- gateway_id: gatewayID,
63
- type: paymentType,
64
- card_scheme: null,
65
- card_processing_network: null,
66
- },
67
- };
68
- }
69
- static createEachToken(accessToken, configs, cb, errorCb = (errors) => { }) {
70
- let tokens = new Array(configs.length);
71
- let errors = [];
72
- let counter = 0;
73
- for (let index in configs) {
74
- if (configs.hasOwnProperty(index))
75
- configs[index].createToken(accessToken, (token) => {
76
- tokens[index] = token;
77
- counter++;
78
- if (configs.length === counter)
79
- Configuration.finishCreatingEachToken(tokens, errors, cb, errorCb);
80
- }, (err) => {
81
- errors.push(`gateway: ${configs[index].getConfigs().predefined_fields.gateway_id} | ${err}`);
82
- counter++;
83
- if (configs.length === counter)
84
- Configuration.finishCreatingEachToken(tokens, errors, cb, errorCb);
85
- });
86
- }
87
- }
88
- static finishCreatingEachToken(tokens, errors, cb, errorCb) {
89
- if (errors.length >= 1)
90
- errorCb(errors);
91
- else
92
- cb(tokens);
93
- }
94
- /**
95
- * Destination, where customer will receive all successful responses.
96
- * Response will contain “data” object with “payment_source” or other parameters, in depending on 'purpose'
97
- *
98
- * @example
99
- * config.setWebHookDestination('http://google.com');
100
- *
101
- * @param {string} url - Your endpoint for post request.
102
- */
103
- setWebHookDestination(url) {
104
- this.configs.webhook_destination = url;
105
- }
106
- /**
107
- * URL to which the Customer will be redirected to after the success finish
108
- *
109
- * @example
110
- * config.setSuccessRedirectUrl('google.com/search?q=success');
111
- *
112
- * @param {string} url
113
- */
114
- setSuccessRedirectUrl(url) {
115
- this.configs.success_redirect_url = url;
116
- }
117
- /**
118
- * URL to which the Customer will be redirected to if an error is triggered in the process of operation
119
- *
120
- * @example
121
- * config.setErrorRedirectUrl('google.com/search?q=error');
122
- *
123
- * @param {string} url
124
- */
125
- setErrorRedirectUrl(url) {
126
- this.configs.error_redirect_url = url;
127
- }
128
- /**
129
- * Set list with widget form field, which will be shown in form. Also you can set the required validation for these fields
130
- *
131
- * @example
132
- * config.setFormFields(['phone', 'email', 'first_name*']);
133
- *
134
- * @param {string[]} fields - name of fields which can be shown in a widget.
135
- * If after a name of a field, you put “*”, this field will be required on client-side.
136
- * (For validation, you can specify any fields, even those that are shown by default: card_number, expiration, etc... ) [FORM_FIELD]{@link FORM_FIELD}
137
- */
138
- setFormFields(fields) {
139
- if (!Array.isArray(this.configs.defined_form_fields))
140
- this.configs.defined_form_fields = [];
141
- for (let index in fields) {
142
- if (!fields.hasOwnProperty(index))
143
- continue;
144
- if (ObjectHelper.values(FORM_FIELD).indexOf(fields[index].replace('*', '')) !== -1)
145
- this.configs.defined_form_fields.push(fields[index]);
146
- else
147
- console.warn(`Configuration::setFormFields: unsupported form field ${fields[index]}`);
148
- }
149
- }
150
- /**
151
- * Method for setting meta information for checkout page
152
- *
153
- * @example
154
- * config.setMeta({
155
- brand_name: 'paydock',
156
- reference: '15',
157
- email: 'wault@paydock.com'
158
- });
159
- *
160
- * @param {IPayPalMeta | IZipmoneyMeta | IAfterpayMeta | IBamboraMeta} object -
161
- * data which can be shown on checkout page [IPayPalMeta]{@link IPayPalMeta} [IZipmoneyMeta]{@link IZipmoneyMeta} [IAfterpayMeta]{@link IAfterpayMeta} [IBamboraMeta]{@link IBamboraMeta}
162
- */
163
- setMeta(meta) {
164
- for (let key in meta) {
165
- if (!meta.hasOwnProperty(key))
166
- continue;
167
- if (SUPPORTED_CHECKOUT_META_COLLECTION.indexOf(key) !== -1)
168
- this.configs.meta[key] = meta[key];
169
- else
170
- console.warn(`Configuration::setMeta: unsupported meta key ${key}`);
171
- }
172
- }
173
- /**
174
- * Current method can change environment. By default environment = sandbox.
175
- * Also we can change domain alias for this environment. By default domain_alias = paydock.com
176
- *
177
- * @example
178
- * config.setEnv('production');
179
- * @param {string} env - sandbox, production
180
- * @param {string} [alias] - Own domain alias
181
- */
182
- setEnv(env, alias) {
183
- this.env.setEnv(env, alias);
184
- }
185
- /**
186
- * Title for tab which can be set instead of default
187
- *
188
- * @example
189
- * config.setLabel('custom label');
190
- *
191
- * @param {string} label - Text label for tab
192
- */
193
- setLabel(label) {
194
- this.configs.label = label;
195
- }
196
- getEnv() {
197
- return this.env.getEnv();
198
- }
199
- /**
200
- * createToken - method which exactly create payment one time token
201
- *
202
- * @example
203
- * config.createToken('582035346f65cdd57ee81192d6e5w65w4e5',
204
- * function (data) {
205
- * console.log(data);
206
- * }, function (error) {
207
- * console.log(error);
208
- * });
209
- *
210
- * @param {string} accessToken - Customer access token or public key which provided for each client
211
- * @param {createToken~requestCallback} cb - The callback that handles the success response.
212
- * @param {createToken~requestCallback} errorCb - The callback that handles the failed response.
213
- */
214
- createToken(accessToken, cb, errorCb = (err) => { }) {
215
- this.send(accessToken, (data, status) => {
216
- if (status >= 200 && status < 300)
217
- return cb(data.resource.data.configuration_token);
218
- if (typeof data.error === "undefined" || typeof data.error.message === "undefined")
219
- errorCb('unknown error');
220
- else
221
- errorCb(data.error.message);
222
- });
223
- }
224
- send(accessToken, cb) {
225
- let request = new XMLHttpRequest();
226
- request.open('POST', this.getUrl(), true);
227
- request.setRequestHeader('Content-Type', 'application/json; charset=UTF-8');
228
- request.setRequestHeader(AccessToken.getAccessHeaderNameByToken(accessToken), accessToken);
229
- if (SDK.version) {
230
- request.setRequestHeader(SDK.headerKeys.version, SDK.version);
231
- request.setRequestHeader(SDK.headerKeys.type, SDK.type);
232
- }
233
- request.send(JSON.stringify(this.getConfigs()));
234
- request.onload = () => {
235
- let res = {};
236
- try {
237
- res = JSON.parse(request.responseText);
238
- }
239
- catch (e) { }
240
- cb(res, request.status);
241
- };
242
- }
243
- getConfigs() {
244
- return this.configs;
245
- }
246
- getUrl() {
247
- return this.env.getConf().url + CONFIGURATION_LINK;
248
- }
249
- setGiftCardSchemeData(giftCardScheme, processingNetwork) {
250
- if (this.configs.predefined_fields.type !== PAYMENT_TYPE.GIFT_CARD)
251
- throw new Error('unsupported payment type');
252
- if (!giftCardScheme || !processingNetwork)
253
- throw new Error('');
254
- this.configs.predefined_fields.card_scheme = giftCardScheme;
255
- this.configs.predefined_fields.card_processing_network = processingNetwork;
256
- }
257
- }
258
- export { Configuration };
259
- //# sourceMappingURL=../../src/lib/widget/configuration.js.map
@@ -1 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,OAAO,EAAE,CAAC,GAAG,GAAG,kBAAkB,CAAC;IACvD,CAAC;IAEM,qBAAqB,CAAC,cAAc,EAAE,iBAAiB;QAC1D,IAAI,IAAI,CAAC,OAAO,CAAC,iBAAiB,CAAC,IAAI,KAAK,YAAY,CAAC,SAAS;YAC9D,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;QAEhD,IAAI,CAAC,cAAc,IAAI,CAAC,iBAAiB;YACrC,MAAM,IAAI,KAAK,CAAC,EAAE,CAAC,CAAC;QAGxB,IAAI,CAAC,OAAO,CAAC,iBAAiB,CAAC,WAAW,GAAG,cAAc,CAAC;QAC5D,IAAI,CAAC,OAAO,CAAC,iBAAiB,CAAC,uBAAuB,GAAG,iBAAiB,CAAC;IAC/E,CAAC;CACJ;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
@@ -1,380 +0,0 @@
1
- import { MultiWidget } from "./multi-widget";
2
- import { Container } from "../components/container";
3
- import { IFrame } from "../components/iframe";
4
- import { IFrameEvent, EVENT } from "../components/iframe-event";
5
- import { Trigger, TRIGGER } from "../components/trigger";
6
- import { Event as EventHelper } from "../helper/event";
7
- import { FormInterceptor } from "../components/form-Interceptor";
8
- import { ELEMENT, FORM_FIELD, STYLE, TEXT } from '../components/param';
9
- import { ObjectHelper } from "../helper/object";
10
- /**
11
- * Interface of data from validation event.
12
- * @interface IFormValidation
13
- *
14
- * @param {string} event Event name
15
- * @param {string} purpose System variable. Purpose of event
16
- * @param {string} message_source System variable. Event source
17
- * @param {string} [ref_id] Custom value for identify result of processed operation
18
- * @param {boolean} [form_valid] Form is valid
19
- * @param {array} [invalid_fields] Invalid form fields
20
- * @param {array} [invalid_showed_fields] List of fields on which the error is already displayed
21
- * @param {array} [validators] List of validators with fields
22
- * */
23
- /**
24
- * Interface of data from event.
25
- * @interface IEventMetaData
26
- *
27
- * @param {string} event Event name
28
- * @param {string} purpose System variable. Purpose of event
29
- * @param {string} message_source System variable. Event source
30
- * @param {string} [ref_id] Custom value for identify result of processed operation
31
- * @param {string} configuration_token Token received from our API with widget data
32
- * @param {string} type Payment type 'card', 'bank_account'
33
- * @param {string} gateway_type Gateway type
34
- * @param {string} [card_number_last4] Last 4 digit of your card
35
- * @param {string} [card_scheme] Card scheme
36
- * @param {number} [card_number_length] Card number length
37
- * @param {string} [account_name] Bank account account name
38
- * @param {string} [account_number] Bank account account number
39
- * */
40
- /**
41
- * Interface of data from event.
42
- * @interface IEventAfterLoadData
43
- *
44
- * @param {string} event Event name
45
- * @param {string} purpose System variable. Purpose of event
46
- * @param {string} message_source System variable. Event source
47
- * @param {string} [ref_id] Custom value for identify result of processed operation
48
- * */
49
- /**
50
- * Interface of data from event.
51
- * @interface IEventFinishData
52
- *
53
- * @param {string} event Event name
54
- * @param {string} purpose System variable. Purpose of event
55
- * @param {string} message_source System variable. Event source
56
- * @param {string} [ref_id] Custom value for identify result of processed operation
57
- * @param {string} payment_source One time token. Result from this endpoint [API docs](https://docs.paydock.com/#tokens)
58
- * */
59
- /**
60
- * List of available event's name
61
- * @const EVENT
62
- *
63
- * @type {object}
64
- * @param {string} AFTER_LOAD=afterLoad
65
- * @param {string} SUBMIT=submit
66
- * @param {string} FINISH=finish
67
- * @param {string} VALIDATION=validation
68
- * @param {string} VALIDATION_ERROR=validationError
69
- * @param {string} SYSTEM_ERROR=systemError
70
- * @param {string} META_CHANGE=metaChange
71
- * @param {string} RESIZE=resize
72
- */
73
- /**
74
- * List of available event's name
75
- * @const VAULT_DISPLAY_EVENT
76
- *
77
- * @type {object}
78
- * @param {string} AFTER_LOAD=afterLoad
79
- * @param {string} SYSTEM_ERROR=system_error
80
- * @param {string} CVV_SECURE_CODE_REQUESTED=cvv_secure_code_requested
81
- * @param {string} CARD_NUMBER_SECURE_CODE_REQUESTED=card_number_secure_code_requested
82
- * @param {string} ACCESS_FORBIDDEN=access_forbidden
83
- * @param {string} SESSION_EXPIRED=systemError
84
- * @param {string} SYSTEM_ERROR=session_expired
85
- * @param {string} OPERATION_FORBIDDEN=operation_forbidden
86
- */
87
- /**
88
- * Class HtmlMultiWidget include method for working with html
89
- * @constructor
90
- * @extends MultiWidget
91
- *
92
- * @param {string} selector - Selector of html element. Container for widget
93
- * @param {string} publicKey - PayDock users public key
94
- * @param {(Configuration | string | Configuration[] | string[])} conf - exemplar[s] Configuration class OR configuration token
95
- * @example
96
- * var widget = new MultiWidget('#widget', 'publicKey','configurationToken'); // With a pre-created configuration token
97
- *
98
- * var widget = new MultiWidget('#widget', 'publicKey',['configurationToken', 'configurationToken2']); // With pre-created configuration tokens
99
- *
100
- * var widget = new MultiWidget('#widget', 'publicKey', new Configuration('gatewayId')); With Configuration
101
- *
102
- * var widget = new MultiWidget('#widget', 'publicKey',[ With Configurations
103
- * Configuration(), // default gateway_id,
104
- * Configuration('not_configured'), // without gateway,
105
- * Configuration('gatewayId'),
106
- * Configuration('gatewayId', 'bank_account')
107
- * ]);
108
- */
109
- class HtmlMultiWidget extends MultiWidget {
110
- constructor(selector, publicKey, conf) {
111
- super(publicKey, conf);
112
- this.validationData = {};
113
- this.container = new Container(selector);
114
- this.iFrame = new IFrame(this.container);
115
- this.triggerElement = new Trigger(this.iFrame);
116
- this.event = new IFrameEvent(window);
117
- }
118
- /**
119
- * The final method to beginning, the load process of widget to html
120
- *
121
- */
122
- load() {
123
- this.setStyles(this.container.getStyles(ObjectHelper.values(STYLE)));
124
- this.setTexts(this.container.getAttr(ObjectHelper.values(TEXT)));
125
- this.loadIFrameUrl((url) => {
126
- this.iFrame.load(url, { title: 'Card details' });
127
- this.afterLoad();
128
- }, (errors) => {
129
- console.error('Errors when creating a token[s, widget will not be load:');
130
- for (let index in errors) {
131
- if (errors.hasOwnProperty(index))
132
- console.error(`--- | ${errors[index]}`);
133
- }
134
- });
135
- }
136
- afterLoad() {
137
- this.on(EVENT.VALIDATION, (data) => {
138
- this.validationData = data;
139
- });
140
- }
141
- /**
142
- * Listen to events of widget
143
- *
144
- * @example
145
- *
146
- * widget.on('form_submit', function (data) {
147
- * console.log(data);
148
- * });
149
- * // or
150
- * widget.on('form_submit').then(function (data) {
151
- * console.log(data);
152
- * });
153
- * @param {string} eventName - Available event names [EVENT]{@link EVENT}
154
- * @param {listener} [cb]
155
- * @return {Promise<IEventData | IEventMetaData | IEventFinishData | IFormValidation> | void}
156
- */
157
- on(eventName, cb) {
158
- if (typeof cb === "function")
159
- return this.event.on(eventName, this.link.getParams().widget_id, cb);
160
- return new Promise((resolve) => this.event.on(eventName, this.link.getParams().widget_id, (res) => resolve(res)));
161
- }
162
- /**
163
- * This callback will be called for every trigger
164
- *
165
- * @param {triggerName} triggers - submit_form, tab
166
- * @param {ITriggerData} data which will be sending to widget
167
- */
168
- trigger(triggerName, data = {}) {
169
- this.triggerElement.push(triggerName, data);
170
- }
171
- /**
172
- * Using this method you can get validation state information
173
- * @return {IFormValidation} Form validation object
174
- */
175
- getValidationState() {
176
- return this.validationData;
177
- }
178
- /**
179
- * Using this method you can check if the form is valid
180
- * @return {boolean} Form is valid
181
- */
182
- isValidForm() {
183
- return !!this.validationData.form_valid;
184
- }
185
- /**
186
- * Using this method you can check if a specific form field is invalid
187
- * @param {string} field - Field name
188
- * @return {boolean} Field is invalid
189
- */
190
- isInvalidField(field = '') {
191
- if (!this.validationData.invalid_fields)
192
- return false;
193
- return this.validationData.invalid_fields.indexOf(field) !== -1;
194
- }
195
- /**
196
- * Using this method you can check if an error is displayed on a specific field
197
- * @param {string} field - Field name
198
- * @return {boolean} Error is showed on field
199
- */
200
- isFieldErrorShowed(field = '') {
201
- if (!this.validationData.invalid_showed_fields)
202
- return false;
203
- return this.validationData.invalid_showed_fields.indexOf(field) !== -1;
204
- }
205
- /**
206
- * Using this method you can check if a specific field is invalid
207
- * @param {string} field - Field name
208
- * @param {string} validator - Validator name. Available validators: `required, cardNumberValidator, expireDateValidation`
209
- * @return {boolean} Field is invalid by validator
210
- */
211
- isInvalidFieldByValidator(field = '', validator) {
212
- if (this.validationData.validators && !this.validationData.validators[validator])
213
- return false;
214
- return this.validationData.validators[validator].indexOf(field) !== -1;
215
- }
216
- /**
217
- * Using this method you can hide widget after load
218
- * @param {boolean} [saveSize=false] - using this param you can save iframe's size
219
- */
220
- hide(saveSize) {
221
- this.iFrame.hide(saveSize);
222
- }
223
- /**
224
- * Using this method you can show widget after using hide method
225
- *
226
- */
227
- show() {
228
- this.iFrame.show();
229
- }
230
- /**
231
- * Using this method you can reload widget
232
- *
233
- */
234
- reload() {
235
- this.iFrame.remove();
236
- this.load();
237
- }
238
- /**
239
- * Using this method you can hide any elements inside widget
240
- *
241
- * @example
242
- * widget.hideElements(['submit_button', 'email']);
243
- *
244
- * @param {string[]} elements - list of element which can be hidden [ELEMENT]{@link ELEMENT} || [FORM_FIELD]{@link FORM_FIELD}
245
- */
246
- hideElements(elements) {
247
- let filteredElements = [];
248
- let supportedElements = ObjectHelper.values(ELEMENT).concat(ObjectHelper.values(FORM_FIELD));
249
- for (let index in elements) {
250
- if (!elements.hasOwnProperty(index))
251
- continue;
252
- if (supportedElements.indexOf(elements[index]) !== -1)
253
- filteredElements.push(elements[index]);
254
- else
255
- console.warn(`Widget::hideElements: unsupported element ${elements[index]}`);
256
- }
257
- if (filteredElements.length)
258
- this.trigger(TRIGGER.HIDE_ELEMENTS, { elements: filteredElements.join(',') });
259
- }
260
- /**
261
- * Using this method you can show any elements inside widget
262
- *
263
- * * @example
264
- * widget.showElements(['submit_button', 'email']);
265
- *
266
- * @param {string[]} elements - list of element which can be showed [ELEMENT]{@link ELEMENT} || [FORM_FIELD]{@link FORM_FIELD}
267
- *
268
- */
269
- showElements(elements) {
270
- let filteredElements = [];
271
- let supportedElements = ObjectHelper.values(ELEMENT).concat(ObjectHelper.values(FORM_FIELD));
272
- for (let index in elements) {
273
- if (!elements.hasOwnProperty(index))
274
- continue;
275
- if (supportedElements.indexOf(elements[index]) !== -1)
276
- filteredElements.push(elements[index]);
277
- else
278
- console.warn(`Widget::showElements: unsupported element ${elements[index]}`);
279
- }
280
- if (filteredElements.length)
281
- this.trigger(TRIGGER.SHOW_ELEMENTS, { elements: filteredElements.join(',') });
282
- }
283
- /**
284
- * Method for update values for form fields inside the widget
285
- *
286
- * @example
287
- * widget.updateFormValues({
288
- * email: 'predefined@email.com',
289
- * card_name: 'Houston'
290
- * });
291
- *
292
- * @param {IFormValues} fieldValues - Fields with values
293
- */
294
- updateFormValues(fieldValues) {
295
- for (let key in fieldValues) {
296
- if (fieldValues.hasOwnProperty(key))
297
- this.updateFormValue(key, fieldValues[key]);
298
- }
299
- }
300
- updateFormValue(key, value) {
301
- if (ObjectHelper.values(FORM_FIELD).indexOf(key) === -1)
302
- return console.warn(`Widget::setFormValues[s: unsupported field ${key}`);
303
- if (/\,/.test(value) || /\:/.test(value))
304
- return console.warn(`Widget::setFormValues[s: ${key} - unsupported symbols (: or ,) in value`);
305
- this.trigger(TRIGGER.UPDATE_FORM_VALUES, { form_values: `${key}:${value}` });
306
- }
307
- /**
308
- * After finish event of widget, data (dataType) will be insert to input (selector)
309
- *
310
- * @param {string} selector - css selector . [] #
311
- * @param {string} dataType - data type of IEventData object.
312
- */
313
- onFinishInsert(selector, dataType) {
314
- this.on(EVENT.FINISH, (event) => {
315
- EventHelper.insertToInput(selector, dataType, event);
316
- });
317
- }
318
- /**
319
- * Widget will intercept submit of your form for processing widget
320
- *
321
- * Process: click by submit button in your form --> submit widget ---> submit your form
322
- * @note submit button in widget will be hidden.
323
- *
324
- * @param {string} selector - css selector of your form
325
- *
326
- * @example
327
- * <form id="myForm">
328
- * <input name="amount">
329
- * <button type="submit">Submit</button>
330
- * </form>
331
- * <!--
332
- * -->
333
- * <script>
334
- * widget.interceptSubmitForm('#myForm');
335
- * </script>
336
- */
337
- interceptSubmitForm(selector) {
338
- this.setHiddenElements([ELEMENT.SUBMIT_BUTTON]);
339
- let formInterceptor = new FormInterceptor(selector);
340
- formInterceptor.beforeSubmit(() => {
341
- this.triggerElement.push(TRIGGER.SUBMIT_FORM, {});
342
- this.event.on(EVENT.FINISH, this.link.getParams().widget_id, () => {
343
- formInterceptor.continueSubmit();
344
- });
345
- });
346
- }
347
- /**
348
- * This method hides a submit button and automatically execute form submit
349
- */
350
- useCheckoutAutoSubmit() {
351
- this.setHiddenElements([ELEMENT.SUBMIT_BUTTON]);
352
- this.on(EVENT.CHECKOUT_SUCCESS, (data) => {
353
- this.trigger(TRIGGER.SUBMIT_FORM);
354
- });
355
- this.on(EVENT.VALIDATION_ERROR, (data) => {
356
- this.trigger(TRIGGER.REFRESH_CHECKOUT);
357
- });
358
- this.on(EVENT.SYSTEM_ERROR, (data) => {
359
- this.trigger(TRIGGER.REFRESH_CHECKOUT);
360
- });
361
- }
362
- /**
363
- * Use this method for resize iFrame according content height
364
- *
365
- * @example
366
- * widget.useAutoResize();
367
- *
368
- */
369
- useAutoResize() {
370
- this.on(EVENT.RESIZE, (data) => {
371
- if (this.iFrame.getElement()) {
372
- this.iFrame.getElement().scrolling = 'no';
373
- if (data.height)
374
- this.iFrame.setStyle('height', data.height + 'px');
375
- }
376
- });
377
- }
378
- }
379
- export { HtmlMultiWidget };
380
- //# sourceMappingURL=../../src/lib/widget/html-multi-widget.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"html-multi-widget.js","sourceRoot":"","sources":["../../widget/html-multi-widget.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAc,KAAK,EAAC,MAAM,4BAA4B,CAAC;AAC3E,OAAO,EAAE,OAAO,EAAE,OAAO,EAAgB,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,KAAK,IAAI,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAC,OAAO,EAAE,UAAU,EA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