@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/canvas3ds.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './lib/canvas-3ds';
package/canvas3ds.js ADDED
@@ -0,0 +1 @@
1
+ export * from './lib/canvas-3ds';
@@ -0,0 +1 @@
1
+ export * from './lib/checkout-button';
@@ -0,0 +1 @@
1
+ export * from './lib/checkout-button';
@@ -0,0 +1,7 @@
1
+ **Initialization guide**: https://paydock.atlassian.net/wiki/spaces/PD/pages/1931837503/Initialization+guide
2
+
3
+ For work local:
4
+ 1. npm i
5
+ 2. install grunt global
6
+ 3. grunt build
7
+ 4. grunt replace_host
@@ -1,4 +1,4 @@
1
- import { Env } from '../configs/env';
1
+ import { Env } from '../configs/env/env';
2
2
  export declare enum API_AUTH_TYPE {
3
3
  PUBLIC_KEY = 0,
4
4
  TOKEN = 1
@@ -38,4 +38,3 @@ declare class ApiBase {
38
38
  setAuthHeader(request: XMLHttpRequest): void;
39
39
  }
40
40
  export { ApiBase };
41
- //# sourceMappingURL=api-base.d.ts.map
@@ -0,0 +1,101 @@
1
+ import { AccessToken } from '../helper/access-token';
2
+ import { Env, API_URL } from '../configs/env/env';
3
+ import { SDK } from '../configs/sdk';
4
+ export var API_AUTH_TYPE;
5
+ (function (API_AUTH_TYPE) {
6
+ API_AUTH_TYPE[API_AUTH_TYPE["PUBLIC_KEY"] = 0] = "PUBLIC_KEY";
7
+ API_AUTH_TYPE[API_AUTH_TYPE["TOKEN"] = 1] = "TOKEN";
8
+ })(API_AUTH_TYPE || (API_AUTH_TYPE = {}));
9
+ class ApiBase {
10
+ constructor(auth, authType) {
11
+ this.auth = auth;
12
+ this.authType = authType || this.setAuthType();
13
+ this.env = new Env(API_URL);
14
+ }
15
+ /**
16
+ * Current method can change environment. By default environment = sandbox.
17
+ * Also we can change domain alias for this environment. By default domain_alias = paydock.com
18
+ *
19
+ * @example
20
+ * widget.setEnv('production');
21
+ * @param {string} env - sandbox, production
22
+ * @param {string} [alias] - Own domain alias
23
+ */
24
+ setEnv(env, alias) {
25
+ this.env.setEnv(env, alias);
26
+ return this;
27
+ }
28
+ setAuthType() {
29
+ return this.authType = !!AccessToken.validateJWT(this.auth) ? API_AUTH_TYPE.TOKEN : API_AUTH_TYPE.PUBLIC_KEY;
30
+ }
31
+ getClient(method, link) {
32
+ let request = new XMLHttpRequest();
33
+ request.open(method, this.env.getConf().url + link, true);
34
+ request.setRequestHeader('Content-Type', 'application/json; charset=UTF-8');
35
+ this.setAuthHeader(request);
36
+ if (SDK.version) {
37
+ request.setRequestHeader(SDK.headerKeys.version, SDK.version);
38
+ request.setRequestHeader(SDK.headerKeys.type, SDK.type);
39
+ }
40
+ return {
41
+ config: request,
42
+ send: (body, cb, errorCb) => {
43
+ request.onload = () => this.parser({ text: request.responseText, status: request.status }, cb, errorCb);
44
+ request.send(JSON.stringify(body));
45
+ },
46
+ };
47
+ }
48
+ getClientPromise(method, link) {
49
+ let request = new XMLHttpRequest();
50
+ request.open(method, this.env.getConf().url + link, true);
51
+ request.setRequestHeader('Content-Type', 'application/json; charset=UTF-8');
52
+ this.setAuthHeader(request);
53
+ if (SDK.version) {
54
+ request.setRequestHeader(SDK.headerKeys.version, SDK.version);
55
+ request.setRequestHeader(SDK.headerKeys.type, SDK.type);
56
+ }
57
+ return {
58
+ config: request,
59
+ send: (body) => new Promise((resolve, reject) => {
60
+ request.onload = () => resolve({ text: request.responseText, status: request.status });
61
+ request.send(JSON.stringify(body));
62
+ }).then((value) => this.parserPromise(value)),
63
+ };
64
+ }
65
+ parser({ text, status }, cb, errorCb) {
66
+ try {
67
+ let res = JSON.parse(text);
68
+ if ((status >= 200 && status < 300) || status === 302)
69
+ return cb(res.resource.data);
70
+ else
71
+ errorCb(res.error || { message: 'unknown error' });
72
+ }
73
+ catch (e) {
74
+ }
75
+ }
76
+ parserPromise({ text, status }) {
77
+ try {
78
+ const res = JSON.parse(text);
79
+ return ((status >= 200 && status < 300) || status === 302)
80
+ ? Promise.resolve(res.resource.data)
81
+ : Promise.reject(res.error || { message: 'unknown error' });
82
+ }
83
+ catch (e) {
84
+ return Promise.reject(e);
85
+ }
86
+ }
87
+ setAuthHeader(request) {
88
+ switch (this.authType) {
89
+ case API_AUTH_TYPE.PUBLIC_KEY: {
90
+ request.setRequestHeader('x-user-public-key', this.auth);
91
+ break;
92
+ }
93
+ case API_AUTH_TYPE.TOKEN: {
94
+ request.setRequestHeader('x-access-token', this.auth);
95
+ break;
96
+ }
97
+ }
98
+ }
99
+ }
100
+ export { ApiBase };
101
+ //# sourceMappingURL=../../src/lib/api/api-base.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-base.js","sourceRoot":"","sources":["../../api/api-base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,GAAG,EAAO,OAAO,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AAErC,MAAM,CAAN,IAAY,aAGX;AAHD,WAAY,aAAa;IACrB,6DAAU,CAAA;IACV,mDAAK,CAAA;AACT,CAAC,EAHW,aAAa,KAAb,aAAa,QAGxB;AAED,MAAM,OAAO;IAKT,YAAY,IAAY,EAAE,QAAwB;QAC9C,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,QAAQ,GAAG,QAAQ,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;QAC/C,IAAI,CAAC,GAAG,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC;IAChC,CAAC;IAED;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAW,EAAE,KAAc;QACrC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QAC5B,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,WAAW;QACP,OAAO,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC,WAAW,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC,aAAa,CAAC,UAAU,CAAC;IACjH,CAAC;IAED,SAAS,CAAC,MAAsB,EAAE,IAAY;QAC1C,IAAI,OAAO,GAAG,IAAI,cAAc,EAAE,CAAC;QACnC,OAAO,CAAC,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G,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YAC7B,OAAO,CAAC,CAAC,MAAM,IAAI,GAAG,IAAI,MAAM,GAAG,GAAG,CAAC,IAAI,MAAM,KAAK,GAAG,CAAC;gBACtD,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC;gBACpC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,OAAO,EAAE,eAAe,EAAE,CAAC,CAAC;SACnE;QAAC,OAAO,CAAC,EAAE;YACR,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;SAC5B;IACL,CAAC;IAED,aAAa,CAAC,OAAuB;QACjC,QAAO,IAAI,CAAC,QAAQ,EAAE;YAClB,KAAK,aAAa,CAAC,UAAU,CAAC,CAAC;gBAC3B,OAAO,CAAC,gBAAgB,CAAC,mBAAmB,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;gBACzD,MAAM;aACT;YACD,KAAK,aAAa,CAAC,KAAK,CAAC,CAAC;gBACtB,OAAO,CAAC,gBAAgB,CAAC,gBAAgB,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;gBACtD,MAAM;aACT;SACJ;IACL,CAAC;CACJ;AAED,OAAO,EAAE,OAAO,EAAE,CAAC"}
@@ -95,4 +95,3 @@ export interface ProcessAuthenticationResponse {
95
95
  };
96
96
  }
