@paydock/client-sdk 1.104.6-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 (494) hide show
  1. package/.nvmrc +1 -0
  2. package/README.md +320 -362
  3. package/api.d.ts +1 -0
  4. package/api.js +1 -0
  5. package/bundles/widget.umd.js +7410 -6717
  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 +1 -3
  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 +0 -1
  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 +0 -1
  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 +0 -1
  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 +0 -1
  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 +0 -1
  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 +0 -1
  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 +0 -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 +0 -4
  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 +3 -5
  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 -10
  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 +0 -1
  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/{bundles/types → lib}/constants/validators.d.ts +2 -3
  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 +0 -1
  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 +0 -1
  223. package/lib/payment-source-widget/payment-source-widget.js +142 -0
  224. package/lib/payment-source-widget/payment-source-widget.js.map +1 -0
  225. package/lib/secure-remote-commerce/index.d.ts +1 -0
  226. package/lib/secure-remote-commerce/index.js +2 -0
  227. package/lib/secure-remote-commerce/index.js.map +1 -0
  228. package/lib/secure-remote-commerce/interfaces.d.ts +71 -0
  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/lib/secure-remote-commerce/providers/visa-src/helper.d.ts +7 -0
  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/lib/secure-remote-commerce/providers/visa-src/index.d.ts +1 -0
  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/secure-remote-commerce/providers/mastercard-src/mastercard-src.d.ts → lib/secure-remote-commerce/providers/visa-src/visa-src.d.ts} +7 -5
  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/lib/secure-remote-commerce/providers/visa-src/visa-src.styles.d.ts +8 -0
  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/lib/secure-remote-commerce/secure-remote-commerce.d.ts +163 -0
  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 +0 -1
  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 +0 -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 +1 -1
  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 +0 -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/{bundles/types → lib}/wallet-buttons/helpers/flypay-v2.helper.d.ts +0 -1
  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/{bundles/types → lib}/wallet-buttons/index.d.ts +0 -1
  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 +0 -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 → lib}/wallet-buttons/wallet-buttons.d.ts +0 -1
  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 +0 -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 +1 -2
  295. package/lib/widget/configuration.js +260 -0
  296. package/lib/widget/configuration.js.map +1 -0
  297. package/{bundles/types → lib}/widget/html-multi-widget.d.ts +3 -4
  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 +0 -1
  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 +189 -163
  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 -10456
  332. package/bundles/index.cjs.d.ts +0 -3206
  333. package/bundles/index.cjs.map +0 -1
  334. package/bundles/index.mjs +0 -10424
  335. package/bundles/index.mjs.d.ts +0 -3206
  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/constants/validators.d.ts.map +0 -1
  399. package/bundles/types/external-checkout/builder.d.ts.map +0 -1
  400. package/bundles/types/external-checkout/checker.d.ts.map +0 -1
  401. package/bundles/types/external-checkout/index.d.ts +0 -3
  402. package/bundles/types/external-checkout/index.d.ts.map +0 -1
  403. package/bundles/types/helper/access-token.d.ts.map +0 -1
  404. package/bundles/types/helper/browser.d.ts.map +0 -1
  405. package/bundles/types/helper/event-emitter.d.ts.map +0 -1
  406. package/bundles/types/helper/event.d.ts.map +0 -1
  407. package/bundles/types/helper/ms.d.ts.map +0 -1
  408. package/bundles/types/helper/object.d.ts.map +0 -1
  409. package/bundles/types/helper/url.d.ts.map +0 -1
  410. package/bundles/types/helper/uuid.d.ts.map +0 -1
  411. package/bundles/types/index-cba.d.ts +0 -13
  412. package/bundles/types/index-cba.d.ts.map +0 -1
  413. package/bundles/types/index.d.ts +0 -14
  414. package/bundles/types/index.d.ts.map +0 -1
  415. package/bundles/types/payment-source/builder.d.ts.map +0 -1
  416. package/bundles/types/payment-source/index.d.ts.map +0 -1
  417. package/bundles/types/payment-source-widget/html-payment-source-widget.d.ts.map +0 -1
  418. package/bundles/types/payment-source-widget/index.d.ts.map +0 -1
  419. package/bundles/types/payment-source-widget/interfaces.d.ts.map +0 -1
  420. package/bundles/types/payment-source-widget/payment-source-widget.d.ts.map +0 -1
  421. package/bundles/types/secure-remote-commerce/index.d.ts +0 -103
  422. package/bundles/types/secure-remote-commerce/index.d.ts.map +0 -1
  423. package/bundles/types/secure-remote-commerce/interfaces.d.ts +0 -149
  424. package/bundles/types/secure-remote-commerce/interfaces.d.ts.map +0 -1
  425. package/bundles/types/secure-remote-commerce/mastercard-secure-remote-commerce.d.ts +0 -31
  426. package/bundles/types/secure-remote-commerce/mastercard-secure-remote-commerce.d.ts.map +0 -1
  427. package/bundles/types/secure-remote-commerce/providers/mastercard-src/index.d.ts +0 -2
  428. package/bundles/types/secure-remote-commerce/providers/mastercard-src/index.d.ts.map +0 -1
  429. package/bundles/types/secure-remote-commerce/providers/mastercard-src/mastercard-src.d.ts.map +0 -1
  430. package/bundles/types/secure-remote-commerce/providers/src-provider.d.ts.map +0 -1
  431. package/bundles/types/secure-remote-commerce/secure-remote-commerce.d.ts +0 -86
  432. package/bundles/types/secure-remote-commerce/secure-remote-commerce.d.ts.map +0 -1
  433. package/bundles/types/vault-display-widget/index.d.ts.map +0 -1
  434. package/bundles/types/vault-display-widget/vault-display-widget.d.ts.map +0 -1
  435. package/bundles/types/wallet-buttons/afterpay.wallet-service.d.ts.map +0 -1
  436. package/bundles/types/wallet-buttons/apple.wallet-service.d.ts.map +0 -1
  437. package/bundles/types/wallet-buttons/flypay-v2.wallet-service.d.ts.map +0 -1
  438. package/bundles/types/wallet-buttons/flypay.wallet-service.d.ts.map +0 -1
  439. package/bundles/types/wallet-buttons/google.wallet-service.d.ts.map +0 -1
  440. package/bundles/types/wallet-buttons/helpers/flypay-v2.helper.d.ts.map +0 -1
  441. package/bundles/types/wallet-buttons/index-cba.d.ts +0 -2
  442. package/bundles/types/wallet-buttons/index-cba.d.ts.map +0 -1
  443. package/bundles/types/wallet-buttons/index.d.ts.map +0 -1
  444. package/bundles/types/wallet-buttons/interfaces.d.ts.map +0 -1
  445. package/bundles/types/wallet-buttons/mastercard.wallet-service.d.ts.map +0 -1
  446. package/bundles/types/wallet-buttons/paypal.wallet-service.d.ts.map +0 -1
  447. package/bundles/types/wallet-buttons/stripe.wallet-service.d.ts.map +0 -1
  448. package/bundles/types/wallet-buttons/wallet-buttons.d.ts.map +0 -1
  449. package/bundles/types/wallet-buttons/wallet-cba-buttons.d.ts +0 -330
  450. package/bundles/types/wallet-buttons/wallet-cba-buttons.d.ts.map +0 -1
  451. package/bundles/types/wallet-buttons/wallet-service.d.ts.map +0 -1
  452. package/bundles/types/widget/configuration.d.ts.map +0 -1
  453. package/bundles/types/widget/html-multi-widget.d.ts.map +0 -1
  454. package/bundles/types/widget/html-widget.d.ts.map +0 -1
  455. package/bundles/types/widget/index.d.ts.map +0 -1
  456. package/bundles/types/widget/meta.d.ts.map +0 -1
  457. package/bundles/types/widget/multi-widget.d.ts.map +0 -1
  458. package/bundles/types/widget/style.d.ts.map +0 -1
  459. package/bundles/widget.umd.js.d.ts +0 -3206
  460. package/bundles/widget.umd.js.map +0 -1
  461. package/bundles/widget.umd.js.min.d.ts +0 -3206
  462. package/bundles/widget.umd.min.js.map +0 -1
  463. package/docs/api-canvas3ds.md +0 -158
  464. package/docs/api-checkout-button.md +0 -912
  465. package/docs/api-examples.md +0 -65
  466. package/docs/api-ps-widget.md +0 -585
  467. package/docs/api-vault-display.md +0 -94
  468. package/docs/api-widget.md +0 -2499
  469. package/docs/api-wrapper.md +0 -78
  470. package/docs/canvas3ds-examples.md +0 -242
  471. package/docs/cba-header.md +0 -13
  472. package/docs/cba-license.md +0 -2
  473. package/docs/checkout-examples.md +0 -248
  474. package/docs/header.md +0 -15
  475. package/docs/html/layout.html +0 -78
  476. package/docs/html/marked.js +0 -23
  477. package/docs/html/style.css +0 -365
  478. package/docs/install/npm.content.md +0 -16
  479. package/docs/install/npm.example.md +0 -24
  480. package/docs/install/umd.content.md +0 -20
  481. package/docs/install/umd.example.md +0 -6
  482. package/docs/install.md +0 -43
  483. package/docs/install.readme.t.md +0 -17
  484. package/docs/install.slate.t.md +0 -17
  485. package/docs/license.md +0 -2
  486. package/docs/partials/header.hbs +0 -3
  487. package/docs/ps-examples.md +0 -129
  488. package/docs/secure-remote-commerce-examples.md +0 -232
  489. package/docs/secure-remote-commerce.md +0 -336
  490. package/docs/vault-display-example.md +0 -132
  491. package/docs/wallet-buttons-examples.md +0 -609
  492. package/docs/wallet-buttons.md +0 -619
  493. package/docs/wallet-cba-buttons-examples.md +0 -388
  494. 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:
