@paydock/client-sdk 1.104.3-beta → 1.105.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (490) hide show
  1. package/.nvmrc +1 -0
  2. package/README.md +572 -290
  3. package/api.d.ts +1 -0
  4. package/api.js +1 -0
  5. package/bundles/widget.umd.js +9130 -8655
  6. package/bundles/widget.umd.min.js +1 -2
  7. package/canvas3ds.d.ts +1 -0
  8. package/canvas3ds.js +1 -0
  9. package/checkout-button.d.ts +1 -0
  10. package/checkout-button.js +1 -0
  11. package/inicialization-guide.md +7 -0
  12. package/{bundles/types → lib}/api/api-base.d.ts +1 -2
  13. package/lib/api/api-base.js +101 -0
  14. package/lib/api/api-base.js.map +1 -0
  15. package/{bundles/types → lib}/api/api-charge-internal.d.ts +0 -1
  16. package/lib/api/api-charge-internal.js +30 -0
  17. package/lib/api/api-charge-internal.js.map +1 -0
  18. package/{bundles/types → lib}/api/api-charge.d.ts +0 -1
  19. package/lib/api/api-charge.js +49 -0
  20. package/lib/api/api-charge.js.map +1 -0
  21. package/{bundles/types → lib}/api/api-internal.d.ts +0 -1
  22. package/lib/api/api-internal.js +13 -0
  23. package/lib/api/api-internal.js.map +1 -0
  24. package/{bundles/types → lib}/api/api-service-internal.d.ts +0 -1
  25. package/lib/api/api-service-internal.js +18 -0
  26. package/lib/api/api-service-internal.js.map +1 -0
  27. package/{bundles/types → lib}/api/api.d.ts +1 -2
  28. package/lib/api/api.js +62 -0
  29. package/lib/api/api.js.map +1 -0
  30. package/lib/api/index.d.ts +1 -0
  31. package/lib/api/index.js +2 -0
  32. package/lib/api/index.js.map +1 -0
  33. package/{bundles/types → lib}/canvas-3ds/canvas-3ds.d.ts +1 -2
  34. package/lib/canvas-3ds/canvas-3ds.js +157 -0
  35. package/lib/canvas-3ds/canvas-3ds.js.map +1 -0
  36. package/{bundles/types → lib}/canvas-3ds/index.d.ts +0 -1
  37. package/lib/canvas-3ds/index.js +2 -0
  38. package/lib/canvas-3ds/index.js.map +1 -0
  39. package/{bundles/types → lib}/canvas-3ds/services/gpayments-service.d.ts +0 -1
  40. package/lib/canvas-3ds/services/gpayments-service.js +181 -0
  41. package/lib/canvas-3ds/services/gpayments-service.js.map +1 -0
  42. package/{bundles/types → lib}/canvas-3ds/services/index.d.ts +0 -1
  43. package/lib/canvas-3ds/services/index.js +2 -0
  44. package/lib/canvas-3ds/services/index.js.map +1 -0
  45. package/{bundles/types → lib}/canvas-3ds/services/standalone3ds-service.d.ts +0 -1
  46. package/lib/canvas-3ds/services/standalone3ds-service.js +32 -0
  47. package/lib/canvas-3ds/services/standalone3ds-service.js.map +1 -0
  48. package/{bundles/types → lib}/checkout-button/afterpay/afterpay-checkout-button.d.ts +1 -2
  49. package/lib/checkout-button/afterpay/afterpay-checkout-button.js +50 -0
  50. package/lib/checkout-button/afterpay/afterpay-checkout-button.js.map +1 -0
  51. package/{bundles/types → lib}/checkout-button/afterpay/afterpay.runner.d.ts +0 -1
  52. package/lib/checkout-button/afterpay/afterpay.runner.js +41 -0
  53. package/lib/checkout-button/afterpay/afterpay.runner.js.map +1 -0
  54. package/{bundles/types → lib}/checkout-button/checkout-button.d.ts +1 -2
  55. package/{bundles/types → lib}/checkout-button/checkout-button.interface.d.ts +0 -1
  56. package/lib/checkout-button/checkout-button.interface.js +45 -0
  57. package/lib/checkout-button/checkout-button.interface.js.map +1 -0
  58. package/lib/checkout-button/checkout-button.js +266 -0
  59. package/lib/checkout-button/checkout-button.js.map +1 -0
  60. package/{bundles/types → lib}/checkout-button/checkout-contextual-handler.d.ts +0 -1
  61. package/lib/checkout-button/checkout-contextual-handler.js +75 -0
  62. package/lib/checkout-button/checkout-contextual-handler.js.map +1 -0
  63. package/{bundles/types → lib}/checkout-button/index.d.ts +1 -2
  64. package/lib/checkout-button/index.js +85 -0
  65. package/lib/checkout-button/index.js.map +1 -0
  66. package/{bundles/types → lib}/checkout-button/paypal/paypal-checkout-button.d.ts +1 -2
  67. package/lib/checkout-button/paypal/paypal-checkout-button.js +25 -0
  68. package/lib/checkout-button/paypal/paypal-checkout-button.js.map +1 -0
  69. package/{bundles/types → lib}/checkout-button/paypal/paypal.runner.d.ts +0 -1
  70. package/lib/checkout-button/paypal/paypal.runner.js +14 -0
  71. package/lib/checkout-button/paypal/paypal.runner.js.map +1 -0
  72. package/{bundles/types → lib}/checkout-button/runner/base.runner.d.ts +3 -4
  73. package/lib/checkout-button/runner/base.runner.js +13 -0
  74. package/lib/checkout-button/runner/base.runner.js.map +1 -0
  75. package/{bundles/types → lib}/checkout-button/runner/contextual.runner.d.ts +1 -2
  76. package/lib/checkout-button/runner/contextual.runner.js +40 -0
  77. package/lib/checkout-button/runner/contextual.runner.js.map +1 -0
  78. package/{bundles/types → lib}/checkout-button/runner/index.d.ts +0 -1
  79. package/lib/checkout-button/runner/index.js +11 -0
  80. package/lib/checkout-button/runner/index.js.map +1 -0
  81. package/{bundles/types → lib}/checkout-button/runner/popup.runner.d.ts +1 -2
  82. package/lib/checkout-button/runner/popup.runner.js +68 -0
  83. package/lib/checkout-button/runner/popup.runner.js.map +1 -0
  84. package/{bundles/types → lib}/checkout-button/runner/redirect.runner.d.ts +1 -2
  85. package/lib/checkout-button/runner/redirect.runner.js +15 -0
  86. package/lib/checkout-button/runner/redirect.runner.js.map +1 -0
  87. package/{bundles/types → lib}/checkout-button/zipmoney/zipmoney-checkout-button.d.ts +1 -2
  88. package/lib/checkout-button/zipmoney/zipmoney-checkout-button.js +64 -0
  89. package/lib/checkout-button/zipmoney/zipmoney-checkout-button.js.map +1 -0
  90. package/{bundles/types → lib}/checkout-button/zipmoney/zipmoney-contextual.runner.d.ts +1 -2
  91. package/lib/checkout-button/zipmoney/zipmoney-contextual.runner.js +78 -0
  92. package/lib/checkout-button/zipmoney/zipmoney-contextual.runner.js.map +1 -0
  93. package/{bundles/types → lib}/checkout-button/zipmoney/zipmoney-redirect.runner.d.ts +1 -2
  94. package/lib/checkout-button/zipmoney/zipmoney-redirect.runner.js +49 -0
  95. package/lib/checkout-button/zipmoney/zipmoney-redirect.runner.js.map +1 -0
  96. package/{bundles/types → lib}/checkout-button/zipmoney/zipmoney.config.d.ts +0 -1
  97. package/lib/checkout-button/zipmoney/zipmoney.config.js +4 -0
  98. package/lib/checkout-button/zipmoney/zipmoney.config.js.map +1 -0
  99. package/{bundles/types → lib}/checkout-button/zipmoney/zipmoney.runner.d.ts +1 -2
  100. package/lib/checkout-button/zipmoney/zipmoney.runner.js +23 -0
  101. package/lib/checkout-button/zipmoney/zipmoney.runner.js.map +1 -0
  102. package/{bundles/types → lib}/checkout-button/zipmoney/zipmoney.types.d.ts +0 -1
  103. package/lib/checkout-button/zipmoney/zipmoney.types.js +1 -0
  104. package/lib/checkout-button/zipmoney/zipmoney.types.js.map +1 -0
  105. package/{bundles/types → lib}/components/ability-guard.d.ts +0 -1
  106. package/lib/components/ability-guard.js +44 -0
  107. package/lib/components/ability-guard.js.map +1 -0
  108. package/{bundles/types → lib}/components/background.d.ts +0 -1
  109. package/lib/components/background.js +193 -0
  110. package/lib/components/background.js.map +1 -0
  111. package/{bundles/types → lib}/components/container.d.ts +1 -1
  112. package/lib/components/container.js +63 -0
  113. package/lib/components/container.js.map +1 -0
  114. package/{bundles/types → lib}/components/dispatcher.d.ts +1 -2
  115. package/lib/components/dispatcher.js +39 -0
  116. package/lib/components/dispatcher.js.map +1 -0
  117. package/{bundles/types → lib}/components/element-style.d.ts +1 -2
  118. package/lib/components/element-style.js +52 -0
  119. package/lib/components/element-style.js.map +1 -0
  120. package/{bundles/types → lib}/components/flypay-iframe-event.d.ts +0 -1
  121. package/lib/components/flypay-iframe-event.js +28 -0
  122. package/lib/components/flypay-iframe-event.js.map +1 -0
  123. package/{bundles/types/components/form-interceptor.d.ts → lib/components/form-Interceptor.d.ts} +0 -1
  124. package/lib/components/form-Interceptor.js +38 -0
  125. package/lib/components/form-Interceptor.js.map +1 -0
  126. package/{bundles/types → lib}/components/http-core.d.ts +0 -1
  127. package/lib/components/http-core.js +57 -0
  128. package/lib/components/http-core.js.map +1 -0
  129. package/{bundles/types → lib}/components/iframe-event.d.ts +15 -13
  130. package/lib/components/iframe-event.js +75 -0
  131. package/lib/components/iframe-event.js.map +1 -0
  132. package/{bundles/types → lib}/components/iframe.d.ts +0 -1
  133. package/lib/components/iframe.js +62 -0
  134. package/lib/components/iframe.js.map +1 -0
  135. package/{bundles/types → lib}/components/link.d.ts +1 -2
  136. package/lib/components/link.js +59 -0
  137. package/lib/components/link.js.map +1 -0
  138. package/{bundles/types → lib}/components/loader.d.ts +0 -1
  139. package/lib/components/loader.js +234 -0
  140. package/lib/components/loader.js.map +1 -0
  141. package/{bundles/types → lib}/components/param.d.ts +9 -12
  142. package/lib/components/param.js +147 -0
  143. package/lib/components/param.js.map +1 -0
  144. package/{bundles/types → lib}/components/popup.d.ts +0 -1
  145. package/lib/components/popup.js +104 -0
  146. package/lib/components/popup.js.map +1 -0
  147. package/{bundles/types → lib}/components/storage-dispatcher.d.ts +0 -1
  148. package/lib/components/storage-dispatcher.js +75 -0
  149. package/lib/components/storage-dispatcher.js.map +1 -0
  150. package/{bundles/types → lib}/components/trigger.d.ts +0 -1
  151. package/lib/components/trigger.js +49 -0
  152. package/lib/components/trigger.js.map +1 -0
  153. package/{bundles/types → lib}/components/vault-display-iframe-event.d.ts +0 -1
  154. package/lib/components/vault-display-iframe-event.js +27 -0
  155. package/lib/components/vault-display-iframe-event.js.map +1 -0
  156. package/{bundles/types → lib}/components/wallet-background.d.ts +2 -2
  157. package/lib/components/wallet-background.js +63 -0
  158. package/lib/components/wallet-background.js.map +1 -0
  159. package/{bundles/types → lib}/components/wallet-trigger.d.ts +0 -1
  160. package/lib/components/wallet-trigger.js +27 -0
  161. package/lib/components/wallet-trigger.js.map +1 -0
  162. package/{bundles/types/configs/env/environment.paydock.d.ts → lib/configs/env/env.d.ts} +8 -5
  163. package/lib/configs/env/env.js +117 -0
  164. package/lib/configs/env/env.js.map +1 -0
  165. package/{bundles/types → lib}/configs/sdk.d.ts +2 -3
  166. package/lib/configs/sdk.js +16 -0
  167. package/lib/configs/sdk.js.map +1 -0
  168. package/lib/constants/validators.d.ts +44 -0
  169. package/lib/constants/validators.js +42 -0
  170. package/lib/constants/validators.js.map +1 -0
  171. package/{bundles/types → lib}/external-checkout/builder.d.ts +0 -1
  172. package/lib/external-checkout/builder.js +45 -0
  173. package/lib/external-checkout/builder.js.map +1 -0
  174. package/{bundles/types → lib}/external-checkout/checker.d.ts +0 -1
  175. package/lib/external-checkout/checker.js +22 -0
  176. package/lib/external-checkout/checker.js.map +1 -0
  177. package/lib/external-checkout/index.d.ts +2 -0
  178. package/lib/external-checkout/index.js +3 -0
  179. package/lib/external-checkout/index.js.map +1 -0
  180. package/{bundles/types → lib}/helper/access-token.d.ts +0 -1
  181. package/lib/helper/access-token.js +44 -0
  182. package/lib/helper/access-token.js.map +1 -0
  183. package/{bundles/types → lib}/helper/browser.d.ts +0 -1
  184. package/lib/helper/browser.js +79 -0
  185. package/lib/helper/browser.js.map +1 -0
  186. package/{bundles/types → lib}/helper/event-emitter.d.ts +0 -1
  187. package/lib/helper/event-emitter.js +23 -0
  188. package/lib/helper/event-emitter.js.map +1 -0
  189. package/{bundles/types → lib}/helper/event.d.ts +0 -1
  190. package/lib/helper/event.js +23 -0
  191. package/lib/helper/event.js.map +1 -0
  192. package/{bundles/types → lib}/helper/ms.d.ts +0 -1
  193. package/lib/helper/ms.js +32 -0
  194. package/lib/helper/ms.js.map +1 -0
  195. package/{bundles/types → lib}/helper/object.d.ts +0 -1
  196. package/lib/helper/object.js +6 -0
  197. package/lib/helper/object.js.map +1 -0
  198. package/{bundles/types → lib}/helper/url.d.ts +0 -1
  199. package/lib/helper/url.js +11 -0
  200. package/lib/helper/url.js.map +1 -0
  201. package/{bundles/types → lib}/helper/uuid.d.ts +0 -1
  202. package/lib/helper/uuid.js +26 -0
  203. package/lib/helper/uuid.js.map +1 -0
  204. package/lib/index.d.ts +15 -0
  205. package/lib/index.js +15 -0
  206. package/lib/index.js.map +1 -0
  207. package/{bundles/types → lib}/payment-source/builder.d.ts +0 -1
  208. package/lib/payment-source/builder.js +49 -0
  209. package/lib/payment-source/builder.js.map +1 -0
  210. package/{bundles/types → lib}/payment-source/index.d.ts +0 -1
  211. package/lib/payment-source/index.js +2 -0
  212. package/lib/payment-source/index.js.map +1 -0
  213. package/{bundles/types → lib}/payment-source-widget/html-payment-source-widget.d.ts +17 -14
  214. package/lib/payment-source-widget/html-payment-source-widget.js +172 -0
  215. package/lib/payment-source-widget/html-payment-source-widget.js.map +1 -0
  216. package/{bundles/types → lib}/payment-source-widget/index.d.ts +0 -1
  217. package/lib/payment-source-widget/index.js +35 -0
  218. package/lib/payment-source-widget/index.js.map +1 -0
  219. package/{bundles/types → lib}/payment-source-widget/interfaces.d.ts +0 -1
  220. package/lib/payment-source-widget/interfaces.js +2 -0
  221. package/lib/payment-source-widget/interfaces.js.map +1 -0
  222. package/{bundles/types → lib}/payment-source-widget/payment-source-widget.d.ts +1 -2
  223. package/lib/payment-source-widget/payment-source-widget.js +142 -0
  224. package/lib/payment-source-widget/payment-source-widget.js.map +1 -0
  225. package/{bundles/types → lib}/secure-remote-commerce/index.d.ts +0 -1
  226. package/lib/secure-remote-commerce/index.js +2 -0
  227. package/lib/secure-remote-commerce/index.js.map +1 -0
  228. package/{bundles/types → lib}/secure-remote-commerce/interfaces.d.ts +5 -6
  229. package/lib/secure-remote-commerce/interfaces.js +28 -0
  230. package/lib/secure-remote-commerce/interfaces.js.map +1 -0
  231. package/{bundles/types → lib}/secure-remote-commerce/providers/src-provider.d.ts +0 -1
  232. package/lib/secure-remote-commerce/providers/src-provider.js +1 -0
  233. package/lib/secure-remote-commerce/providers/src-provider.js.map +1 -0
  234. package/{bundles/types → lib}/secure-remote-commerce/providers/visa-src/helper.d.ts +0 -1
  235. package/lib/secure-remote-commerce/providers/visa-src/helper.js +36 -0
  236. package/lib/secure-remote-commerce/providers/visa-src/helper.js.map +1 -0
  237. package/{bundles/types → lib}/secure-remote-commerce/providers/visa-src/index.d.ts +0 -1
  238. package/lib/secure-remote-commerce/providers/visa-src/index.js +2 -0
  239. package/lib/secure-remote-commerce/providers/visa-src/index.js.map +1 -0
  240. package/{bundles/types → lib}/secure-remote-commerce/providers/visa-src/visa-src.d.ts +0 -1
  241. package/lib/secure-remote-commerce/providers/visa-src/visa-src.js +113 -0
  242. package/lib/secure-remote-commerce/providers/visa-src/visa-src.js.map +1 -0
  243. package/{bundles/types → lib}/secure-remote-commerce/providers/visa-src/visa-src.styles.d.ts +0 -1
  244. package/lib/secure-remote-commerce/providers/visa-src/visa-src.styles.js +10 -0
  245. package/lib/secure-remote-commerce/providers/visa-src/visa-src.styles.js.map +1 -0
  246. package/{bundles/types → lib}/secure-remote-commerce/secure-remote-commerce.d.ts +1 -2
  247. package/lib/secure-remote-commerce/secure-remote-commerce.js +239 -0
  248. package/lib/secure-remote-commerce/secure-remote-commerce.js.map +1 -0
  249. package/{bundles/types → lib}/vault-display-widget/index.d.ts +0 -1
  250. package/lib/vault-display-widget/index.js +14 -0
  251. package/lib/vault-display-widget/index.js.map +1 -0
  252. package/{bundles/types → lib}/vault-display-widget/vault-display-widget.d.ts +1 -2
  253. package/lib/vault-display-widget/vault-display-widget.js +99 -0
  254. package/lib/vault-display-widget/vault-display-widget.js.map +1 -0
  255. package/{bundles/types → lib}/wallet-buttons/afterpay.wallet-service.d.ts +0 -1
  256. package/lib/wallet-buttons/afterpay.wallet-service.js +152 -0
  257. package/lib/wallet-buttons/afterpay.wallet-service.js.map +1 -0
  258. package/{bundles/types → lib}/wallet-buttons/apple.wallet-service.d.ts +2 -1
  259. package/lib/wallet-buttons/apple.wallet-service.js +324 -0
  260. package/lib/wallet-buttons/apple.wallet-service.js.map +1 -0
  261. package/{bundles/types → lib}/wallet-buttons/flypay-v2.wallet-service.d.ts +9 -2
  262. package/lib/wallet-buttons/flypay-v2.wallet-service.js +165 -0
  263. package/lib/wallet-buttons/flypay-v2.wallet-service.js.map +1 -0
  264. package/{bundles/types → lib}/wallet-buttons/flypay.wallet-service.d.ts +0 -1
  265. package/lib/wallet-buttons/flypay.wallet-service.js +117 -0
  266. package/lib/wallet-buttons/flypay.wallet-service.js.map +1 -0
  267. package/{bundles/types → lib}/wallet-buttons/google.wallet-service.d.ts +3 -1
  268. package/lib/wallet-buttons/google.wallet-service.js +301 -0
  269. package/lib/wallet-buttons/google.wallet-service.js.map +1 -0
  270. package/lib/wallet-buttons/helpers/flypay-v2.helper.d.ts +3 -0
  271. package/lib/wallet-buttons/helpers/flypay-v2.helper.js +151 -0
  272. package/lib/wallet-buttons/helpers/flypay-v2.helper.js.map +1 -0
  273. package/lib/wallet-buttons/index.d.ts +127 -0
  274. package/lib/wallet-buttons/index.js +128 -0
  275. package/lib/wallet-buttons/index.js.map +1 -0
  276. package/{bundles/types → lib}/wallet-buttons/interfaces.d.ts +3 -1
  277. package/lib/wallet-buttons/interfaces.js +1 -0
  278. package/lib/wallet-buttons/interfaces.js.map +1 -0
  279. package/{bundles/types → lib}/wallet-buttons/mastercard.wallet-service.d.ts +0 -1
  280. package/lib/wallet-buttons/mastercard.wallet-service.js +27 -0
  281. package/lib/wallet-buttons/mastercard.wallet-service.js.map +1 -0
  282. package/{bundles/types → lib}/wallet-buttons/paypal.wallet-service.d.ts +0 -1
  283. package/lib/wallet-buttons/paypal.wallet-service.js +144 -0
  284. package/lib/wallet-buttons/paypal.wallet-service.js.map +1 -0
  285. package/{bundles/types → lib}/wallet-buttons/stripe.wallet-service.d.ts +0 -1
  286. package/lib/wallet-buttons/stripe.wallet-service.js +100 -0
  287. package/lib/wallet-buttons/stripe.wallet-service.js.map +1 -0
  288. package/{bundles/types/wallet-buttons/wallet-cba-buttons.d.ts → lib/wallet-buttons/wallet-buttons.d.ts} +92 -115
  289. package/lib/wallet-buttons/wallet-buttons.js +479 -0
  290. package/lib/wallet-buttons/wallet-buttons.js.map +1 -0
  291. package/{bundles/types → lib}/wallet-buttons/wallet-service.d.ts +7 -1
  292. package/lib/wallet-buttons/wallet-service.js +60 -0
  293. package/lib/wallet-buttons/wallet-service.js.map +1 -0
  294. package/{bundles/types → lib}/widget/configuration.d.ts +2 -3
  295. package/lib/widget/configuration.js +260 -0
  296. package/lib/widget/configuration.js.map +1 -0
  297. package/lib/widget/html-multi-widget.d.ts +336 -0
  298. package/lib/widget/html-multi-widget.js +422 -0
  299. package/lib/widget/html-multi-widget.js.map +1 -0
  300. package/{bundles/types → lib}/widget/html-widget.d.ts +1 -2
  301. package/lib/widget/html-widget.js +127 -0
  302. package/lib/widget/html-widget.js.map +1 -0
  303. package/{bundles/types → lib}/widget/index.d.ts +1 -2
  304. package/lib/widget/index.js +132 -0
  305. package/lib/widget/index.js.map +1 -0
  306. package/{bundles/types → lib}/widget/meta.d.ts +0 -1
  307. package/lib/widget/meta.js +8 -0
  308. package/lib/widget/meta.js.map +1 -0
  309. package/{bundles/types → lib}/widget/multi-widget.d.ts +1 -2
  310. package/lib/widget/multi-widget.js +437 -0
  311. package/lib/widget/multi-widget.js.map +1 -0
  312. package/{bundles/types → lib}/widget/style.d.ts +0 -1
  313. package/lib/widget/style.js +204 -0
  314. package/lib/widget/style.js.map +1 -0
  315. package/package.json +42 -164
  316. package/payment-source-widget.d.ts +1 -0
  317. package/payment-source-widget.js +1 -0
  318. package/slate.md +136 -107
  319. package/tslint.json +129 -0
  320. package/typings/globals/@auspayplus/open-payments-checkout/index.d.ts +43 -0
  321. package/typings/globals/jasmine/index.d.ts +576 -0
  322. package/typings/globals/jasmine-ajax/index.d.ts +83 -0
  323. package/typings/globals/jquery/index.d.ts +3759 -0
  324. package/typings/index.d.ts +4 -0
  325. package/vault-display-widget.d.ts +1 -0
  326. package/vault-display-widget.js +1 -0
  327. package/vendors/zipmoney.d.ts +18 -0
  328. package/vendors/zipmoney.js +2 -0
  329. package/widget.d.ts +1 -0
  330. package/widget.js +1 -0
  331. package/bundles/index.cjs +0 -10674
  332. package/bundles/index.cjs.d.ts +0 -3163
  333. package/bundles/index.cjs.map +0 -1
  334. package/bundles/index.mjs +0 -10642
  335. package/bundles/index.mjs.d.ts +0 -3163
  336. package/bundles/index.mjs.map +0 -1
  337. package/bundles/types/api/api-base.d.ts.map +0 -1
  338. package/bundles/types/api/api-charge-internal.d.ts.map +0 -1
  339. package/bundles/types/api/api-charge.d.ts.map +0 -1
  340. package/bundles/types/api/api-internal.d.ts.map +0 -1
  341. package/bundles/types/api/api-service-internal.d.ts.map +0 -1
  342. package/bundles/types/api/api.d.ts.map +0 -1
  343. package/bundles/types/api/index.d.ts +0 -2
  344. package/bundles/types/api/index.d.ts.map +0 -1
  345. package/bundles/types/canvas-3ds/canvas-3ds.d.ts.map +0 -1
  346. package/bundles/types/canvas-3ds/index.d.ts.map +0 -1
  347. package/bundles/types/canvas-3ds/services/gpayments-service.d.ts.map +0 -1
  348. package/bundles/types/canvas-3ds/services/index.d.ts.map +0 -1
  349. package/bundles/types/canvas-3ds/services/standalone3ds-service.d.ts.map +0 -1
  350. package/bundles/types/checkout-button/afterpay/afterpay-checkout-button.d.ts.map +0 -1
  351. package/bundles/types/checkout-button/afterpay/afterpay.runner.d.ts.map +0 -1
  352. package/bundles/types/checkout-button/checkout-button.d.ts.map +0 -1
  353. package/bundles/types/checkout-button/checkout-button.interface.d.ts.map +0 -1
  354. package/bundles/types/checkout-button/checkout-contextual-handler.d.ts.map +0 -1
  355. package/bundles/types/checkout-button/index.d.ts.map +0 -1
  356. package/bundles/types/checkout-button/paypal/paypal-checkout-button.d.ts.map +0 -1
  357. package/bundles/types/checkout-button/paypal/paypal.runner.d.ts.map +0 -1
  358. package/bundles/types/checkout-button/runner/base.runner.d.ts.map +0 -1
  359. package/bundles/types/checkout-button/runner/contextual.runner.d.ts.map +0 -1
  360. package/bundles/types/checkout-button/runner/index.d.ts.map +0 -1
  361. package/bundles/types/checkout-button/runner/popup.runner.d.ts.map +0 -1
  362. package/bundles/types/checkout-button/runner/redirect.runner.d.ts.map +0 -1
  363. package/bundles/types/checkout-button/zipmoney/index.d.ts +0 -4
  364. package/bundles/types/checkout-button/zipmoney/index.d.ts.map +0 -1
  365. package/bundles/types/checkout-button/zipmoney/zipmoney-checkout-button.d.ts.map +0 -1
  366. package/bundles/types/checkout-button/zipmoney/zipmoney-contextual.runner.d.ts.map +0 -1
  367. package/bundles/types/checkout-button/zipmoney/zipmoney-redirect.runner.d.ts.map +0 -1
  368. package/bundles/types/checkout-button/zipmoney/zipmoney.config.d.ts.map +0 -1
  369. package/bundles/types/checkout-button/zipmoney/zipmoney.runner.d.ts.map +0 -1
  370. package/bundles/types/checkout-button/zipmoney/zipmoney.types.d.ts.map +0 -1
  371. package/bundles/types/components/ability-guard.d.ts.map +0 -1
  372. package/bundles/types/components/background.d.ts.map +0 -1
  373. package/bundles/types/components/container.d.ts.map +0 -1
  374. package/bundles/types/components/dispatcher.d.ts.map +0 -1
  375. package/bundles/types/components/element-style.d.ts.map +0 -1
  376. package/bundles/types/components/flypay-iframe-event.d.ts.map +0 -1
  377. package/bundles/types/components/form-interceptor.d.ts.map +0 -1
  378. package/bundles/types/components/http-core.d.ts.map +0 -1
  379. package/bundles/types/components/iframe-event.d.ts.map +0 -1
  380. package/bundles/types/components/iframe.d.ts.map +0 -1
  381. package/bundles/types/components/link.d.ts.map +0 -1
  382. package/bundles/types/components/loader.d.ts.map +0 -1
  383. package/bundles/types/components/param.d.ts.map +0 -1
  384. package/bundles/types/components/popup.d.ts.map +0 -1
  385. package/bundles/types/components/storage-dispatcher.d.ts.map +0 -1
  386. package/bundles/types/components/trigger.d.ts.map +0 -1
  387. package/bundles/types/components/vault-display-iframe-event.d.ts.map +0 -1
  388. package/bundles/types/components/wallet-background.d.ts.map +0 -1
  389. package/bundles/types/components/wallet-trigger.d.ts.map +0 -1
  390. package/bundles/types/configs/env/environment.cba.d.ts +0 -29
  391. package/bundles/types/configs/env/environment.cba.d.ts.map +0 -1
  392. package/bundles/types/configs/env/environment.interface.d.ts +0 -12
  393. package/bundles/types/configs/env/environment.interface.d.ts.map +0 -1
  394. package/bundles/types/configs/env/environment.paydock.d.ts.map +0 -1
  395. package/bundles/types/configs/env/index.d.ts +0 -3
  396. package/bundles/types/configs/env/index.d.ts.map +0 -1
  397. package/bundles/types/configs/sdk.d.ts.map +0 -1
  398. package/bundles/types/external-checkout/builder.d.ts.map +0 -1
  399. package/bundles/types/external-checkout/checker.d.ts.map +0 -1
  400. package/bundles/types/external-checkout/index.d.ts +0 -3
  401. package/bundles/types/external-checkout/index.d.ts.map +0 -1
  402. package/bundles/types/helper/access-token.d.ts.map +0 -1
  403. package/bundles/types/helper/browser.d.ts.map +0 -1
  404. package/bundles/types/helper/event-emitter.d.ts.map +0 -1
  405. package/bundles/types/helper/event.d.ts.map +0 -1
  406. package/bundles/types/helper/ms.d.ts.map +0 -1
  407. package/bundles/types/helper/object.d.ts.map +0 -1
  408. package/bundles/types/helper/url.d.ts.map +0 -1
  409. package/bundles/types/helper/uuid.d.ts.map +0 -1
  410. package/bundles/types/index-cba.d.ts +0 -13
  411. package/bundles/types/index-cba.d.ts.map +0 -1
  412. package/bundles/types/index.d.ts +0 -14
  413. package/bundles/types/index.d.ts.map +0 -1
  414. package/bundles/types/payment-source/builder.d.ts.map +0 -1
  415. package/bundles/types/payment-source/index.d.ts.map +0 -1
  416. package/bundles/types/payment-source-widget/html-payment-source-widget.d.ts.map +0 -1
  417. package/bundles/types/payment-source-widget/index.d.ts.map +0 -1
  418. package/bundles/types/payment-source-widget/interfaces.d.ts.map +0 -1
  419. package/bundles/types/payment-source-widget/payment-source-widget.d.ts.map +0 -1
  420. package/bundles/types/secure-remote-commerce/index.d.ts.map +0 -1
  421. package/bundles/types/secure-remote-commerce/interfaces.d.ts.map +0 -1
  422. package/bundles/types/secure-remote-commerce/providers/src-provider.d.ts.map +0 -1
  423. package/bundles/types/secure-remote-commerce/providers/visa-src/helper.d.ts.map +0 -1
  424. package/bundles/types/secure-remote-commerce/providers/visa-src/index.d.ts.map +0 -1
  425. package/bundles/types/secure-remote-commerce/providers/visa-src/visa-src.d.ts.map +0 -1
  426. package/bundles/types/secure-remote-commerce/providers/visa-src/visa-src.styles.d.ts.map +0 -1
  427. package/bundles/types/secure-remote-commerce/secure-remote-commerce.d.ts.map +0 -1
  428. package/bundles/types/vault-display-widget/index.d.ts.map +0 -1
  429. package/bundles/types/vault-display-widget/vault-display-widget.d.ts.map +0 -1
  430. package/bundles/types/wallet-buttons/afterpay.wallet-service.d.ts.map +0 -1
  431. package/bundles/types/wallet-buttons/apple.wallet-service.d.ts.map +0 -1
  432. package/bundles/types/wallet-buttons/flypay-v2.wallet-service.d.ts.map +0 -1
  433. package/bundles/types/wallet-buttons/flypay.wallet-service.d.ts.map +0 -1
  434. package/bundles/types/wallet-buttons/google.wallet-service.d.ts.map +0 -1
  435. package/bundles/types/wallet-buttons/index-cba.d.ts +0 -2
  436. package/bundles/types/wallet-buttons/index-cba.d.ts.map +0 -1
  437. package/bundles/types/wallet-buttons/index.d.ts +0 -2
  438. package/bundles/types/wallet-buttons/index.d.ts.map +0 -1
  439. package/bundles/types/wallet-buttons/interfaces.d.ts.map +0 -1
  440. package/bundles/types/wallet-buttons/mastercard.wallet-service.d.ts.map +0 -1
  441. package/bundles/types/wallet-buttons/paypal.wallet-service.d.ts.map +0 -1
  442. package/bundles/types/wallet-buttons/stripe.wallet-service.d.ts.map +0 -1
  443. package/bundles/types/wallet-buttons/wallet-buttons.d.ts +0 -366
  444. package/bundles/types/wallet-buttons/wallet-buttons.d.ts.map +0 -1
  445. package/bundles/types/wallet-buttons/wallet-cba-buttons.d.ts.map +0 -1
  446. package/bundles/types/wallet-buttons/wallet-service.d.ts.map +0 -1
  447. package/bundles/types/widget/configuration.d.ts.map +0 -1
  448. package/bundles/types/widget/html-multi-widget.d.ts +0 -266
  449. package/bundles/types/widget/html-multi-widget.d.ts.map +0 -1
  450. package/bundles/types/widget/html-widget.d.ts.map +0 -1
  451. package/bundles/types/widget/index.d.ts.map +0 -1
  452. package/bundles/types/widget/meta.d.ts.map +0 -1
  453. package/bundles/types/widget/multi-widget.d.ts.map +0 -1
  454. package/bundles/types/widget/style.d.ts.map +0 -1
  455. package/bundles/widget.umd.js.d.ts +0 -3163
  456. package/bundles/widget.umd.js.map +0 -1
  457. package/bundles/widget.umd.js.min.d.ts +0 -3163
  458. package/bundles/widget.umd.min.js.map +0 -1
  459. package/docs/api-canvas3ds.md +0 -158
  460. package/docs/api-checkout-button.md +0 -912
  461. package/docs/api-examples.md +0 -65
  462. package/docs/api-ps-widget.md +0 -585
  463. package/docs/api-vault-display.md +0 -94
  464. package/docs/api-widget.md +0 -2444
  465. package/docs/api-wrapper.md +0 -78
  466. package/docs/canvas3ds-examples.md +0 -242
  467. package/docs/cba-header.md +0 -13
  468. package/docs/cba-license.md +0 -2
  469. package/docs/checkout-examples.md +0 -248
  470. package/docs/header.md +0 -15
  471. package/docs/html/layout.html +0 -78
  472. package/docs/html/marked.js +0 -23
  473. package/docs/html/style.css +0 -365
  474. package/docs/install/npm.content.md +0 -16
  475. package/docs/install/npm.example.md +0 -24
  476. package/docs/install/umd.content.md +0 -20
  477. package/docs/install/umd.example.md +0 -6
  478. package/docs/install.md +0 -43
  479. package/docs/install.readme.t.md +0 -17
  480. package/docs/install.slate.t.md +0 -17
  481. package/docs/license.md +0 -2
  482. package/docs/partials/header.hbs +0 -3
  483. package/docs/ps-examples.md +0 -129
  484. package/docs/secure-remote-commerce-examples.md +0 -258
  485. package/docs/secure-remote-commerce.md +0 -265
  486. package/docs/vault-display-example.md +0 -132
  487. package/docs/wallet-buttons-examples.md +0 -580
  488. package/docs/wallet-buttons.md +0 -424
  489. package/docs/wallet-cba-buttons-examples.md +0 -388
  490. package/docs/widget-examples.md +0 -134