97
97
  export {};
98
- //# sourceMappingURL=api-charge-internal.d.ts.map
@@ -0,0 +1,30 @@
1
+ const WALLET_CAPTURE_LINK = '/v1/charges/wallet/capture';
2
+ const WALLET_CALLBACK_LINK = '/v1/charges/wallet/callback';
3
+ const STANDALONE_3DS_PROCESS_LINK = '/v1/charges/standalone-3ds/process';
4
+ const STANDALONE_3DS_HANDLE_LINK = '/v1/charges/standalone-3ds/handle';
5
+ export class ApiChargeInternal {
6
+ constructor(api) {
7
+ this.api = api;
8
+ }
9
+ walletCapture(payload) {
10
+ return this.api
11
+ .getClientPromise('POST', WALLET_CAPTURE_LINK)
12
+ .send(payload);
13
+ }
14
+ walletCallback(payload) {
15
+ return this.api
16
+ .getClientPromise('POST', WALLET_CALLBACK_LINK)
17
+ .send(payload);
18
+ }
19
+ standalone3dsProcess(payload) {
20
+ return this.api
21
+ .getClientPromise('POST', STANDALONE_3DS_PROCESS_LINK)
22
+ .send(payload);
23
+ }
24
+ standalone3dsHandle() {
25
+ return this.api
26
+ .getClientPromise('GET', STANDALONE_3DS_HANDLE_LINK)
27
+ .send(undefined);
28
+ }
29
+ }
30
+ //# sourceMappingURL=../../src/lib/api/api-charge-internal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-charge-internal.js","sourceRoot":"","sources":["../../api/api-charge-internal.ts"],"names":[],"mappings":"AAEA,MAAM,mBAAmB,GAAG,4BAA4B,CAAC;AACzD,MAAM,oBAAoB,GAAG,6BAA6B,CAAC;AAC3D,MAAM,2BAA2B,GAAG,oCAAoC,CAAC;AACzE,MAAM,0BAA0B,GAAG,mCAAmC,CAAC;AAEvE,MAAM,OAAO,iBAAiB;IAC1B,YAAsB,GAAgB;QAAhB,QAAG,GAAH,GAAG,CAAa;IACtC,CAAC;IAED,aAAa,CAAC,OAA0B;QACpC,OAAO,IAAI,CAAC,GAAG;aACV,gBAAgB,CAA2C,MAAM,EAAE,mBAAmB,CAAC;aACvF,IAAI,CAAC,OAAO,CAAC,CAAC;IACvB,CAAC;IAED,cAAc,CAAC,OAA2B;QACtC,OAAO,IAAI,CAAC,GAAG;aACV,gBAAgB,CAA6C,MAAM,EAAE,oBAAoB,CAAC;aAC1F,IAAI,CAAC,OAAO,CAAC,CAAC;IACvB,CAAC;IAED,oBAAoB,CAAC,OAAiC;QAClD,OAAO,IAAI,CAAC,GAAG;aACV,gBAAgB,CAA0D,MAAM,EAAE,2BAA2B,CAAC;aAC9G,IAAI,CAAC,OAAO,CAAC,CAAC;IACvB,CAAC;IAED,mBAAmB;QACf,OAAO,IAAI,CAAC,GAAG;aACV,gBAAgB,CAAoD,KAAK,EAAE,0BAA0B,CAAC;aACtG,IAAI,CAAC,SAAS,CAAC,CAAC;IACzB,CAAC;CACJ"}
@@ -33,4 +33,3 @@ interface PreAuthBody {
33
33
  };