32
31
 
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`.
32
+ *Compressed version for production*
33
+ `https://widget.paydock.com/sdk/latest/widget.umd.min.js`
37
34
 
38
- For production we recommend using the compressed version (`.min.js`) since
39
- it will result in faster loading times for your end users.
35
+ *Full version for development and debug*
36
+ `https://widget.paydock.com/sdk/latest/widget.umd.js`
40
37
 
41
- - *Compressed version for production: `https://widget.paydock.com/sdk/latest/widget.umd.min.js`*
42
38
 
43
- - *Full version for development and debug: `https://widget.paydock.com/sdk/latest/widget.umd.js`*
44
39
 
45
- You may download the production version of the Client SDK scripts [here][min],
46
- and, the development version [here][max].
40
+
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
 
@@ -1664,57 +1664,54 @@ Similarly, for **GooglePay via MPGS** you can initialize the `PaymentMethodSpeci
1664
1664
  </html>
1665
1665
  ```
1666
1666
 
1667
- # Secure Remote Commerce
1667
+ ## Secure Remote Commerce
1668
+ You can find description of all methods and parameters [here](https://www.npmjs.com/package/@paydock/client-sdk#SRC).
1668
1669
 
1669
- ## Overview
1670
-
1671
- Integrate with Mastercard SRC using Paydock's Mastercard SRC widget.
1672
- For a full description of the methods and parameters, reference the [README file](https://www.npmjs.com/package/@paydock/client-sdk#SRC).
1670
+ This widget provides you with the ability to easily integrate with SRC providers. Currently Visa SRC is supported.
1673
1671
 
1674
1672
  ## SRC simple example
1675
1673
 
1676
- The following section provides an example use case and integration for the widget.
1677
-
1678
- ### Create a Container
1679
-
1680
- To integrate the SRC checkout iFrame, create a container in your HTML code. This container serves as the placeholder for the iFrame.
1674
+ ### Container
1681
1675
 
1682
1676
  ```html
1677
+ <div id="checkoutButton"></div>
1683
1678
  <div id="checkoutIframe"></div>
1684
1679
  ```
1685
1680
 
1686
- ### Initialize the Widget
1681
+ You must create a container for the initial checkout button, and a different one for the checkout iFrame. Inside the first tag the button will be initialized, and inside the second one the iFrame will be loaded once the button is clicked.
1687
1682
 
1688
- Use the following code to initialize your widget:
1689
1683
 
1684
+ ### Initialization
1690
1685
  ```javascript
1691
- var src = new paydock.MastercardSRCClickToPay(
1686
+ var src = new paydock.SRC(
1687
+ "#checkoutButton",
1692
1688
  "#checkoutIframe",
1693
- "service_id",
1689
+ "scheme_service_id",
1694
1690
  "paydock_public_key_or_access_token",
1695
1691
  {}, // meta
1696
1692
  );
1697
1693
  src.load();
1698
1694
  ```
1699
1695
 
1700
- ```javascript
1696
+ ```javascript--es2015
1701
1697
  // ES2015 | TypeScript
1702
- import { MastercardSRCClickToPay } from '@paydock/client-sdk';
1703
- var src = new MastercardSRCClickToPay(
1698
+
1699
+ import { SRC } from '@paydock/client-sdk';
1700
+
1701
+ var src = new SRC(
1702
+ "#checkoutButton",
1704
1703
  "#checkoutIframe",
1705
- "service_id",
1704
+ "scheme_service_id",
1706
1705
  "paydock_public_key_or_access_token",
1707
1706
  {}, // meta
1708
1707
  );
1709
1708
  src.load();
1710
1709
  ```
1711
1710
 
1712
- *NOTE:* Paydock recommends that you use a Paydock Access Token instead of a public key for security reasons in production environments. When creating your access token, you must enable the `Secure Remote Commerce` and add a whitelist for the domain of your checkout screen.
1711
+ *NOTE:* it's highly recommended to use a Paydock Access Token instead of the public key for security reasons. When creating it, you will need to enable the `Secure Remote Commerce` and add a whiteliste for the domain of your checkout screen.
1713
1712
 
1714
1713
  ### Full example
1715
1714
 
1716
- A full example of the container and the initialized widget is as follows:
1717
-
1718
1715
  ```html
1719
1716
  <!DOCTYPE html>
1720
1717
  <html lang="en">
@@ -1724,12 +1721,14 @@ A full example of the container and the initialized widget is as follows:
1724
1721
  <style>iframe {border: 0;width: 40%;height: 300px;}</style>
1725
1722
  </head>
1726
1723
  <body>
1724
+ <div id="checkoutButton"></div>
1727
1725
  <div id="checkoutIframe"></div>
1728
1726
  <script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js" ></script>
1729
1727
  <script>
1730
- var src = new paydock.MastercardSRCClickToPay(
1728
+ var src = new paydock.SRC(
1729
+ "#checkoutButton",
1731
1730
  "#checkoutIframe",
1732
- "service_id",
1731
+ "scheme_service_id",
1733
1732
  "paydock_public_key_or_access_token",
1734
1733
  {},
1735
1734
  );
@@ -1739,30 +1738,50 @@ A full example of the container and the initialized widget is as follows:
1739
1738
  </html>
1740
1739
  ```
1741
1740
 
1742
- ## Customize your SRC Checkout
1743
1741
 
1744
- The following is an advanced example that includes customization. You can use these methods to enhance your checkout experience.
1742
+ ## SRC advanced example
1745
1743
 
1746
1744
  ### Settings
1747
1745
 
1748
1746
  ```javascript
1749
- src.setEnv('sandbox'); // set environment
1747
+
1748
+ src.setEnv('sandbox'); // set enviroment
1749
+
1750
+ src.hideButton(); // hide button
1751
+
1752
+ src.showButton(); // show button
1753
+
1750
1754
  src.hideCheckout(); // hide checkout iframe
1755
+
1751
1756
  src.showCheckout(); // show checkout iframe
1757
+
1758
+ src.on('checkoutButtonLoaded', () => {
1759
+ console.log("Button loaded");
1760
+ });
1761
+
1762
+ src.on('checkoutButtonClicked', () => {
1763
+ console.log("Button clicked");
1764
+ });
1765
+
1752
1766
  src.on('iframeLoaded', () => {
1753
1767
  console.log("Initial iframe loaded");
1754
1768
  });
1769
+
1755
1770
  src.on('checkoutReady', () => {
1756
1771
  console.log("Checkout ready to be used");
1757
1772
  });
1773
+
1758
1774
  src.on('checkoutCompleted', (token) => {
1759
1775
  console.log(token);
1760
1776
  });
1777
+
1761
1778
  src.on('checkoutError', (error) => {
1762
1779
  console.log(error);
1763
1780
  });
1764
1781
  ```
1765
1782
 
1783
+ Here you can see how you can use this methods to customize your checkout experience
1784
+
1766
1785
  ### Full example
1767
1786
 
1768
1787
  ```html
@@ -1774,73 +1793,64 @@ src.on('checkoutError', (error) => {
1774
1793
  <style>iframe {border: 0;width: 40%;height: 450px;}</style>
1775
1794
  </head>
1776
1795
  <body>
1796
+ <div id="checkoutButton"></div>
1777
1797
  <div id="checkoutIframe"></div>
1778
1798
  <script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js" ></script>
1779
1799
  <script>
1780
- var src = new paydock.MastercardSRCClickToPay(
1800
+ var src = new paydock.SRC(
1801
+ "#checkoutButton",
1781
1802
  "#checkoutIframe",
1782
- "service_id",
1803
+ "scheme_service_id",
1783
1804
  "paydock_public_key_or_access_token",
1784
1805
  {},
1785
1806
  );
1786
- src.on('iframeLoaded', () => {
1787
- console.log("Initial iframe loaded");
1788
- });
1807
+
1789
1808
  src.on('checkoutReady', () => {
1790
1809
  console.log("Checkout ready to be used");
1791
1810
  });
1811
+
1792
1812
  src.on('checkoutCompleted', (token) => {
1793
1813
  console.log(token);
1794
1814
  });
1795
- src.on('checkoutError', (error) => {
1796
- console.log(error);
1797
- });
1798
1815
  src.load();
1799
1816
  </script>
1800
1817
  </body>
1801
1818
  </html>
1802
1819
  ```
1803
1820
 
1804
- ## Customize your billing address fields
1821
+ ## Customization options for address fields
1822
+ ### Shipping address:
1805
1823
 
1806
- To customize your billing address experience, Paydock uses a flag that manages whether a customer's billing address is mandatory.
1807
- The options for this customization are NONE (default option), and POSTAL_COUNTRY or FULL.
1824
+ To customize shipping address experience we use a flag that manages how VisaSRC requires or not shipping address to the customer. Options are NONE (default option), POSTAL_COUNTRY or ALL.
1808
1825
 
1809
1826
  ```
1810
- var src = new paydock.MastercardSRCClickToPay(
1827
+ var src = new paydock.SRC(
1828
+ "#checkoutButton",
1811
1829
  "#checkoutIframe",
1812
- "service_id",
1830
+ "scheme_service_id",
1813
1831
  "paydock_public_key_or_access_token",
1814
1832
  {
1815
1833
  "dpa_transaction_options": {
1816
- "dpa_billing_preference": "FULL"
1834
+ "dpa_shipping_preference": "ALL"
1817
1835
  }
1818
1836
  },
1819
1837
  );
1820
1838
  ```
1821
1839
 
1822
- The SRC checkout in the example requires the billing address from the customer, which is then returned as a part of the checkout data. The data is then stored and leveraged in the Paydock charge.
1823
- You can also provide the billing address at the time of creating the charge. For example, if you have a different method for collecting the billing address, such as outside of the SRC checkout, you can provide it alongside other information at the charge creation step:
1840
+ With this the Visa popup requires the shipping address from consumer, and these information will be stored in the Paydock charge.
1824
1841
 
1825
- 1. Disable the billing address in Paydock's SRC widget.
1826
- 2. Get your One Time Token from the SRC widget alongside other details that may have been collected outside the SRC checkout as the shipping address.
1827
- 3. Send the billing address when creating the charge.
1842
+ Another option is at time of creating the charge. Say that you have a different way of collecting the shipping address (outside Paydock checkout), you can then disable the shipping address on our SRC widget and send it when creating the charge creation after getting the One Time Token out of the SRC widget:
1828
1843
 
1829
1844
  ```
1830
1845
  POST v1/charges
1846
+
1831
1847
  {
1832
1848
  "amount": "10.00",
1833
1849
  "currency": "AUD",
1834
- "token": "one_time_token",
1850
+ "token": "token",
1835
1851
  "customer": {
1836
1852
  "payment_source": {
1837
- "gateway_id": "gateway_id",
1838
- "address_line1": "address_line1",
1839
- "address_line2": "address_line2",
1840
- "address_city": "address_city",
1841
- "address_postcode": "address_postcode",
1842
- "address_state": "address_state",
1843
- "address_country": "address_country"
1853
+ "gateway_id": "gateway_id"
1844
1854
  }
1845
1855
  },
1846
1856
  "shipping": {
@@ -1855,44 +1865,60 @@ POST v1/charges
1855
1865
  }
1856
1866
  ```
1857
1867
 
1858
- ## How to customize accepted cards
1859
-
1860
- You can send a flag `unaccepted_card_type` to block the usage of a specific card type. The available options are 'DEBIT' and 'CREDIT'.
1868
+ - Billing address:
1861
1869
 
1862
- ### Example code
1863
-
1864
- The following example demonstrates how to block the card:
1870
+ Billing address fields are always present on the checkout and required when adding a new credit card (or for new consumer checkout). You can send billing fields on the meta data to pre-fill these fields inside the customer object:
1865
1871
 
1866
1872
  ```
1867
- var src = new paydock.MastercardSRCClickToPay(
1873
+ var src = new paydock.SRC(
1874
+ "#checkoutButton",
1868
1875
  "#checkoutIframe",
1869
- "service_id",
1870
- "paydock_public_key",
1876
+ "scheme_service_id",
1877
+ "paydock_public_key_or_access_token",
1871
1878
  {
1872
- unaccepted_card_type: 'DEBIT'
1879
+ "customer": {
1880
+ "email": "test@email.com",
1881
+ "first_name": "Name",
1882
+ "last_name": "Surname",
1883
+ "phone": {
1884
+ "country_code": "1",
1885
+ "phone": "2124567890"
1886
+ },
1887
+ "payment_source": {
1888
+ "address_line1": "Line 1",
1889
+ "address_line2": "Line 2",
1890
+ "address_city": "Miami",
1891
+ "address_postcode": "33126",
1892
+ "address_state": "FL",
1893
+ "address_country": "US"
1894
+ }
1895
+ }
1873
1896
  },
1874
1897
  );
1875
1898
  ```
1876
1899
 
1877
- ## Personalize the Style
1900
+ ## Personalization Styling
1878
1901
 
1879
- Customize the look and feel of your UI. The following example demonstrates changes in the styling of the buttons.
1902
+ To improve the experience in the use of the widget, it is allowed to send props that customize the UI.
1880
1903
 
1881
1904
  ### Example code
1882
1905
 
1883
1906
  ```
1884
- var src = new paydock.MastercardSRCClickToPay(
1907
+ var src = new paydock.SRC(
1908
+ "#checkoutButton",
1885
1909
  "#checkoutIframe",
1886
- "service_id",
1910
+ "scheme_service_id",
1887
1911
  "paydock_public_key",
1888
- {},
1889
1912
  );
1890
- src.setStyles({
1891
- enable_src_popup: true,
1892
- primary_button_color: 'red',
1893
- secondary_button_color: 'red',
1894
- primary_button_text_color: 'red',
1895
- secondary_button_text_color: 'red',
1896
- font_family: 'Arial',
1897
- });
1913
+
1914
+ button.setStyles({"primary_color":"#a83232","button_text_color":"#171e9c","font_family":"sans-serif"})
1915
+
1898
1916
  ```
1917
+ ## Event and Values
1918
+
1919
+ | Event Value | Type | Description |
1920
+ | ------------------- | ------------------- | -------------------------------------------------------------- |
1921
+ | primary_color | <code>string</code> | HEX color for the principal buttons, example : #32a852 |
1922
+ | button_text_color | <code>string</code> | HEX color for the text of the buttons, example : #32a852|
1923
+ | font_family | <code>string</code> | Look more [mozilla.org/color](https://developer.mozilla.org/en-US/docs/Web/CSS/font-family)|
1924
+ | card_schemes | <code>[string] - array of string</code> | Possible values "visa", "mastercard", "amex" and "discover" - Default show all logos