package/slate.md CHANGED
@@ -16,10 +16,6 @@ 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
  ### Download from CDN
24
20
 
25
21
  ```html
@@ -29,73 +25,77 @@ we exemplify how to import each format.
29
25
  </script>
30
26
  ```
31
27
 
28
+ You should begin by including the library in your page.
29
+
30
+ Add this script tag to your page to get started with with the url below:
31
+
32
+ *Compressed version for production*
33
+ `https://widget.paydock.com/sdk/latest/widget.umd.min.js`
32
34
 
33
- For browser environments, you can import the Client SDK directly from our CDN to
34
- your project's HTML. To accomplish this, include the Client SDK in your page
35
- using one and only of the two script tags below. After this step you will be
36
- able to access the Client SDK features via the global variable `paydock`.
35
+ *Full version for development and debug*
36
+ `https://widget.paydock.com/sdk/latest/widget.umd.js`
37
37
 
38
- For production we recommend using the compressed version (`.min.js`) since
39
- it will result in faster loading times for your end users.
40
38
 
41
- - *Compressed version for production: `https://widget.paydock.com/sdk/latest/widget.umd.min.js`*
42
39
 
43
- - *Full version for development and debug: `https://widget.paydock.com/sdk/latest/widget.umd.js`*
44
40
 