34
34
  }
35
35
  export { ApiCharge };
36
- //# sourceMappingURL=api-charge.d.ts.map
@@ -0,0 +1,49 @@
1
+ import { Browser } from '../helper/browser';
2
+ const PRE_AUTH_CHARGE_LINK = '/v1/charges/3ds';
3
+ class ApiCharge {
4
+ constructor(api) {
5
+ this.api = api;
6
+ }
7
+ /**
8
+ * Current method allows to work with charge related endpoints
9
+ *
10
+ * @example
11
+ * api.charge().preAuth('payload', cb);
12
+ *
13
+ * @param {object} payload - Payload for pre authorization.
14
+ * @param {number} payload.amount - Charge amount.
15
+ * @param {string} payload.currency - Charge currency.
16
+ * @param {string} payload.token - Payment source token.
17
+ * @param {string} [payload._3ds.redirect_url] - Redirect url after 3d secure processing.
18
+ * @param {listener} [cb]
19
+ */
20
+ preAuth(payload, cb) {
21
+ if (typeof cb === 'function')
22
+ return this.api
23
+ .getClient('POST', PRE_AUTH_CHARGE_LINK)
24
+ .send(Object.assign(Object.assign({}, payload), { _3ds: Object.assign(Object.assign({}, payload._3ds), { browser_details: {
25
+ name: Browser.getBrowserName(),
26
+ java_enabled: Browser.isJavaEnabled().toString(),
27
+ language: Browser.getLanguage(),
28
+ screen_height: Browser.getScreenHeight().toString(),
29
+ screen_width: Browser.getScreenWidth().toString(),
30
+ time_zone: Browser.getTimezoneOffset().toString(),
31
+ color_depth: Browser.getColorDepth().toString(),
32
+ } }) }), (data) => {
33
+ cb(data);
34
+ });
35
+ return this.api
36
+ .getClientPromise('POST', PRE_AUTH_CHARGE_LINK)
37
+ .send(Object.assign(Object.assign({}, payload), { _3ds: Object.assign(Object.assign({}, payload._3ds), { browser_details: {
38
+ name: Browser.getBrowserName(),
39
+ java_enabled: Browser.isJavaEnabled().toString(),
40
+ language: Browser.getLanguage(),
41
+ screen_height: Browser.getScreenHeight().toString(),
42
+ screen_width: Browser.getScreenWidth().toString(),
43
+ time_zone: Browser.getTimezoneOffset().toString(),
44
+ color_depth: Browser.getColorDepth().toString(),
45
+ } }) }));
46
+ }
47
+ }
48
+ export { ApiCharge };
49
+ //# sourceMappingURL=../../src/lib/api/api-charge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-charge.js","sourceRoot":"","sources":["../../api/api-charge.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,MAAM,oBAAoB,GAAG,iBAAiB,CAAC;AAE/C,MAAM,SAAS;IACX,YAAsB,GAAQ;QAAR,QAAG,GAAH,GAAG,CAAK;IAC9B,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,OAAO,CAAC,OAAoB,EAAE,EAAmB;QAE7C,IAAI,OAAO,EAAE,KAAK,UAAU;YACxB,OAAO,IAAI,CAAC,GAAG;iBACV,SAAS,CAAC,MAAM,EAAE,oBAAoB,CAAC;iBACvC,IAAI,iCACE,OAAO,KACV,IAAI,kCACG,OAAO,CAAC,IAAI,KACf,eAAe,EAAE;wBACb,IAAI,EAAE,OAAO,CAAC,cAAc,EAAE;wBAC9B,YAAY,EAAE,OAAO,CAAC,aAAa,EAAE,CAAC,QAAQ,EAAE;wBAChD,QAAQ,EAAE,OAAO,CAAC,WAAW,EAAE;wBAC/B,aAAa,EAAE,OAAO,CAAC,eAAe,EAAE,CAAC,QAAQ,EAAE;wBACnD,YAAY,EAAE,OAAO,CAAC,cAAc,EAAE,CAAC,QAAQ,EAAE;wBACjD,SAAS,EAAE,OAAO,CAAC,iBAAiB,EAAE,CAAC,QAAQ,EAAE;wBACjD,WAAW,EAAE,OAAO,CAAC,aAAa,EAAE,CAAC,QAAQ,EAAE;qBAClD,QAEN,CAAC,IAAI,EAAE,EAAE;gBACR,EAAE,CAAC,IAAI,CAAC,CAAC;YACb,CAAC,CAAC,CAAC;QAEX,OAAO,IAAI,CAAC,GAAG;aACV,gBAAgB,CAAmC,MAAM,EAAE,oBAAoB,CAAC;aAChF,IAAI,iCACE,OAAO,KACV,IAAI,kCACG,OAAO,CAAC,IAAI,KACf,eAAe,EAAE;oBACb,IAAI,EAAE,OAAO,CAAC,cAAc,EAAE;oBAC9B,YAAY,EAAE,OAAO,CAAC,aAAa,EAAE,CAAC,QAAQ,EAAE;oBAChD,QAAQ,EAAE,OAAO,CAAC,WAAW,EAAE;oBAC/B,aAAa,EAAE,OAAO,CAAC,eAAe,EAAE,CAAC,QAAQ,EAAE;oBACnD,YAAY,EAAE,OAAO,CAAC,cAAc,EAAE,CAAC,QAAQ,EAAE;oBACjD,SAAS,EAAE,OAAO,CAAC,iBAAiB,EAAE,CAAC,QAAQ,EAAE;oBACjD,WAAW,EAAE,OAAO,CAAC,aAAa,EAAE,CAAC,QAAQ,EAAE;iBAClD,OAEP,CAAC;IACX,CAAC;CAEJ;AAmCD,OAAO,EAAE,SAAS,EAAE,CAAC"}
@@ -6,4 +6,3 @@ export declare class ApiInternal extends ApiBase {
6
6
  charge(): ApiChargeInternal;
7
7
  service(): ApiServiceInternal;
8
8
  }
9
- //# sourceMappingURL=api-internal.d.ts.map
@@ -0,0 +1,13 @@
1
+ import { ApiBase } from './api-base';
2
+ import { ApiChargeInternal } from './api-charge-internal';
3
+ import { ApiServiceInternal } from './api-service-internal';
4
+ export { API_AUTH_TYPE } from './api-base';
5
+ export class ApiInternal extends ApiBase {
6
+ charge() {
7
+ return new ApiChargeInternal(this);
8
+ }
9
+ service() {
10
+ return new ApiServiceInternal(this);
11
+ }
12
+ }
13
+ //# sourceMappingURL=../../src/lib/api/api-internal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-internal.js","sourceRoot":"","sources":["../../api/api-internal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE5D,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C,MAAM,OAAO,WAAY,SAAQ,OAAO;IACpC,MAAM;QACF,OAAO,IAAI,iBAAiB,CAAC,IAAI,CAAC,CAAC;IACvC,CAAC;IAED,OAAO;QACH,OAAO,IAAI,kBAAkB,CAAC,IAAI,CAAC,CAAC;IACxC,CAAC;CACJ"}
@@ -15,4 +15,3 @@ export interface GetConfigResponse {
15
15
  certificate: string;
16
16
  certificate_passphrase: string;
17
17
  }