45
- You may download the production version of the Client SDK scripts [here][min],
46
- and, the development version [here][max].
41
+ Also can download library the [production version][min] or the [development version][max]
47
42
 
48
43
  [min]: https://widget.paydock.com/sdk/latest/widget.umd.min.js
49
44
  [max]: https://widget.paydock.com/sdk/latest/widget.umd.js
50
45
 
51
- For more advanced use-cases, the library has [UMD](https://github.com/umdjs/umd)
52
- format that can be used in RequireJS, Webpack, etc.
46
+
47
+ The library will always be available via the global variable `paydock`.
48
+
49
+
50
+
51
+ Also for more advanced use, the library has [UMD](https://github.com/umdjs/umd) format, thus can be used in requireJs, webpack, etc.
52
+
53
+
54
+
55
+
56
+
57
+
58
+
53
59
 
54
60
 
55
61
  ### With package manager
56
62
 
57
- ```cjs
58
- // module import - CommonJS/Node projects ✅
59
- const paydock = require('@paydock/client-sdk')
60
- const api = new paydock.Api('publicKey');
61
- ```
62
63
 
63
- ```mjs
64
- // named import - ESM projects or TypeScript projects ✅
65
- import { HtmlWidget } from '@paydock/client-sdk'
66
- const widget = new HtmlWidget('#selector', 'publicKey', 'gatewayId');
67
- ```
64
+ ```javascript--es2015
65
+ // ES2015 / TypeScript
66
+
67
+ import { HtmlWidget } from '@paydock/client-sdk/widget';
68
68
 
69
- ```mjs
70
- // namespaced import - ESM projects or TypeScript projects ✅
71
- import * as Paydock from '@paydock/client-sdk'
72
- const widget = new Paydock.HtmlWidget('#selector', 'publicKey', 'gatewayId');
69
+ let widget = new HtmlWidget('#selector', 'publicKey', 'gatewayId');
73
70
  ```
74
71
 
75
- ```js
76
- // default import - We do not provide default exports. They are handled differently by different tools!
77
-
78
- import paydock from '@paydock/client-sdk'
79
- >>> "Uncaught SyntaxError: The requested module does not provide an export named 'default'"
72
+
73
+ ```html
74
+ <script src="@paydock/client-sdk/bundles/widget.umd.min.js"></script>
75
+ <script>
76
+ var widget = new paydock.HtmlWidget('#tag', 'publicKey', 'gatewayId');
77
+ </script>
80
78
  ```
81
79
 
82
80
 
83
- Our NPM package is compatible with all package managers (e.g., `npm`, `yarn`,
84
- `pnpm`, `bun`). Using `npm` the following command would add the Client SDK as a
85
- production dependency.
81
+ To install with package manager, enter the following command:
82
+
83
+ `npm install @paydock/client-sdk`
84
+
85
+
86
+ You can use ES2015 or TypeScript modules
87
+
88
+ `@paydock/client-sdk/widget`
89
+
90
+
91
+ Also can use UMD module (global visibility, see above)
92
+
93
+ `@paydock/client-sdk/bundles/widget.umd.js`
94
+
95
+ `@paydock/client-sdk/bundles/widget.umd.min.js`
96
+
86
97
 
87
- ```bash
88
- npm install @paydock/client-sdk
89
- ```
90
98
 
91
- After installation is complete, if you are developing in NodeJS environments or
92
- using tools that expect your JavaScript code to be in CJS format (e.g., Jest,
93
- Karma, RequireJS, Webpack), you can import the Client SDK using CommonJS modules.
94
- For these environments the UMD format (`@paydock/client-sdk/bundles/widget.umd.js`)
95
- can also be used as a fallback. Alternatively, in case you are developing in
96
- projects that have access to modern bundlers such as Vite or others (e.g., SPA
97
- libs or SSR Metaframeworks), you can import the Client SDK features using ESM
98
- through named imports or namespaced imports.
99
99
 
100
100
 
101
101
  ## Widget
@@ -122,11 +122,11 @@ var widget = new paydock.HtmlWidget('#widget', 'publicKey');
122
122
  widget.load();
123
123
  ```
124
124
 
125
- ```javascript
125
+ ```javascript--es2015
126
126
  // ES2015 | TypeScript
127
127
 
128
- import { HtmlWidget } from '@paydock/client-sdk';
129
-
128
+ import { HtmlWidget } from '@paydock/client-sdk/widget';
129
+
130
130
  var widget = new HtmlWidget('#widget', 'publicKey');
131
131
  widget.load();
132
132
  ```
@@ -134,7 +134,7 @@ widget.load();
134
134
  Then write only need 2 lines of code in js to initialize widget
135
135
 
136
136
 
137
- ### Full example
137
+ ### Full example
138
138
 
139
139
  ```html
140
140
  <!DOCTYPE html>
@@ -197,9 +197,9 @@ widget.setFormFields(['phone', 'email']); // add additional fields for form of w
197
197
  widget.setSupportedCardIcons(['mastercard', 'visa']); // add icons of supported card types
198
198
  ```
199
199
 
200
- This example shows how you can use a lot of other methods to settings your form
200
+ This example shows how you can use a lot of other methods to settings your form
201
201
 
202
- ### Full example
202
+ ### Full example
203
203
 
204
204
  ```html
205
205
  <!DOCTYPE html>
@@ -220,12 +220,12 @@ This example shows how you can use a lot of other methods to settings your form
220
220
  <script src="https://widget.paydock.com/sdk/latest/widget.umd.js" ></script>
221
221
  <script>
222
222
  var widget = new paydock.HtmlWidget('#widget', 'publicKey', 'gatewayId');
223
-
223
+
224
224
  widget.setSupportedCardIcons(['mastercard', 'visa']);
225
225
  widget.setFormFields(['phone', 'email']);
226
226
  widget.setRefId('custom-ref-id');
227
227
  widget.onFinishInsert('input[name="payment_source_token"]', 'payment_source');z
228
-
228
+
229
229
  widget.load();
230
230
  </script>
231
231
  </script>
@@ -262,10 +262,10 @@ var list = new paydock.HtmlPaymentSourceWidget('#list', 'publicKey', 'queryToken
262
262
  list.load();
263
263
  ```
264
264
 
265
- ```javascript
265
+ ```javascript--es2015
266
266
  // ES2015 | TypeScript
267
267
 
268
- import { HtmlPaymentSourceWidget } from '@paydock/client-sdk';
268
+ import { HtmlPaymentSourceWidget } from '@paydock/client-sdk/payment-source-widget';
269
269
 
270
270
  var list = new HtmlPaymentSourceWidget('#list', 'publicKey', 'queryToken');
271
271
  list.load();
@@ -392,7 +392,7 @@ You must create a button to turn it into checkout-button
392
392
  var button = new paydock.PaypalCheckoutButton('#button', 'publicKey', 'gatewayId');
393
393
  ```
394
394
 
395
- ```javascript
395
+ ```javascript--es2015
396
396
  // ES2015 | TypeScript
397
397
 
398
398
 
@@ -622,11 +622,11 @@ This wrapper helps you to work with paydock api emdpoints
622
622
  var browserDetails = await new paydock.Api('publicKey').setEnv('env').getBrowserDetails();
623
623
  ```
624
624
 
625
- ```javascript
625
+ ```javascript--es2015
626
626
  // ES2015 | TypeScript
627
627
 
628
- import { Api } from '@paydock/client-sdk';
629
-
628
+ import { Api } from '@paydock/client-sdk/api';
629
+
630
630
  var browserDetails = await new paydock.Api('publicKey').setEnv('env').getBrowserDetails();
631
631
  ```
632
632
 
@@ -639,11 +639,11 @@ var response = await new paydock.Api('publicKey').setEnv('env').charge().preAuth
639
639
  });
640
640
  ```
641
641
 
642
- ```javascript
642
+ ```javascript--es2015
643
643
  // ES2015 | TypeScript
644
644
 
645
- import { Api } from '@paydock/client-sdk';
646
-
645
+ import { Api } from '@paydock/client-sdk/api';
646
+
647
647
  var response = await new Api('publicKey').setEnv('env').charge().preAuth({
648
648
  amount: 100,
649
649
  currency: 'AUD',
@@ -653,7 +653,7 @@ var response = await new Api('publicKey').setEnv('env').charge().preAuth({
653
653
 
654
654
  Then write only need 2 lines of code in js to make request
655
655
 
656
- ### Initialization full example
656
+ ### Initialization full example
657
657
 
658
658
  ```html
659
659
  <!DOCTYPE html>
@@ -700,10 +700,10 @@ var canvas3ds = new paydock.Canvas3ds('#widget', 'token');
700
700
  canvas3ds.load();
701
701
  ```
702
702
 
703
- ```javascript
703
+ ```javascript--es2015
704
704
  // ES2015 | TypeScript
705
705
 
706
- import { Canvas3ds } from '@paydock/client-sdk';
706
+ import { Canvas3ds } from '@paydock/client-sdk/canvas3ds';
707
707
 
708
708
  var list = new Canvas3ds('#widget', 'token');
709
709
  list.load();
@@ -924,7 +924,7 @@ After you initialized the standalone 3ds charge via `v1/charges/standalone-3ds`
924
924
  ## Vault Display Widget
925
925
  You can find description of all methods and parameters [here](https://www.npmjs.com/package/@paydock/client-sdk#vault-display-widget)
926
926
 
927
- The vault display form allows viewing card number and CVV. The form can be customised according to your needs.
927
+ The vault display form allows viewing card number and CVV. The form can be customised according to your needs.
928
928
  You can set styles as well as subscribe to widget events that help monitor user’s actions in real time.
929
929
 
930
930
  ## Vault Display Widget simple example
@@ -944,18 +944,18 @@ var widget = new paydock.VaultDisplayWidget('#widget', 'token');
944
944
  widget.load();
945
945
  ```
946
946
 
947
- ```javascript
947
+ ```javascript--es2015
948
948
  // ES2015 | TypeScript
949
949
 
950
- import { VaultDisplayWidget } from '@paydock/client-sdk';
951
-
950
+ import { VaultDisplayWidget } from '@paydock/client-sdk/vault-display-widget';
951
+
952
952
  var widget = new VaultDisplayWidget('#widget', 'token');
953
953
  widget.load();
954
954
  ```
955
955
 
956
956
  Then write only need 2 lines of code in js to initialize widget
957
957
 
958
- ### Full example
958
+ ### Full example
959
959
 
960
960
  ```html
961
961
  <!DOCTYPE html>
@@ -966,9 +966,9 @@ Then write only need 2 lines of code in js to initialize widget
966
966
  <style>iframe {border: 0;width: 100%;height: 300px;}</style>
967
967
  </head>
968
968
  <body>
969
-
969
+
970
970
  <div id="widget"></div>
971
-
971
+
972
972
  <script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js" ></script>
973
973
  <script>
974
974
  var widget = new paydock.VaultDisplayWidget('#widget', 'token');
@@ -1006,9 +1006,9 @@ widget.setStyles({
1006
1006
  });
1007
1007
  ```
1008
1008
 
1009
- This example shows how you can use a lot of other methods to settings your form
1009
+ This example shows how you can use a lot of other methods to settings your form
1010
1010
 
1011
- ### Full example
1011
+ ### Full example
1012
1012
 
1013
1013
  ```html
1014
1014
  <!DOCTYPE html>
@@ -1019,27 +1019,27 @@ This example shows how you can use a lot of other methods to settings your form
1019
1019
  <style>iframe {border: 0;width: 40%;height: 450px;}</style>
1020
1020
  </head>
1021
1021
  <body>
1022
-
1022
+
1023
1023
  <div id="widget"></div>
1024
-
1024
+
1025
1025
  <script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js" ></script>
1026
1026
  <script>
1027
1027
  var widget = new paydock.VaultDisplayWidget('#widget', 'token');
1028
1028
 
1029
1029
  widget.setEnv('sandbox');
1030
-
1030
+
1031
1031
  widget.on('after_load', function (data) {
1032
1032
  console.log(data);
1033
1033
  });
1034
-
1034
+
1035
1035
  widget.on('cvv_secure_code_requested', function (data) {
1036
1036
  console.log(data);
1037
1037
  });
1038
-
1038
+
1039
1039
  widget.on('card_number_secure_code_requested', function (data) {
1040
1040
  console.log(data);
1041
1041
  });
1042
-
1042
+
1043
1043
  widget.setStyles({
1044
1044
  background_color: 'rgb(0, 0, 0)',
1045
1045
  border_color: 'yellow',
@@ -1088,7 +1088,7 @@ let button = new paydock.WalletButtons(
1088
1088
  button.load();
1089
1089
  ```
1090
1090
 
1091
- ```javascript
1091
+ ```javascript--es2015
1092
1092
  // ES2015 | TypeScript
1093
1093
  import { WalletButtons } from '@paydock/client-sdk';
1094
1094
 
@@ -1113,7 +1113,7 @@ let button = new paydock.WalletButtons(
1113
1113
  button.load();
1114
1114
  ```
1115
1115
 
1116
- ```javascript
1116
+ ```javascript--es2015
1117
1117
  // ES2015 | TypeScript
1118
1118
  import { WalletButtons } from '@paydock/client-sdk';
1119
1119
 
@@ -1137,7 +1137,7 @@ let button = new paydock.WalletButtons(
1137
1137
  button.load();
1138
1138
  ```
1139
1139
 
1140
- ```javascript
1140
+ ```javascript--es2015
1141
1141
  // ES2015 | TypeScript
1142
1142
  import { WalletButtons } from '@paydock/client-sdk';
1143
1143
 
@@ -1206,6 +1206,14 @@ In some situations you may want to forcibly close the checkout so that your user
1206
1206
  button.close();
1207
1207
  ```
1208
1208
 
1209
+ ### Performing actions when the wallet button is clicked
1210
+
1211
+ 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.
1212
+
1213
+ ```javascript
1214
+ button.onClick(() => console.log("Perform actions on button click"));
1215
+ ```
1216
+
1209
1217
  ### Performing actions when shipping info is updated
1210
1218
 
1211
1219
  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).
@@ -1333,30 +1341,51 @@ _(Required `meta` fields: - . Optional `meta` fields: `request_shipping`, `pay_l
1333
1341
  <script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js" ></script>
1334
1342
  <script>
1335
1343
  let button = new paydock.WalletButtons(
1336
- "#widget",
1337
- charge_token,
1338
- {
1339
- request_shipping: true,
1340
- pay_later: true,
1341
- standalone: false,
1342
- style: {
1343
- layout: 'horizontal',
1344
- color: 'blue',
1345
- shape: 'rect',
1346
- label: 'paypal',
1347
- },
1348
- }
1349
- );
1344
+ "#widget",
1345
+ charge_token,
1346
+ {
1347
+ request_shipping: true,
1348
+ pay_later: true,
1349
+ standalone: false,
1350
+ style: {
1351
+ layout: 'horizontal',
1352
+ color: 'blue',
1353
+ shape: 'rect',
1354
+ label: 'paypal',
1355
+ },
1356
+ }
1357
+ );
1350
1358
  button.setEnv('sandbox');
1351
1359
  button.onUnavailable(() => console.log("No wallet buttons available"));
1352
1360
  button.onUpdate((data) => {
1353
- console.log("Updating amount via a backend to backend call to POST charges/:id");
1354
- // call `POST charges/:id` to modify charge
1355
- button.update({ success: true });
1356
- });
1361
+ console.log("Updating amount via a backend to backend call to POST charges/:id");
1362
+ // call `POST charges/:id` to modify charge
1363
+ button.update({ success: true });
1364
+ });
1357
1365
  button.onPaymentSuccessful((data) => console.log("The payment was successful"));
1358
1366
  button.onPaymentError((data) => console.log("The payment was not successful"));
1359
1367
  button.onPaymentInReview((data) => console.log("The payment is on fraud review"));
1368
+
1369
+ // Example 1: Asynchronous onClick handler
1370
+ const asyncLogic = async () => {
1371
+ // Perform asynchronous logic. Expectation is that a Promise is returned and attached to response via `attachResult`,
1372
+ // and resolve or reject of it will dictate how wallet behaves.
1373
+ }
1374
+
1375
+ button.onClick(({ data: { attachResult } }) => {
1376
+ // Promise is attached to the result. On Paypal, when promise is resolved, the user Journey will continue.
1377
+ // If no promise is attached then the Paypal journey will not depend on the promise being resolved or rejected
1378
+ attachResult(asyncLogic());
1379
+ });
1380
+
1381
+ // Example 2: Synchronous onClick handler
1382
+ // button.onClick(({ data: { attachResult } }) => {
1383
+ // // Perform synchronous logic
1384
+ // console.log("Synchronous onClick: Button clicked");
1385
+ // // Optionally return a boolean flag to halt the operation
1386
+ // attachResult(false);
1387
+ // });
1388
+
1360
1389
  button.load();
1361
1390
  </script>
1362
1391
  </html>
@@ -1490,6 +1519,7 @@ _(Required `meta` fields: `amount_label`, `country`. Optional `meta` fields: `ra
1490
1519
  button.onUnavailable(() => console.log("No wallet buttons available"));
1491
1520
  button.onPaymentSuccessful((data) => console.log("The payment was successful"));
1492
1521
  button.onPaymentError((data) => console.log("The payment was not successful"));
1522
+ button.onClick(() => console.log("On WalletButton Click"));
1493
1523
  button.onUpdate((data) => {
1494
1524
  console.log("Updating amount via a backend to backend call to POST charges/:id");
1495
1525
  // call `POST charges/:id` to modify charge
@@ -1522,7 +1552,6 @@ _(Required `meta` fields: `amount_label`, `country`. Optional `meta` fields: `ra
1522
1552
  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.
1523
1553
 
1524
1554
  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.
1525
-
1526
1555
  ### ApplePay and GooglePay via MPGS Raw data initialization example
1527
1556
 
1528
1557
  ```html
@@ -1664,7 +1693,7 @@ var src = new paydock.SRC(
1664
1693
  src.load();
1665
1694
  ```
1666
1695
 
1667
- ```javascript
1696
+ ```javascript--es2015
1668
1697
  // ES2015 | TypeScript
1669
1698
 
1670
1699
  import { SRC } from '@paydock/client-sdk';
package/tslint.json ADDED
@@ -0,0 +1,129 @@
1
+ {
2
+ "defaultSeverity": "error",
3
+ "extends": [
4
+ "tslint:recommended"
5
+ ],
6
+ "jsRules": {
7
+ "no-unused-expression": true
8
+ },
9
+ "rules": {
10
+ "ordered-imports": false,
11
+ "arrow-return-shorthand": false,
12
+ "callable-types": true,
13
+ "class-name": false,
14
+ "comment-format": [
15
+ true,
16
+ "check-space"
17
+ ],
18
+ "curly": false,
19
+ "eofline": true,
20
+ "forin": true,
21
+ "import-blacklist": [
22
+ true,
23
+ "rxjs"
24
+ ],
25
+ "import-spacing": true,
26
+ "indent": [
27
+ true,
28
+ "spaces"
29
+ ],
30
+ "interface-over-type-literal": true,
31
+ "label-position": true,
32
+ "max-line-length": [
33
+ true,
34
+ 300
35
+ ],
36
+ "member-access": false,
37
+ "member-ordering": [
38
+ true,
39
+ {
40
+ "order": [
41
+ "static-field",
42
+ "instance-field",
43
+ "static-method",
44
+ "instance-method"
45
+ ]
46
+ }
47
+ ],
48
+ "no-arg": true,
49
+ "no-bitwise": true,
50
+ "no-console": [
51
+ true,
52
+ "debug",
53
+ "log",
54
+ "time",
55
+ "timeEnd",
56
+ "trace"
57
+ ],
58
+ "no-construct": true,
59
+ "no-debugger": true,
60
+ "no-duplicate-super": true,
61
+ "no-empty": false,
62
+ "no-empty-interface": false,
63
+ "interface-name": [false, "always-prefix"],
64
+ "no-eval": true,
65
+ "no-inferrable-types": [
66
+ true,
67
+ "ignore-params"
68
+ ],
69
+ "max-classes-per-file": [true, 6, "exclude-class-expressions"],
70
+ "no-misused-new": true,
71
+ "no-non-null-assertion": true,
72
+ "no-shadowed-variable": false,
73
+ "no-string-literal": false,
74
+ "no-string-throw": true,
75
+ "jsdoc-format": false,
76
+ "no-switch-case-fall-through": true,
77
+ "no-trailing-whitespace": false,
78
+ "no-unnecessary-initializer": true,
79
+ "no-angle-bracket-type-assertion": false,
80
+ "no-unused-expression": true,
81
+ "no-consecutive-blank-lines": false,
82
+ "no-var-keyword": true,
83
+ "no-reference": false,
84
+ "ban-types": false,
85
+ "object-literal-sort-keys": false,
86
+ "object-literal-shorthand": false,
87
+ "one-line": [
88
+ true,
89
+ "check-open-brace",
90
+ "check-catch",
91
+ "check-else",
92
+ "check-whitespace"
93
+ ],
94
+ "prefer-const": false,
95
+ "quotemark": [
96
+ false,
97
+ "single"
98
+ ],
99
+ "radix": true,
100
+ "semicolon": [
101
+ false
102
+ ],
103
+ "triple-equals": [
104
+ true,
105
+ "allow-null-check"
106
+ ],
107
+ "typedef-whitespace": [
108
+ true,
109
+ {
110
+ "call-signature": "nospace",
111
+ "index-signature": "nospace",
112
+ "parameter": "nospace",
113
+ "property-declaration": "nospace",
114
+ "variable-declaration": "nospace"
115
+ }
116
+ ],
117
+ "unified-signatures": false,
118
+ "variable-name": false,
119
+ "whitespace": [
120
+ false,
121
+ "check-branch",
122
+ "check-decl",
123
+ "check-operator",
124
+ "check-separator",
125
+ "check-type"
126
+ ]
127
+ },
128
+ "rulesDirectory": []
129
+ }
@@ -0,0 +1,43 @@
1
+ declare module '@auspayplus/open-payments-checkout' {
2
+ // WindowFeatures type
3
+ type WindowFeatures = {
4
+ width?: number;
5
+ height?: number;
6
+ left?: number;
7
+ popup?: 'yes' | 'no' | '1' | '0';
8
+ resizable?: 'yes' | 'no' | '1' | '0';
9
+ top?: number;
10
+ };
11
+
12
+ // Callbacks type
13
+ interface ICheckoutCallback {
14
+ orderId: string;
15
+ error?: Error;
16
+ }
17
+
18
+ // Constructor options for Checkout
19
+ interface CheckoutOptions {
20
+ orderId: string;
21
+ url: string;
22
+ accessToken?: string;
23
+ refreshToken?: string;
24
+ clientId?: string;
25
+ onCheckoutClosed?: (callbackData: ICheckoutCallback) => void;
26
+ onError?: (callbackData: ICheckoutCallback) => void;
27
+ onPaymentSuccess?: (callbackData: ICheckoutCallback) => void;
28
+ onPaymentError?: (callbackData: ICheckoutCallback) => void;
29
+ onTokensChanged?: ({ accessToken, refreshToken }: { accessToken: string; refreshToken: string; }) => void;
30
+ windowFeatures?: WindowFeatures;
31
+ auth?: { access_token?: string; refresh_token?: string };
32
+ mode?: string;
33
+ }
34
+
35
+ // Checkout class declaration
36
+ export class Checkout {
37
+ constructor(options: CheckoutOptions);
38
+ isCheckoutOpen(): boolean;
39
+ listenMessage(): void;
40
+ open(): void;
41
+ close(): void;
42
+ }
43
+ }