18
- //# sourceMappingURL=api-service-internal.d.ts.map
@@ -0,0 +1,18 @@
1
+ const GET_CONFIG = '/v1/services/:service_id/config';
2
+ export class ApiServiceInternal {
3
+ constructor(api) {
4
+ this.api = api;
5
+ }
6
+ getConfig(service_id) {
7
+ const url = GET_CONFIG.replace(':service_id', service_id);
8
+ return this.api
9
+ .getClientPromise('GET', url)
10
+ .send(undefined);
11
+ }
12
+ }
13
+ export var CARD_SCHEME_SERVICE;
14
+ (function (CARD_SCHEME_SERVICE) {
15
+ CARD_SCHEME_SERVICE["VISA_SRC"] = "VisaSRC";
16
+ })(CARD_SCHEME_SERVICE || (CARD_SCHEME_SERVICE = {}));
17
+ ;
18
+ //# sourceMappingURL=../../src/lib/api/api-service-internal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-service-internal.js","sourceRoot":"","sources":["../../api/api-service-internal.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,GAAG,iCAAiC,CAAC;AAErD,MAAM,OAAO,kBAAkB;IAC3B,YAAsB,GAAgB;QAAhB,QAAG,GAAH,GAAG,CAAa;IACtC,CAAC;IAED,SAAS,CAAC,UAAkB;QACxB,MAAM,GAAG,GAAG,UAAU,CAAC,OAAO,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC;QAE1D,OAAO,IAAI,CAAC,GAAG;aACV,gBAAgB,CAAwB,KAAK,EAAE,GAAG,CAAC;aACnD,IAAI,CAAC,SAAS,CAAC,CAAC;IACzB,CAAC;CACJ;AAED,MAAM,CAAN,IAAY,mBAEX;AAFD,WAAY,mBAAmB;IAC3B,2CAAoB,CAAA;AACxB,CAAC,EAFW,mBAAmB,KAAnB,mBAAmB,QAE9B;AAAA,CAAC"}
@@ -33,7 +33,7 @@ export interface BrowserDetails {
33
33
  **/
34
34
  declare class Api extends ApiBase {
35
35
  publicKey: String;
36
- constructor(publicKey: string);
36
+ /** @constructs */ constructor(publicKey: string);
37
37
  /**
38
38
  * Method for getting browser details
39
39
  *
@@ -52,4 +52,3 @@ declare class Api extends ApiBase {
52
52
  charge(): ApiCharge;
53
53
  }
54
54
  export { Api };
55
- //# sourceMappingURL=api.d.ts.map
package/lib/api/api.js ADDED
@@ -0,0 +1,62 @@
1
+ import { ApiCharge } from './api-charge';
2
+ import { Browser } from '../helper/browser';
3
+ import { ApiBase } from './api-base';
4
+ /**
5
+ * Interface for browser details response.
6
+ * @interface BrowserDetails
7
+ *
8
+ * @param {string} [name]
9
+ * @param {string} [java_enabled]
10
+ * @param {string} [language]
11
+ * @param {string} [screen_height]
12
+ * @param {string} [screen_width]
13
+ * @param {string} [time_zone]
14
+ * @param {string} [color_depth]
15
+ * */
16
+ /**
17
+ * Class Api include method for working with paydock api
18
+ * @constructor
19
+ *
20
+ * @param {string} publicKey - PayDock users public key
21
+ * @example
22
+ * var api = new Api('publicKey');
23
+ *
24
+ *
25
+ **/
26
+ class Api extends ApiBase {
27
+ /** @constructs */ // constructs added for correct parse classes jsdoc2md
28
+ constructor(publicKey) {
29
+ super(publicKey);
30
+ this.publicKey = this.auth;
31
+ }
32
+ /**
33
+ * Method for getting browser details
34
+ *
35
+ * @example
36
+ * api.getBrowserDetails();
37
+ *
38
+ * @return {BrowserDetails} Browser details object
39
+ */
40
+ getBrowserDetails() {
41
+ return {
42
+ name: Browser.getBrowserName(),
43
+ java_enabled: Browser.isJavaEnabled().toString(),
44
+ language: Browser.getLanguage(),
45
+ screen_height: Browser.getScreenHeight().toString(),
46
+ screen_width: Browser.getScreenWidth().toString(),
47
+ time_zone: Browser.getTimezoneOffset().toString(),
48
+ color_depth: Browser.getColorDepth().toString(),
49
+ };
50
+ }
51
+ /**
52
+ * Current method allows to work with charge related endpoints
53
+ *
54
+ * @example
55
+ * api.charge();
56
+ */
57
+ charge() {
58
+ return new ApiCharge(this);
59
+ }
60
+ }
61
+ export { Api };
62
+ //# sourceMappingURL=../../src/lib/api/api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api.js","sourceRoot":"","sources":["../../api/api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAYrC;;;;;;;;;;;KAWK;AAEL;;;;;;;;;IASI;AACJ,MAAM,GAAI,SAAQ,OAAO;IAGrB,kBAAkB,CAAC,sDAAsD;IACzE,YAAY,SAAiB;QACzB,KAAK,CAAC,SAAS,CAAC,CAAC;QACjB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC;IAC/B,CAAC;IAED;;;;;;;OAOG;IACI,iBAAiB;QACpB,OAAO;YACH,IAAI,EAAE,OAAO,CAAC,cAAc,EAAE;YAC9B,YAAY,EAAE,OAAO,CAAC,aAAa,EAAE,CAAC,QAAQ,EAAE;YAChD,QAAQ,EAAE,OAAO,CAAC,WAAW,EAAE;YAC/B,aAAa,EAAE,OAAO,CAAC,eAAe,EAAE,CAAC,QAAQ,EAAE;YACnD,YAAY,EAAE,OAAO,CAAC,cAAc,EAAE,CAAC,QAAQ,EAAE;YACjD,SAAS,EAAE,OAAO,CAAC,iBAAiB,EAAE,CAAC,QAAQ,EAAE;YACjD,WAAW,EAAE,OAAO,CAAC,aAAa,EAAE,CAAC,QAAQ,EAAE;SAClD,CAAC;IACN,CAAC;IAED;;;;;OAKG;IACH,MAAM;QACF,OAAO,IAAI,SAAS,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;CACJ;AAED,OAAO,EAAE,GAAG,EAAE,CAAC"}
@@ -0,0 +1 @@
1
+ export { Api } from './api';
@@ -0,0 +1,2 @@
1
+ export { Api } from './api';
2
+ //# sourceMappingURL=../../src/lib/api/index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../api/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC"}
@@ -65,7 +65,7 @@ declare class Canvas3ds {
65
65
  protected iFrame: IFrame;
66
66
  protected event: IFrameEvent;
67
67
  protected eventEmitter: EventEmitter;
68
- constructor(selector: string, token: string);
68
+ /** @constructs */ constructor(selector: string, token: string);
69
69
  protected static extractToken(token: string): {
70
70
  content: string;
71
71
  format: TOKEN_FORMAT;
@@ -106,4 +106,3 @@ declare class Canvas3ds {
106
106
  reload(): void;
107
107
  }
108
108
  export { Canvas3ds };
109
- //# sourceMappingURL=canvas-3ds.d.ts.map
@@ -0,0 +1,157 @@
1
+ import { Link, SECURE_3D } from '../components/link';
2
+ import { Container } from '../components/container';
3
+ import { IFrame } from '../components/iframe';
4
+ import { IFrameEvent } from '../components/iframe-event';
5
+ import { Standalone3dsService } from '../canvas-3ds/services/index';
6
+ import { EventEmitter } from "../helper/event-emitter";
7
+ /**
8
+ * List of available token's content formats
9
+ * @enum TOKEN_FORMAT
10
+ *
11
+ * @type {object}
12
+ * @param {string} HTML=html
13
+ */
14
+ var TOKEN_FORMAT;
15
+ (function (TOKEN_FORMAT) {
16
+ TOKEN_FORMAT["HTML"] = "html";
17
+ TOKEN_FORMAT["URL"] = "url";
18
+ TOKEN_FORMAT["STANDALONE_3DS"] = "standalone_3ds";
19
+ })(TOKEN_FORMAT || (TOKEN_FORMAT = {}));
20
+ /**
21
+ * List of available event's name
22
+ * @const EVENT
23
+ *
24
+ * @type {object}
25
+ * @param {string} CHARGE_AUTH_SUCCESS=chargeAuthSuccess
26
+ * @param {string} CHARGE_AUTH_REJECT=chargeAuthReject
27
+ * @param {string} ADDITIONAL_DATA_SUCCESS=additionalDataCollectSuccess
28
+ * @param {string} ADDITIONAL_DATA_REJECT=additionalDataCollectReject
29
+ * @param {string} CHARGE_AUTH=chargeAuth
30
+ */
31
+ /**
32
+ * List of available event's name for Standalone 3ds flow
33
+ * @const STANDALONE_3DS_EVENT
34
+ *
35
+ * @type {object}
36
+ * @param {string} CHARGE_AUTH_SUCCESS=chargeAuthSuccess
37
+ * @param {string} CHARGE_AUTH_REJECT=chargeAuthReject
38
+ * @param {string} CHARGE_AUTH_DECOUPLED=chargeAuthDecoupled
39
+ * @param {string} CHARGE_AUTH_CHALLENGE=chargeAuthChallenge
40
+ * @param {string} CHARGE_AUTH_INFO=chargeAuthInfo
41
+ * @param {string} ERROR=error
42
+ */
43
+ /**
44
+ * Class Canvas3ds include method for working on html
45
+ * @constructor
46
+ *
47
+ * @param {string} selector - Selector of html element. Container for widget
48
+ * @param {string} token - Pre authorized token
49
+ * @example
50
+ * var widget = new Canvas3ds('#widget', 'token');
51
+ *
52
+ *
53
+ */
54
+ class Canvas3ds {
55
+ /** @constructs */ // constructs added for correct parse classes jsdoc2md
56
+ constructor(selector, token) {
57
+ this.configs = [];
58
+ this.link = new Link(SECURE_3D);
59
+ this.token = Canvas3ds.extractToken(token);
60
+ this.link.setParams({ ref_id: this.token.charge_3ds_id });
61
+ this.container = new Container(selector);
62
+ this.iFrame = new IFrame(this.container);
63
+ this.eventEmitter = new EventEmitter();
64
+ this.standalone3dsService = new Standalone3dsService(this.container, this.eventEmitter);
65
+ this.event = new IFrameEvent(window);
66
+ }
67
+ static extractToken(token) {
68
+ return JSON.parse(window.atob(token));
69
+ }
70
+ /**
71
+ * The final method to beginning, the load process of widget to html
72
+ *
73
+ */
74
+ load() {
75
+ if (this.token.format === TOKEN_FORMAT.HTML)
76
+ this.iFrame.loadFromHtml(this.token.content, { title: '3d secure authentication' });
77
+ else if (this.token.format === TOKEN_FORMAT.URL)
78
+ this.iFrame.load(this.token.content, { title: '3d secure authentication' });
79
+ else if (this.token.format === TOKEN_FORMAT.STANDALONE_3DS)
80
+ this.standalone3dsService.load(this.token.content, { title: '3d secure authentication' });
81
+ else
82
+ console.error('Token contain unsupported payload');
83
+ }
84
+ /**
85
+ * Current method can change environment. By default environment = sandbox.
86
+ * Also we can change domain alias for this environment. By default domain_alias = paydock.com
87
+ *
88
+ * @example
89
+ * widget.setEnv('production');
90
+ * @param {string} env - sandbox, production
91
+ * @param {string} [alias] - Own domain alias
92
+ */
93
+ setEnv(env, alias) {
94
+ this.link.setEnv(env, alias);
95
+ this.standalone3dsService.setEnv(env, alias);
96
+ for (let index in this.configs) {
97
+ if (!this.configs.hasOwnProperty(index))
98
+ continue;
99
+ this.configs[index].setEnv(env, alias);
100
+ }
101
+ }
102
+ getEnv() {
103
+ return this.link.getEnv();
104
+ }
105
+ /**
106
+ * Listen to events of widget
107
+ *
108
+ * @example
109
+ *
110
+ * widget.on('chargeAuthReject', function (data) {
111
+ * console.log(data);
112
+ * });
113
+ * // or
114
+ * widget.on('chargeAuthReject').then(function (data) {
115
+ * console.log(data);
116
+ * });
117
+ * @param {string} eventName - Available event names [EVENT]{@link EVENT} [STANDALONE_3DS_EVENT]{@link STANDALONE_3DS_EVENT}
118
+ * @param {listener} [cb]
119
+ * @return {Promise<IEventData> | void}
120
+ */
121
+ on(eventName, cb) {
122
+ if (this.token.format === TOKEN_FORMAT.STANDALONE_3DS) {
123
+ if (typeof cb === 'function')
124
+ return this.eventEmitter.subscribe(eventName, cb);
125
+ return new Promise((resolve) => this.eventEmitter.subscribe(eventName, (res) => resolve(res)));
126
+ }
127
+ else {
128
+ if (typeof cb === 'function')
129
+ return this.event.on(eventName, this.link.getParams().ref_id, cb);
130
+ return new Promise((resolve) => this.event.on(eventName, this.link.getParams().ref_id, (res) => resolve(res)));
131
+ }
132
+ }
133
+ /**
134
+ * Using this method you can hide widget after load
135
+ * @param {boolean} [saveSize=false] - using this param you can save iframe's size
136
+ */
137
+ hide(saveSize) {
138
+ this.iFrame.hide(saveSize);
139
+ }
140
+ /**
141
+ * Using this method you can show widget after using hide method
142
+ *
143
+ */
144
+ show() {
145
+ this.iFrame.show();
146
+ }
147
+ /**
148
+ * Using this method you can reload widget
149
+ *
150
+ */
151
+ reload() {
152
+ this.iFrame.remove();
153
+ this.load();
154
+ }
155
+ }
156
+ export { Canvas3ds };
157
+ //# sourceMappingURL=../../src/lib/canvas-3ds/canvas-3ds.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"canvas-3ds.js","sourceRoot":"","sources":["../../canvas-3ds/canvas-3ds.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAc,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAErE,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAA;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD;;;;;;GAMG;AACH,IAAK,YAIJ;AAJD,WAAK,YAAY;IACb,6BAAa,CAAA;IACb,2BAAW,CAAA;IACX,iDAAiC,CAAA;AACrC,CAAC,EAJI,YAAY,KAAZ,YAAY,QAIhB;AAGD;;;;;;;;;;GAUG;AAEH;;;;;;;;;;;EAWE;AAEF;;;;;;;;;;GAUG;AACH,MAAM,SAAS;IAaX,kBAAkB,CAAC,sDAAsD;IACzE,YAAY,QAAgB,EAAE,KAAa;QAXjC,YAAO,GAAoB,EAAE,CAAC;QAYpC,IAAI,CAAC,IAAI,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC;QAChC,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC,YA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AAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,SAAS,EAAE,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;SAClH;IACL,CAAC;IAED;;;OAGG;IACI,IAAI,CAAC,QAAiB;QACzB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC/B,CAAC;IAED;;;OAGG;IACI,IAAI;QACP,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;IACvB,CAAC;IAGD;;;OAGG;IACI,MAAM;QACT,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;QACrB,IAAI,CAAC,IAAI,EAAE,CAAC;IAChB,CAAC;CACJ;AAED,OAAO,EAAE,SAAS,EAAE,CAAC"}
@@ -1,2 +1 @@
1
1
  export { Canvas3ds } from './canvas-3ds';
2
- //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,2 @@
1
+ export { Canvas3ds } from './canvas-3ds';
2
+ //# sourceMappingURL=../../src/lib/canvas-3ds/index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../canvas-3ds/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC"}
@@ -40,4 +40,3 @@ export declare class GPaymentsService {
40
40
  private doPolling;
41
41
  private performAuthentication;
42
42
  }
43
- //# sourceMappingURL=gpayments-service.d.ts.map