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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (492) hide show
  1. package/.nvmrc +1 -0
  2. package/README.md +827 -536
  3. package/api.d.ts +1 -0
  4. package/api.js +1 -0
  5. package/bundles/widget.umd.js +7068 -7120
  6. package/bundles/widget.umd.min.js +1 -2
  7. package/canvas3ds.d.ts +1 -0
  8. package/canvas3ds.js +1 -0
  9. package/checkout-button.d.ts +1 -0
  10. package/checkout-button.js +1 -0
  11. package/inicialization-guide.md +7 -0
  12. package/{bundles/types → lib}/api/api-base.d.ts +1 -2
  13. package/lib/api/api-base.js +101 -0
  14. package/lib/api/api-base.js.map +1 -0
  15. package/{bundles/types → lib}/api/api-charge-internal.d.ts +0 -1
  16. package/lib/api/api-charge-internal.js +30 -0
  17. package/lib/api/api-charge-internal.js.map +1 -0
  18. package/{bundles/types → lib}/api/api-charge.d.ts +0 -1
  19. package/lib/api/api-charge.js +49 -0
  20. package/lib/api/api-charge.js.map +1 -0
  21. package/{bundles/types → lib}/api/api-internal.d.ts +0 -1
  22. package/lib/api/api-internal.js +13 -0
  23. package/lib/api/api-internal.js.map +1 -0
  24. package/{bundles/types → lib}/api/api-service-internal.d.ts +2 -2
  25. package/lib/api/api-service-internal.js +19 -0
  26. package/lib/api/api-service-internal.js.map +1 -0
  27. package/{bundles/types → lib}/api/api.d.ts +1 -2
  28. package/lib/api/api.js +62 -0
  29. package/lib/api/api.js.map +1 -0
  30. package/lib/api/index.d.ts +1 -0
  31. package/lib/api/index.js +2 -0
  32. package/lib/api/index.js.map +1 -0
  33. package/{bundles/types → lib}/canvas-3ds/canvas-3ds.d.ts +1 -2
  34. package/lib/canvas-3ds/canvas-3ds.js +157 -0
  35. package/lib/canvas-3ds/canvas-3ds.js.map +1 -0
  36. package/{bundles/types → lib}/canvas-3ds/index.d.ts +0 -1
  37. package/lib/canvas-3ds/index.js +2 -0
  38. package/lib/canvas-3ds/index.js.map +1 -0
  39. package/{bundles/types → lib}/canvas-3ds/services/gpayments-service.d.ts +0 -1
  40. package/lib/canvas-3ds/services/gpayments-service.js +181 -0
  41. package/lib/canvas-3ds/services/gpayments-service.js.map +1 -0
  42. package/{bundles/types → lib}/canvas-3ds/services/index.d.ts +0 -1
  43. package/lib/canvas-3ds/services/index.js +2 -0
  44. package/lib/canvas-3ds/services/index.js.map +1 -0
  45. package/{bundles/types → lib}/canvas-3ds/services/standalone3ds-service.d.ts +0 -1
  46. package/lib/canvas-3ds/services/standalone3ds-service.js +32 -0
  47. package/lib/canvas-3ds/services/standalone3ds-service.js.map +1 -0
  48. package/{bundles/types → lib}/checkout-button/afterpay/afterpay-checkout-button.d.ts +1 -2
  49. package/lib/checkout-button/afterpay/afterpay-checkout-button.js +50 -0
  50. package/lib/checkout-button/afterpay/afterpay-checkout-button.js.map +1 -0
  51. package/{bundles/types → lib}/checkout-button/afterpay/afterpay.runner.d.ts +0 -1
  52. package/lib/checkout-button/afterpay/afterpay.runner.js +41 -0
  53. package/lib/checkout-button/afterpay/afterpay.runner.js.map +1 -0
  54. package/{bundles/types → lib}/checkout-button/checkout-button.d.ts +1 -2
  55. package/{bundles/types → lib}/checkout-button/checkout-button.interface.d.ts +0 -1
  56. package/lib/checkout-button/checkout-button.interface.js +45 -0
  57. package/lib/checkout-button/checkout-button.interface.js.map +1 -0
  58. package/lib/checkout-button/checkout-button.js +266 -0
  59. package/lib/checkout-button/checkout-button.js.map +1 -0
  60. package/{bundles/types → lib}/checkout-button/checkout-contextual-handler.d.ts +0 -1
  61. package/lib/checkout-button/checkout-contextual-handler.js +75 -0
  62. package/lib/checkout-button/checkout-contextual-handler.js.map +1 -0
  63. package/{bundles/types → lib}/checkout-button/index.d.ts +1 -2
  64. package/lib/checkout-button/index.js +85 -0
  65. package/lib/checkout-button/index.js.map +1 -0
  66. package/{bundles/types → lib}/checkout-button/paypal/paypal-checkout-button.d.ts +1 -2
  67. package/lib/checkout-button/paypal/paypal-checkout-button.js +25 -0
  68. package/lib/checkout-button/paypal/paypal-checkout-button.js.map +1 -0
  69. package/{bundles/types → lib}/checkout-button/paypal/paypal.runner.d.ts +0 -1
  70. package/lib/checkout-button/paypal/paypal.runner.js +14 -0
  71. package/lib/checkout-button/paypal/paypal.runner.js.map +1 -0
  72. package/{bundles/types → lib}/checkout-button/runner/base.runner.d.ts +3 -4
  73. package/lib/checkout-button/runner/base.runner.js +13 -0
  74. package/lib/checkout-button/runner/base.runner.js.map +1 -0
  75. package/{bundles/types → lib}/checkout-button/runner/contextual.runner.d.ts +1 -2
  76. package/lib/checkout-button/runner/contextual.runner.js +40 -0
  77. package/lib/checkout-button/runner/contextual.runner.js.map +1 -0
  78. package/{bundles/types → lib}/checkout-button/runner/index.d.ts +0 -1
  79. package/lib/checkout-button/runner/index.js +11 -0
  80. package/lib/checkout-button/runner/index.js.map +1 -0
  81. package/{bundles/types → lib}/checkout-button/runner/popup.runner.d.ts +1 -2
  82. package/lib/checkout-button/runner/popup.runner.js +68 -0
  83. package/lib/checkout-button/runner/popup.runner.js.map +1 -0
  84. package/{bundles/types → lib}/checkout-button/runner/redirect.runner.d.ts +1 -2
  85. package/lib/checkout-button/runner/redirect.runner.js +15 -0
  86. package/lib/checkout-button/runner/redirect.runner.js.map +1 -0
  87. package/{bundles/types → lib}/checkout-button/zipmoney/zipmoney-checkout-button.d.ts +1 -2
  88. package/lib/checkout-button/zipmoney/zipmoney-checkout-button.js +64 -0
  89. package/lib/checkout-button/zipmoney/zipmoney-checkout-button.js.map +1 -0
  90. package/{bundles/types → lib}/checkout-button/zipmoney/zipmoney-contextual.runner.d.ts +1 -2
  91. package/lib/checkout-button/zipmoney/zipmoney-contextual.runner.js +78 -0
  92. package/lib/checkout-button/zipmoney/zipmoney-contextual.runner.js.map +1 -0
  93. package/{bundles/types → lib}/checkout-button/zipmoney/zipmoney-redirect.runner.d.ts +1 -2
  94. package/lib/checkout-button/zipmoney/zipmoney-redirect.runner.js +49 -0
  95. package/lib/checkout-button/zipmoney/zipmoney-redirect.runner.js.map +1 -0
  96. package/{bundles/types → lib}/checkout-button/zipmoney/zipmoney.config.d.ts +0 -1
  97. package/lib/checkout-button/zipmoney/zipmoney.config.js +4 -0
  98. package/lib/checkout-button/zipmoney/zipmoney.config.js.map +1 -0
  99. package/{bundles/types → lib}/checkout-button/zipmoney/zipmoney.runner.d.ts +1 -2
  100. package/lib/checkout-button/zipmoney/zipmoney.runner.js +23 -0
  101. package/lib/checkout-button/zipmoney/zipmoney.runner.js.map +1 -0
  102. package/{bundles/types → lib}/checkout-button/zipmoney/zipmoney.types.d.ts +0 -1
  103. package/lib/checkout-button/zipmoney/zipmoney.types.js +1 -0
  104. package/lib/checkout-button/zipmoney/zipmoney.types.js.map +1 -0
  105. package/{bundles/types → lib}/components/ability-guard.d.ts +0 -1
  106. package/lib/components/ability-guard.js +44 -0
  107. package/lib/components/ability-guard.js.map +1 -0
  108. package/{bundles/types → lib}/components/background.d.ts +0 -1
  109. package/lib/components/background.js +193 -0
  110. package/lib/components/background.js.map +1 -0
  111. package/{bundles/types → lib}/components/container.d.ts +1 -1
  112. package/lib/components/container.js +63 -0
  113. package/lib/components/container.js.map +1 -0
  114. package/{bundles/types → lib}/components/dispatcher.d.ts +1 -2
  115. package/lib/components/dispatcher.js +39 -0
  116. package/lib/components/dispatcher.js.map +1 -0
  117. package/{bundles/types → lib}/components/element-style.d.ts +1 -2
  118. package/lib/components/element-style.js +52 -0
  119. package/lib/components/element-style.js.map +1 -0
  120. package/{bundles/types → lib}/components/flypay-iframe-event.d.ts +0 -1
  121. package/lib/components/flypay-iframe-event.js +28 -0
  122. package/lib/components/flypay-iframe-event.js.map +1 -0
  123. package/{bundles/types/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 +17 -13
  130. package/lib/components/iframe-event.js +77 -0
  131. package/lib/components/iframe-event.js.map +1 -0
  132. package/{bundles/types → lib}/components/iframe.d.ts +0 -1
  133. package/lib/components/iframe.js +62 -0
  134. package/lib/components/iframe.js.map +1 -0
  135. package/{bundles/types → lib}/components/link.d.ts +4 -4
  136. package/lib/components/link.js +60 -0
  137. package/lib/components/link.js.map +1 -0
  138. package/{bundles/types → lib}/components/loader.d.ts +0 -1
  139. package/lib/components/loader.js +234 -0
  140. package/lib/components/loader.js.map +1 -0
  141. package/{bundles/types → lib}/components/param.d.ts +11 -14
  142. package/lib/components/param.js +147 -0
  143. package/lib/components/param.js.map +1 -0
  144. package/{bundles/types → lib}/components/popup.d.ts +0 -1
  145. package/lib/components/popup.js +104 -0
  146. package/lib/components/popup.js.map +1 -0
  147. package/{bundles/types → lib}/components/storage-dispatcher.d.ts +0 -1
  148. package/lib/components/storage-dispatcher.js +75 -0
  149. package/lib/components/storage-dispatcher.js.map +1 -0
  150. package/{bundles/types → lib}/components/trigger.d.ts +0 -1
  151. package/lib/components/trigger.js +49 -0
  152. package/lib/components/trigger.js.map +1 -0
  153. package/{bundles/types → lib}/components/vault-display-iframe-event.d.ts +0 -1
  154. package/lib/components/vault-display-iframe-event.js +27 -0
  155. package/lib/components/vault-display-iframe-event.js.map +1 -0
  156. package/{bundles/types → lib}/components/wallet-background.d.ts +2 -2
  157. package/lib/components/wallet-background.js +75 -0
  158. package/lib/components/wallet-background.js.map +1 -0
  159. package/{bundles/types → lib}/components/wallet-trigger.d.ts +0 -1
  160. package/lib/components/wallet-trigger.js +27 -0
  161. package/lib/components/wallet-trigger.js.map +1 -0
  162. package/{bundles/types/configs/env/environment.paydock.d.ts → lib/configs/env/env.d.ts} +8 -5
  163. package/lib/configs/env/env.js +117 -0
  164. package/lib/configs/env/env.js.map +1 -0
  165. package/{bundles/types → lib}/configs/sdk.d.ts +2 -3
  166. package/lib/configs/sdk.js +16 -0
  167. package/lib/configs/sdk.js.map +1 -0
  168. package/lib/constants/validators.d.ts +44 -0
  169. package/lib/constants/validators.js +42 -0
  170. package/lib/constants/validators.js.map +1 -0
  171. package/{bundles/types → lib}/external-checkout/builder.d.ts +0 -1
  172. package/lib/external-checkout/builder.js +45 -0
  173. package/lib/external-checkout/builder.js.map +1 -0
  174. package/{bundles/types → lib}/external-checkout/checker.d.ts +0 -1
  175. package/lib/external-checkout/checker.js +22 -0
  176. package/lib/external-checkout/checker.js.map +1 -0
  177. package/lib/external-checkout/index.d.ts +2 -0
  178. package/lib/external-checkout/index.js +3 -0
  179. package/lib/external-checkout/index.js.map +1 -0
  180. package/{bundles/types → lib}/helper/access-token.d.ts +0 -1
  181. package/lib/helper/access-token.js +44 -0
  182. package/lib/helper/access-token.js.map +1 -0
  183. package/{bundles/types → lib}/helper/browser.d.ts +0 -1
  184. package/lib/helper/browser.js +79 -0
  185. package/lib/helper/browser.js.map +1 -0
  186. package/{bundles/types → lib}/helper/event-emitter.d.ts +0 -1
  187. package/lib/helper/event-emitter.js +23 -0
  188. package/lib/helper/event-emitter.js.map +1 -0
  189. package/{bundles/types → lib}/helper/event.d.ts +0 -1
  190. package/lib/helper/event.js +23 -0
  191. package/lib/helper/event.js.map +1 -0
  192. package/{bundles/types → lib}/helper/ms.d.ts +0 -1
  193. package/lib/helper/ms.js +32 -0
  194. package/lib/helper/ms.js.map +1 -0
  195. package/{bundles/types → lib}/helper/object.d.ts +0 -1
  196. package/lib/helper/object.js +6 -0
  197. package/lib/helper/object.js.map +1 -0
  198. package/{bundles/types → lib}/helper/url.d.ts +0 -1
  199. package/lib/helper/url.js +11 -0
  200. package/lib/helper/url.js.map +1 -0
  201. package/{bundles/types → lib}/helper/uuid.d.ts +0 -1
  202. package/lib/helper/uuid.js +26 -0
  203. package/lib/helper/uuid.js.map +1 -0
  204. package/lib/index.d.ts +15 -0
  205. package/lib/index.js +15 -0
  206. package/lib/index.js.map +1 -0
  207. package/{bundles/types → lib}/payment-source/builder.d.ts +0 -1
  208. package/lib/payment-source/builder.js +49 -0
  209. package/lib/payment-source/builder.js.map +1 -0
  210. package/{bundles/types → lib}/payment-source/index.d.ts +0 -1
  211. package/lib/payment-source/index.js +2 -0
  212. package/lib/payment-source/index.js.map +1 -0
  213. package/{bundles/types → lib}/payment-source-widget/html-payment-source-widget.d.ts +17 -14
  214. package/lib/payment-source-widget/html-payment-source-widget.js +172 -0
  215. package/lib/payment-source-widget/html-payment-source-widget.js.map +1 -0
  216. package/{bundles/types → lib}/payment-source-widget/index.d.ts +0 -1
  217. package/lib/payment-source-widget/index.js +35 -0
  218. package/lib/payment-source-widget/index.js.map +1 -0
  219. package/{bundles/types → lib}/payment-source-widget/interfaces.d.ts +0 -1
  220. package/lib/payment-source-widget/interfaces.js +2 -0
  221. package/lib/payment-source-widget/interfaces.js.map +1 -0
  222. package/{bundles/types → lib}/payment-source-widget/payment-source-widget.d.ts +1 -2
  223. package/lib/payment-source-widget/payment-source-widget.js +142 -0
  224. package/lib/payment-source-widget/payment-source-widget.js.map +1 -0
  225. package/lib/secure-remote-commerce/index.d.ts +102 -0
  226. package/lib/secure-remote-commerce/index.js +103 -0
  227. package/lib/secure-remote-commerce/index.js.map +1 -0
  228. package/lib/secure-remote-commerce/interfaces.d.ts +148 -0
  229. package/lib/secure-remote-commerce/interfaces.js +48 -0
  230. package/lib/secure-remote-commerce/interfaces.js.map +1 -0
  231. package/lib/secure-remote-commerce/mastercard-secure-remote-commerce.d.ts +30 -0
  232. package/lib/secure-remote-commerce/mastercard-secure-remote-commerce.js +40 -0
  233. package/lib/secure-remote-commerce/mastercard-secure-remote-commerce.js.map +1 -0
  234. package/lib/secure-remote-commerce/providers/mastercard-src/index.d.ts +1 -0
  235. package/lib/secure-remote-commerce/providers/mastercard-src/index.js +2 -0
  236. package/lib/secure-remote-commerce/providers/mastercard-src/index.js.map +1 -0
  237. package/{bundles/types/secure-remote-commerce/providers/visa-src/visa-src.d.ts → lib/secure-remote-commerce/providers/mastercard-src/mastercard-src.d.ts} +4 -8
  238. package/lib/secure-remote-commerce/providers/mastercard-src/mastercard-src.js +89 -0
  239. package/lib/secure-remote-commerce/providers/mastercard-src/mastercard-src.js.map +1 -0
  240. package/{bundles/types → lib}/secure-remote-commerce/providers/src-provider.d.ts +0 -1
  241. package/lib/secure-remote-commerce/providers/src-provider.js +1 -0
  242. package/lib/secure-remote-commerce/providers/src-provider.js.map +1 -0
  243. package/lib/secure-remote-commerce/secure-remote-commerce.d.ts +85 -0
  244. package/lib/secure-remote-commerce/secure-remote-commerce.js +155 -0
  245. package/lib/secure-remote-commerce/secure-remote-commerce.js.map +1 -0
  246. package/{bundles/types → lib}/vault-display-widget/index.d.ts +0 -1
  247. package/lib/vault-display-widget/index.js +14 -0
  248. package/lib/vault-display-widget/index.js.map +1 -0
  249. package/{bundles/types → lib}/vault-display-widget/vault-display-widget.d.ts +1 -2
  250. package/lib/vault-display-widget/vault-display-widget.js +99 -0
  251. package/lib/vault-display-widget/vault-display-widget.js.map +1 -0
  252. package/{bundles/types → lib}/wallet-buttons/afterpay.wallet-service.d.ts +0 -1
  253. package/lib/wallet-buttons/afterpay.wallet-service.js +152 -0
  254. package/lib/wallet-buttons/afterpay.wallet-service.js.map +1 -0
  255. package/{bundles/types → lib}/wallet-buttons/apple.wallet-service.d.ts +2 -1
  256. package/lib/wallet-buttons/apple.wallet-service.js +324 -0
  257. package/lib/wallet-buttons/apple.wallet-service.js.map +1 -0
  258. package/{bundles/types → lib}/wallet-buttons/flypay-v2.wallet-service.d.ts +8 -2
  259. package/lib/wallet-buttons/flypay-v2.wallet-service.js +163 -0
  260. package/lib/wallet-buttons/flypay-v2.wallet-service.js.map +1 -0
  261. package/{bundles/types → lib}/wallet-buttons/flypay.wallet-service.d.ts +0 -1
  262. package/lib/wallet-buttons/flypay.wallet-service.js +117 -0
  263. package/lib/wallet-buttons/flypay.wallet-service.js.map +1 -0
  264. package/{bundles/types → lib}/wallet-buttons/google.wallet-service.d.ts +3 -1
  265. package/lib/wallet-buttons/google.wallet-service.js +301 -0
  266. package/lib/wallet-buttons/google.wallet-service.js.map +1 -0
  267. package/lib/wallet-buttons/helpers/flypay-v2.helper.d.ts +3 -0
  268. package/lib/wallet-buttons/helpers/flypay-v2.helper.js +151 -0
  269. package/lib/wallet-buttons/helpers/flypay-v2.helper.js.map +1 -0
  270. package/lib/wallet-buttons/index.d.ts +127 -0
  271. package/lib/wallet-buttons/index.js +128 -0
  272. package/lib/wallet-buttons/index.js.map +1 -0
  273. package/{bundles/types → lib}/wallet-buttons/interfaces.d.ts +3 -1
  274. package/lib/wallet-buttons/interfaces.js +1 -0
  275. package/lib/wallet-buttons/interfaces.js.map +1 -0
  276. package/{bundles/types → lib}/wallet-buttons/mastercard.wallet-service.d.ts +0 -1
  277. package/lib/wallet-buttons/mastercard.wallet-service.js +27 -0
  278. package/lib/wallet-buttons/mastercard.wallet-service.js.map +1 -0
  279. package/{bundles/types → lib}/wallet-buttons/paypal.wallet-service.d.ts +0 -1
  280. package/lib/wallet-buttons/paypal.wallet-service.js +144 -0
  281. package/lib/wallet-buttons/paypal.wallet-service.js.map +1 -0
  282. package/{bundles/types → lib}/wallet-buttons/stripe.wallet-service.d.ts +0 -1
  283. package/lib/wallet-buttons/stripe.wallet-service.js +100 -0
  284. package/lib/wallet-buttons/stripe.wallet-service.js.map +1 -0
  285. package/{bundles/types/wallet-buttons/wallet-cba-buttons.d.ts → lib/wallet-buttons/wallet-buttons.d.ts} +92 -115
  286. package/lib/wallet-buttons/wallet-buttons.js +479 -0
  287. package/lib/wallet-buttons/wallet-buttons.js.map +1 -0
  288. package/{bundles/types → lib}/wallet-buttons/wallet-service.d.ts +7 -1
  289. package/lib/wallet-buttons/wallet-service.js +60 -0
  290. package/lib/wallet-buttons/wallet-service.js.map +1 -0
  291. package/{bundles/types → lib}/widget/configuration.d.ts +2 -3
  292. package/lib/widget/configuration.js +260 -0
  293. package/lib/widget/configuration.js.map +1 -0
  294. package/lib/widget/html-multi-widget.d.ts +336 -0
  295. package/lib/widget/html-multi-widget.js +422 -0
  296. package/lib/widget/html-multi-widget.js.map +1 -0
  297. package/{bundles/types → lib}/widget/html-widget.d.ts +1 -2
  298. package/lib/widget/html-widget.js +127 -0
  299. package/lib/widget/html-widget.js.map +1 -0
  300. package/{bundles/types → lib}/widget/index.d.ts +1 -2
  301. package/lib/widget/index.js +132 -0
  302. package/lib/widget/index.js.map +1 -0
  303. package/{bundles/types → lib}/widget/meta.d.ts +0 -1
  304. package/lib/widget/meta.js +8 -0
  305. package/lib/widget/meta.js.map +1 -0
  306. package/{bundles/types → lib}/widget/multi-widget.d.ts +1 -2
  307. package/lib/widget/multi-widget.js +437 -0
  308. package/lib/widget/multi-widget.js.map +1 -0
  309. package/{bundles/types → lib}/widget/style.d.ts +0 -1
  310. package/lib/widget/style.js +204 -0
  311. package/lib/widget/style.js.map +1 -0
  312. package/package.json +42 -164
  313. package/payment-source-widget.d.ts +1 -0
  314. package/payment-source-widget.js +1 -0
  315. package/slate.md +205 -238
  316. package/tslint.json +129 -0
  317. package/typings/globals/jasmine/index.d.ts +576 -0
  318. package/typings/globals/jasmine-ajax/index.d.ts +83 -0
  319. package/typings/globals/jquery/index.d.ts +3759 -0
  320. package/typings/index.d.ts +3 -0
  321. package/vault-display-widget.d.ts +1 -0
  322. package/vault-display-widget.js +1 -0
  323. package/vendors/zipmoney.d.ts +18 -0
  324. package/vendors/zipmoney.js +1 -0
  325. package/widget.d.ts +1 -0
  326. package/widget.js +1 -0
  327. package/bundles/index.cjs +0 -10674
  328. package/bundles/index.cjs.d.ts +0 -3163
  329. package/bundles/index.cjs.map +0 -1
  330. package/bundles/index.mjs +0 -10642
  331. package/bundles/index.mjs.d.ts +0 -3163
  332. package/bundles/index.mjs.map +0 -1
  333. package/bundles/types/api/api-base.d.ts.map +0 -1
  334. package/bundles/types/api/api-charge-internal.d.ts.map +0 -1
  335. package/bundles/types/api/api-charge.d.ts.map +0 -1
  336. package/bundles/types/api/api-internal.d.ts.map +0 -1
  337. package/bundles/types/api/api-service-internal.d.ts.map +0 -1
  338. package/bundles/types/api/api.d.ts.map +0 -1
  339. package/bundles/types/api/index.d.ts +0 -2
  340. package/bundles/types/api/index.d.ts.map +0 -1
  341. package/bundles/types/canvas-3ds/canvas-3ds.d.ts.map +0 -1
  342. package/bundles/types/canvas-3ds/index.d.ts.map +0 -1
  343. package/bundles/types/canvas-3ds/services/gpayments-service.d.ts.map +0 -1
  344. package/bundles/types/canvas-3ds/services/index.d.ts.map +0 -1
  345. package/bundles/types/canvas-3ds/services/standalone3ds-service.d.ts.map +0 -1
  346. package/bundles/types/checkout-button/afterpay/afterpay-checkout-button.d.ts.map +0 -1
  347. package/bundles/types/checkout-button/afterpay/afterpay.runner.d.ts.map +0 -1
  348. package/bundles/types/checkout-button/checkout-button.d.ts.map +0 -1
  349. package/bundles/types/checkout-button/checkout-button.interface.d.ts.map +0 -1
  350. package/bundles/types/checkout-button/checkout-contextual-handler.d.ts.map +0 -1
  351. package/bundles/types/checkout-button/index.d.ts.map +0 -1
  352. package/bundles/types/checkout-button/paypal/paypal-checkout-button.d.ts.map +0 -1
  353. package/bundles/types/checkout-button/paypal/paypal.runner.d.ts.map +0 -1
  354. package/bundles/types/checkout-button/runner/base.runner.d.ts.map +0 -1
  355. package/bundles/types/checkout-button/runner/contextual.runner.d.ts.map +0 -1
  356. package/bundles/types/checkout-button/runner/index.d.ts.map +0 -1
  357. package/bundles/types/checkout-button/runner/popup.runner.d.ts.map +0 -1
  358. package/bundles/types/checkout-button/runner/redirect.runner.d.ts.map +0 -1
  359. package/bundles/types/checkout-button/zipmoney/index.d.ts +0 -4
  360. package/bundles/types/checkout-button/zipmoney/index.d.ts.map +0 -1
  361. package/bundles/types/checkout-button/zipmoney/zipmoney-checkout-button.d.ts.map +0 -1
  362. package/bundles/types/checkout-button/zipmoney/zipmoney-contextual.runner.d.ts.map +0 -1
  363. package/bundles/types/checkout-button/zipmoney/zipmoney-redirect.runner.d.ts.map +0 -1
  364. package/bundles/types/checkout-button/zipmoney/zipmoney.config.d.ts.map +0 -1
  365. package/bundles/types/checkout-button/zipmoney/zipmoney.runner.d.ts.map +0 -1
  366. package/bundles/types/checkout-button/zipmoney/zipmoney.types.d.ts.map +0 -1
  367. package/bundles/types/components/ability-guard.d.ts.map +0 -1
  368. package/bundles/types/components/background.d.ts.map +0 -1
  369. package/bundles/types/components/container.d.ts.map +0 -1
  370. package/bundles/types/components/dispatcher.d.ts.map +0 -1
  371. package/bundles/types/components/element-style.d.ts.map +0 -1
  372. package/bundles/types/components/flypay-iframe-event.d.ts.map +0 -1
  373. package/bundles/types/components/form-interceptor.d.ts.map +0 -1
  374. package/bundles/types/components/http-core.d.ts.map +0 -1
  375. package/bundles/types/components/iframe-event.d.ts.map +0 -1
  376. package/bundles/types/components/iframe.d.ts.map +0 -1
  377. package/bundles/types/components/link.d.ts.map +0 -1
  378. package/bundles/types/components/loader.d.ts.map +0 -1
  379. package/bundles/types/components/param.d.ts.map +0 -1
  380. package/bundles/types/components/popup.d.ts.map +0 -1
  381. package/bundles/types/components/storage-dispatcher.d.ts.map +0 -1
  382. package/bundles/types/components/trigger.d.ts.map +0 -1
  383. package/bundles/types/components/vault-display-iframe-event.d.ts.map +0 -1
  384. package/bundles/types/components/wallet-background.d.ts.map +0 -1
  385. package/bundles/types/components/wallet-trigger.d.ts.map +0 -1
  386. package/bundles/types/configs/env/environment.cba.d.ts +0 -29
  387. package/bundles/types/configs/env/environment.cba.d.ts.map +0 -1
  388. package/bundles/types/configs/env/environment.interface.d.ts +0 -12
  389. package/bundles/types/configs/env/environment.interface.d.ts.map +0 -1
  390. package/bundles/types/configs/env/environment.paydock.d.ts.map +0 -1
  391. package/bundles/types/configs/env/index.d.ts +0 -3
  392. package/bundles/types/configs/env/index.d.ts.map +0 -1
  393. package/bundles/types/configs/sdk.d.ts.map +0 -1
  394. package/bundles/types/external-checkout/builder.d.ts.map +0 -1
  395. package/bundles/types/external-checkout/checker.d.ts.map +0 -1
  396. package/bundles/types/external-checkout/index.d.ts +0 -3
  397. package/bundles/types/external-checkout/index.d.ts.map +0 -1
  398. package/bundles/types/helper/access-token.d.ts.map +0 -1
  399. package/bundles/types/helper/browser.d.ts.map +0 -1
  400. package/bundles/types/helper/event-emitter.d.ts.map +0 -1
  401. package/bundles/types/helper/event.d.ts.map +0 -1
  402. package/bundles/types/helper/ms.d.ts.map +0 -1
  403. package/bundles/types/helper/object.d.ts.map +0 -1
  404. package/bundles/types/helper/url.d.ts.map +0 -1
  405. package/bundles/types/helper/uuid.d.ts.map +0 -1
  406. package/bundles/types/index-cba.d.ts +0 -13
  407. package/bundles/types/index-cba.d.ts.map +0 -1
  408. package/bundles/types/index.d.ts +0 -14
  409. package/bundles/types/index.d.ts.map +0 -1
  410. package/bundles/types/payment-source/builder.d.ts.map +0 -1
  411. package/bundles/types/payment-source/index.d.ts.map +0 -1
  412. package/bundles/types/payment-source-widget/html-payment-source-widget.d.ts.map +0 -1
  413. package/bundles/types/payment-source-widget/index.d.ts.map +0 -1
  414. package/bundles/types/payment-source-widget/interfaces.d.ts.map +0 -1
  415. package/bundles/types/payment-source-widget/payment-source-widget.d.ts.map +0 -1
  416. package/bundles/types/secure-remote-commerce/index.d.ts +0 -2
  417. package/bundles/types/secure-remote-commerce/index.d.ts.map +0 -1
  418. package/bundles/types/secure-remote-commerce/interfaces.d.ts +0 -72
  419. package/bundles/types/secure-remote-commerce/interfaces.d.ts.map +0 -1
  420. package/bundles/types/secure-remote-commerce/providers/src-provider.d.ts.map +0 -1
  421. package/bundles/types/secure-remote-commerce/providers/visa-src/helper.d.ts +0 -8
  422. package/bundles/types/secure-remote-commerce/providers/visa-src/helper.d.ts.map +0 -1
  423. package/bundles/types/secure-remote-commerce/providers/visa-src/index.d.ts +0 -2
  424. package/bundles/types/secure-remote-commerce/providers/visa-src/index.d.ts.map +0 -1
  425. package/bundles/types/secure-remote-commerce/providers/visa-src/visa-src.d.ts.map +0 -1
  426. package/bundles/types/secure-remote-commerce/providers/visa-src/visa-src.styles.d.ts +0 -9
  427. package/bundles/types/secure-remote-commerce/providers/visa-src/visa-src.styles.d.ts.map +0 -1
  428. package/bundles/types/secure-remote-commerce/secure-remote-commerce.d.ts +0 -164
  429. package/bundles/types/secure-remote-commerce/secure-remote-commerce.d.ts.map +0 -1
  430. package/bundles/types/vault-display-widget/index.d.ts.map +0 -1
  431. package/bundles/types/vault-display-widget/vault-display-widget.d.ts.map +0 -1
  432. package/bundles/types/wallet-buttons/afterpay.wallet-service.d.ts.map +0 -1
  433. package/bundles/types/wallet-buttons/apple.wallet-service.d.ts.map +0 -1
  434. package/bundles/types/wallet-buttons/flypay-v2.wallet-service.d.ts.map +0 -1
  435. package/bundles/types/wallet-buttons/flypay.wallet-service.d.ts.map +0 -1
  436. package/bundles/types/wallet-buttons/google.wallet-service.d.ts.map +0 -1
  437. package/bundles/types/wallet-buttons/index-cba.d.ts +0 -2
  438. package/bundles/types/wallet-buttons/index-cba.d.ts.map +0 -1
  439. package/bundles/types/wallet-buttons/index.d.ts +0 -2
  440. package/bundles/types/wallet-buttons/index.d.ts.map +0 -1
  441. package/bundles/types/wallet-buttons/interfaces.d.ts.map +0 -1
  442. package/bundles/types/wallet-buttons/mastercard.wallet-service.d.ts.map +0 -1
  443. package/bundles/types/wallet-buttons/paypal.wallet-service.d.ts.map +0 -1
  444. package/bundles/types/wallet-buttons/stripe.wallet-service.d.ts.map +0 -1
  445. package/bundles/types/wallet-buttons/wallet-buttons.d.ts +0 -366
  446. package/bundles/types/wallet-buttons/wallet-buttons.d.ts.map +0 -1
  447. package/bundles/types/wallet-buttons/wallet-cba-buttons.d.ts.map +0 -1
  448. package/bundles/types/wallet-buttons/wallet-service.d.ts.map +0 -1
  449. package/bundles/types/widget/configuration.d.ts.map +0 -1
  450. package/bundles/types/widget/html-multi-widget.d.ts +0 -266
  451. package/bundles/types/widget/html-multi-widget.d.ts.map +0 -1
  452. package/bundles/types/widget/html-widget.d.ts.map +0 -1
  453. package/bundles/types/widget/index.d.ts.map +0 -1
  454. package/bundles/types/widget/meta.d.ts.map +0 -1
  455. package/bundles/types/widget/multi-widget.d.ts.map +0 -1
  456. package/bundles/types/widget/style.d.ts.map +0 -1
  457. package/bundles/widget.umd.js.d.ts +0 -3163
  458. package/bundles/widget.umd.js.map +0 -1
  459. package/bundles/widget.umd.js.min.d.ts +0 -3163
  460. package/bundles/widget.umd.min.js.map +0 -1
  461. package/docs/api-canvas3ds.md +0 -158
  462. package/docs/api-checkout-button.md +0 -912
  463. package/docs/api-examples.md +0 -65
  464. package/docs/api-ps-widget.md +0 -585
  465. package/docs/api-vault-display.md +0 -94
  466. package/docs/api-widget.md +0 -2444
  467. package/docs/api-wrapper.md +0 -78
  468. package/docs/canvas3ds-examples.md +0 -242
  469. package/docs/cba-header.md +0 -13
  470. package/docs/cba-license.md +0 -2
  471. package/docs/checkout-examples.md +0 -248
  472. package/docs/header.md +0 -15
  473. package/docs/html/layout.html +0 -78
  474. package/docs/html/marked.js +0 -23
  475. package/docs/html/style.css +0 -365
  476. package/docs/install/npm.content.md +0 -16
  477. package/docs/install/npm.example.md +0 -24
  478. package/docs/install/umd.content.md +0 -20
  479. package/docs/install/umd.example.md +0 -6
  480. package/docs/install.md +0 -43
  481. package/docs/install.readme.t.md +0 -17
  482. package/docs/install.slate.t.md +0 -17
  483. package/docs/license.md +0 -2
  484. package/docs/partials/header.hbs +0 -3
  485. package/docs/ps-examples.md +0 -129
  486. package/docs/secure-remote-commerce-examples.md +0 -258
  487. package/docs/secure-remote-commerce.md +0 -265
  488. package/docs/vault-display-example.md +0 -132
  489. package/docs/wallet-buttons-examples.md +0 -580
  490. package/docs/wallet-buttons.md +0 -424
  491. package/docs/wallet-cba-buttons-examples.md +0 -388
  492. package/docs/widget-examples.md +0 -134
@@ -0,0 +1,102 @@
1
+ export { MastercardSRCClickToPay } from './mastercard-secure-remote-commerce';
2
+ /**
3
+ * Interface of data used for the Mastercard Checkout. For further information refer to [the documentation](https://developer.mastercard.com/unified-checkout-solutions/documentation/sdk-reference/init).
4
+ * @interface IMastercardSRCMeta
5
+ *
6
+ * @type {object}
7
+ * @param {boolean} [disable_summary_screen] Boolean flag that controls if a final summary screen is presented in the checkout flow.
8
+ * @param {object} [dpa_data] Object where the DPA creation data is stored.
9
+ * @param {string} [dpa_data.dpa_presentation_name] Name in which the DPA is presented.
10
+ * @param {string} [dpa_data.dpa_uri] Used for indicating the DPA URI.
11
+ * @param {string} [dpa_data.dpa_address] Address associated with the DPA.
12
+ * @param {string} [dpa_data.dpa_email_address] Email address for DPA communication.
13
+ * @param {object} [dpa_data.dpa_phone_number] Phone number structure for DPA communication.
14
+ * @param {string} [dpa_data.dpa_phone_number.country_code] The country code of the phone number.
15
+ * @param {string} [dpa_data.dpa_phone_number.phone_number] The phone number part of the phone number.
16
+ * @param {string} [dpa_data.dpa_logo_uri] URI for the DPA logo.
17
+ * @param {string} [dpa_data.dpa_supported_email_address] Supported email address for DPA support.
18
+ * @param {object} [dpa_data.dpa_supported_phone_number] Supported phone number for DPA support.
19
+ * @param {string} [dpa_data.dpa_supported_phone_number.country_code] The country code of the phone number.
20
+ * @param {string} [dpa_data.dpa_supported_phone_number.phone_number] The phone number part of the phone number.
21
+ * @param {string} [dpa_data.dpa_support_uri] URI for DPA support.
22
+ * @param {string} [dpa_data.application_type] Application type, either 'WEB_BROWSER' or 'MOBILE_APP'.
23
+ * @param {string[]} [co_brand_names] List of co-brand names associated with the SRC experience.
24
+ * @param {string} [checkout_experience] Checkout experience type, either 'WITHIN_CHECKOUT' or 'PAYMENT_SETTINGS'.
25
+ * @param {string} [services] Services offered, such as 'INLINE_CHECKOUT' or 'INLINE_INSTALLMENTS'.
26
+ * @param {object} [dpa_transaction_options] Object that stores options for creating a transaction with DPA.
27
+ * @param {string} [dpa_transaction_options.dpa_locale] DPA’s preferred locale, example en_US.
28
+ * @param {string[]} [dpa_transaction_options.dpa_accepted_billing_countries] List of accepted billing countries for DPA in ISO 3166-1 alpha-2 format.
29
+ * @param {string} [dpa_transaction_options.dpa_billing_preference] Billing preferences for DPA, options are 'FULL', 'POSTAL_COUNTRY', 'NONE'.
30
+ * @param {object[]} [dpa_transaction_options.payment_options] Payment options included in the transaction.
31
+ * @param {string} [dpa_transaction_options.payment_options.dynamic_data_type] Dynamic data types.
32
+ * @param {string} [dpa_transaction_options.order_type] Type of the order, options are 'SPLIT_SHIPMENT', 'PREFERRED_CARD'.
33
+ * @param {string} [dpa_transaction_options.three_ds_preference] Preference for 3DS usage in the transaction.
34
+ * @param {boolean} [dpa_transaction_options.confirm_payment] Indicates if payment confirmation is required.
35
+ * @param {boolean} [dpa_transaction_options.consumer_name_requested] Indicates if consumer name is requested.
36
+ * @param {boolean} [dpa_transaction_options.consumer_email_address_requested] Indicates if consumer email address is requested.
37
+ * @param {boolean} [dpa_transaction_options.consumer_phone_number_requested] Indicates if consumer phone number is requested.
38
+ * @param {object} [dpa_transaction_options.transaction_amount] Details of the transaction amount.
39
+ * @param {number} [dpa_transaction_options.transaction_amount.transaction_amount] Amount of the transaction.
40
+ * @param {string} [dpa_transaction_options.transaction_amount.transaction_currency_code] Currency code of the transaction in 3 letter ISO code format.
41
+ * @param {string} [dpa_transaction_options.merchant_order_id] Merchant's order ID.
42
+ * @param {string} [dpa_transaction_options.merchant_category_code] Merchant's category code.
43
+ * @param {string} [dpa_transaction_options.merchant_country_code] Merchant's country code in ISO 3166-1 alpha-2 format.
44
+ * @param {object} [customer] Object where the customer data is stored to prefill in the checkout.
45
+ * @param {string} [customer.email] Customer email.
46
+ * @param {string} [customer.first_name] Customer first name.
47
+ * @param {string} [customer.last_name] Customer last name.
48
+ * @param {object} [customer.phone] Object where the customer phone is stored.
49
+ * @param {string} [customer.phone.country_code] Customer phone country code (example "1" for US). // TODO: Confirm if it can be removed!
50
+ * @param {string} [customer.phone.phone] Customer phone number.
51
+ * @param {string} [unaccepted_card_type] Used to block a specific card type. Options are 'CREDIT', 'DEBIT'.
52
+ */
53
+ /**
54
+ * Interface for data returned in callbacks
55
+ * @interface EventData
56
+ *
57
+ * @type {object}
58
+ * @param {EVENT_DATA_TYPE} type Event type of type [EVENT_DATA_TYPE]{@link EVENT_DATA_TYPE}
59
+ * @param {string | EventDataCheckoutCompletedData} data optional data returning a string for checkoutError event or [EventDataCheckoutCompletedData]{@link EventDataCheckoutCompletedData} for checkoutCompleted
60
+ */
61
+ /**
62
+ * Event data returned for checkoutCompleted callback, holding the One Time Token and the flow type completed.
63
+ * When the flow type is src, masked checkoutData available is also returned
64
+ *
65
+ * @interface EventDataCheckoutCompletedData
66
+ *
67
+ * @type {object}
68
+ * @param {string} type type of the checkout, can be `src` or `manual`.
69
+ * @param {string} token one time token value.
70
+ * @param {object} [checkoutData] Optional checkout data related to the checkout information. Only available on src flow.
71
+ * @param {string} [checkoutData.card_number_bin] The BIN of the card used for the transaction.
72
+ * @param {string} [checkoutData.card_number_last4] The last four digits of the card number.
73
+ * @param {string} [checkoutData.card_scheme] The card scheme. Values: visa, mastercard, amex, diners, discover.
74
+ * @param {string} [checkoutData.card_type] The type of card. Values: credit, debit, prepaid, combo, flex.
75
+ * @param {string} [checkoutData.address_line1] Address line 1 for billing address.
76
+ * @param {string} [checkoutData.address_line2] Address line 2 for billing address.
77
+ * @param {string} [checkoutData.address_line3] Address line 3 for billing address.
78
+ * @param {string} [checkoutData.address_city] City for billing address.
79
+ * @param {string} [checkoutData.address_postcode] Postal code for billing address.
80
+ * @param {string} [checkoutData.address_state] State or province for billing address.
81
+ * @param {string} [checkoutData.address_country] Country for billing address.
82
+ * @param {object} [checkoutData.shipping] Optional shipping information.
83
+ * @param {string} [checkoutData.shipping.address_line1] Address line 1 for shipping address.
84
+ * @param {string} [checkoutData.shipping.address_line2] Address line 2 for shipping address.
85
+ * @param {string} [checkoutData.shipping.address_line3] Address line 3 for shipping address.
86
+ * @param {string} [checkoutData.shipping.address_city] City for shipping address.
87
+ * @param {string} [checkoutData.shipping.address_postcode] Postal code for shipping address.
88
+ * @param {string} [checkoutData.shipping.address_state] State or province for shipping address.
89
+ * @param {string} [checkoutData.shipping.address_country] Country for shipping address.
90
+ */
91
+ /**
92
+ * Interface for style configs inyected to the SRC checkout
93
+ * @interface IStyles
94
+ *
95
+ * @type {object}
96
+ * @param {string} [primary_button_color] Color Code for primary button.
97
+ * @param {string} [primary_button_text_color] Color Code for primary button text.
98
+ * @param {string} [secondary_button_color] Color Code for secondary button.
99
+ * @param {string} [secondary_button_text_color] Color Code for secondary button text.
100
+ * @param {string} [font_family] Font family to be used.
101
+ * @param {boolean} [enable_src_popup] Boolean flag to make the SRC checkout show in a popup window instead of embedded in iframe.
102
+ */
@@ -0,0 +1,103 @@
1
+ export { MastercardSRCClickToPay } from './mastercard-secure-remote-commerce';
2
+ /**
3
+ * Interface of data used for the Mastercard Checkout. For further information refer to [the documentation](https://developer.mastercard.com/unified-checkout-solutions/documentation/sdk-reference/init).
4
+ * @interface IMastercardSRCMeta
5
+ *
6
+ * @type {object}
7
+ * @param {boolean} [disable_summary_screen] Boolean flag that controls if a final summary screen is presented in the checkout flow.
8
+ * @param {object} [dpa_data] Object where the DPA creation data is stored.
9
+ * @param {string} [dpa_data.dpa_presentation_name] Name in which the DPA is presented.
10
+ * @param {string} [dpa_data.dpa_uri] Used for indicating the DPA URI.
11
+ * @param {string} [dpa_data.dpa_address] Address associated with the DPA.
12
+ * @param {string} [dpa_data.dpa_email_address] Email address for DPA communication.
13
+ * @param {object} [dpa_data.dpa_phone_number] Phone number structure for DPA communication.
14
+ * @param {string} [dpa_data.dpa_phone_number.country_code] The country code of the phone number.
15
+ * @param {string} [dpa_data.dpa_phone_number.phone_number] The phone number part of the phone number.
16
+ * @param {string} [dpa_data.dpa_logo_uri] URI for the DPA logo.
17
+ * @param {string} [dpa_data.dpa_supported_email_address] Supported email address for DPA support.
18
+ * @param {object} [dpa_data.dpa_supported_phone_number] Supported phone number for DPA support.
19
+ * @param {string} [dpa_data.dpa_supported_phone_number.country_code] The country code of the phone number.
20
+ * @param {string} [dpa_data.dpa_supported_phone_number.phone_number] The phone number part of the phone number.
21
+ * @param {string} [dpa_data.dpa_support_uri] URI for DPA support.
22
+ * @param {string} [dpa_data.application_type] Application type, either 'WEB_BROWSER' or 'MOBILE_APP'.
23
+ * @param {string[]} [co_brand_names] List of co-brand names associated with the SRC experience.
24
+ * @param {string} [checkout_experience] Checkout experience type, either 'WITHIN_CHECKOUT' or 'PAYMENT_SETTINGS'.
25
+ * @param {string} [services] Services offered, such as 'INLINE_CHECKOUT' or 'INLINE_INSTALLMENTS'.
26
+ * @param {object} [dpa_transaction_options] Object that stores options for creating a transaction with DPA.
27
+ * @param {string} [dpa_transaction_options.dpa_locale] DPA’s preferred locale, example en_US.
28
+ * @param {string[]} [dpa_transaction_options.dpa_accepted_billing_countries] List of accepted billing countries for DPA in ISO 3166-1 alpha-2 format.
29
+ * @param {string} [dpa_transaction_options.dpa_billing_preference] Billing preferences for DPA, options are 'FULL', 'POSTAL_COUNTRY', 'NONE'.
30
+ * @param {object[]} [dpa_transaction_options.payment_options] Payment options included in the transaction.
31
+ * @param {string} [dpa_transaction_options.payment_options.dynamic_data_type] Dynamic data types.
32
+ * @param {string} [dpa_transaction_options.order_type] Type of the order, options are 'SPLIT_SHIPMENT', 'PREFERRED_CARD'.
33
+ * @param {string} [dpa_transaction_options.three_ds_preference] Preference for 3DS usage in the transaction.
34
+ * @param {boolean} [dpa_transaction_options.confirm_payment] Indicates if payment confirmation is required.
35
+ * @param {boolean} [dpa_transaction_options.consumer_name_requested] Indicates if consumer name is requested.
36
+ * @param {boolean} [dpa_transaction_options.consumer_email_address_requested] Indicates if consumer email address is requested.
37
+ * @param {boolean} [dpa_transaction_options.consumer_phone_number_requested] Indicates if consumer phone number is requested.
38
+ * @param {object} [dpa_transaction_options.transaction_amount] Details of the transaction amount.
39
+ * @param {number} [dpa_transaction_options.transaction_amount.transaction_amount] Amount of the transaction.
40
+ * @param {string} [dpa_transaction_options.transaction_amount.transaction_currency_code] Currency code of the transaction in 3 letter ISO code format.
41
+ * @param {string} [dpa_transaction_options.merchant_order_id] Merchant's order ID.
42
+ * @param {string} [dpa_transaction_options.merchant_category_code] Merchant's category code.
43
+ * @param {string} [dpa_transaction_options.merchant_country_code] Merchant's country code in ISO 3166-1 alpha-2 format.
44
+ * @param {object} [customer] Object where the customer data is stored to prefill in the checkout.
45
+ * @param {string} [customer.email] Customer email.
46
+ * @param {string} [customer.first_name] Customer first name.
47
+ * @param {string} [customer.last_name] Customer last name.
48
+ * @param {object} [customer.phone] Object where the customer phone is stored.
49
+ * @param {string} [customer.phone.country_code] Customer phone country code (example "1" for US). // TODO: Confirm if it can be removed!
50
+ * @param {string} [customer.phone.phone] Customer phone number.
51
+ * @param {string} [unaccepted_card_type] Used to block a specific card type. Options are 'CREDIT', 'DEBIT'.
52
+ */
53
+ /**
54
+ * Interface for data returned in callbacks
55
+ * @interface EventData
56
+ *
57
+ * @type {object}
58
+ * @param {EVENT_DATA_TYPE} type Event type of type [EVENT_DATA_TYPE]{@link EVENT_DATA_TYPE}
59
+ * @param {string | EventDataCheckoutCompletedData} data optional data returning a string for checkoutError event or [EventDataCheckoutCompletedData]{@link EventDataCheckoutCompletedData} for checkoutCompleted
60
+ */
61
+ /**
62
+ * Event data returned for checkoutCompleted callback, holding the One Time Token and the flow type completed.
63
+ * When the flow type is src, masked checkoutData available is also returned
64
+ *
65
+ * @interface EventDataCheckoutCompletedData
66
+ *
67
+ * @type {object}
68
+ * @param {string} type type of the checkout, can be `src` or `manual`.
69
+ * @param {string} token one time token value.
70
+ * @param {object} [checkoutData] Optional checkout data related to the checkout information. Only available on src flow.
71
+ * @param {string} [checkoutData.card_number_bin] The BIN of the card used for the transaction.
72
+ * @param {string} [checkoutData.card_number_last4] The last four digits of the card number.
73
+ * @param {string} [checkoutData.card_scheme] The card scheme. Values: visa, mastercard, amex, diners, discover.
74
+ * @param {string} [checkoutData.card_type] The type of card. Values: credit, debit, prepaid, combo, flex.
75
+ * @param {string} [checkoutData.address_line1] Address line 1 for billing address.
76
+ * @param {string} [checkoutData.address_line2] Address line 2 for billing address.
77
+ * @param {string} [checkoutData.address_line3] Address line 3 for billing address.
78
+ * @param {string} [checkoutData.address_city] City for billing address.
79
+ * @param {string} [checkoutData.address_postcode] Postal code for billing address.
80
+ * @param {string} [checkoutData.address_state] State or province for billing address.
81
+ * @param {string} [checkoutData.address_country] Country for billing address.
82
+ * @param {object} [checkoutData.shipping] Optional shipping information.
83
+ * @param {string} [checkoutData.shipping.address_line1] Address line 1 for shipping address.
84
+ * @param {string} [checkoutData.shipping.address_line2] Address line 2 for shipping address.
85
+ * @param {string} [checkoutData.shipping.address_line3] Address line 3 for shipping address.
86
+ * @param {string} [checkoutData.shipping.address_city] City for shipping address.
87
+ * @param {string} [checkoutData.shipping.address_postcode] Postal code for shipping address.
88
+ * @param {string} [checkoutData.shipping.address_state] State or province for shipping address.
89
+ * @param {string} [checkoutData.shipping.address_country] Country for shipping address.
90
+ */
91
+ /**
92
+ * Interface for style configs inyected to the SRC checkout
93
+ * @interface IStyles
94
+ *
95
+ * @type {object}
96
+ * @param {string} [primary_button_color] Color Code for primary button.
97
+ * @param {string} [primary_button_text_color] Color Code for primary button text.
98
+ * @param {string} [secondary_button_color] Color Code for secondary button.
99
+ * @param {string} [secondary_button_text_color] Color Code for secondary button text.
100
+ * @param {string} [font_family] Font family to be used.
101
+ * @param {boolean} [enable_src_popup] Boolean flag to make the SRC checkout show in a popup window instead of embedded in iframe.
102
+ */
103
+ //# sourceMappingURL=../../src/lib/secure-remote-commerce/index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../secure-remote-commerce/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAE9E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AAEH;;;;;;;GAOG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH;;;;;;;;;;;GAWG"}
@@ -0,0 +1,148 @@
1
+ /**
2
+ * List of available event's name in the SRC checkout lifecycle
3
+ * @enum EVENT
4
+ *
5
+ * @type {object}
6
+ * @param {string} IFRAME_LOADED=iframeLoaded Initial event sent when IFrame is initially loaded.
7
+ * @param {string} CHECKOUT_READY=checkoutReady Event sent when checkout is loaded and ready to be used by customer. Leverage alongside [showCheckout](#SRC+showCheckout) and [hideCheckout](#SRC+hideCheckout).
8
+ * @param {string} CHECKOUT_POPUP_OPEN=checkoutPopupOpen Event sent when SRC Checkout flow is started, regardless of embedded or windowed mode.
9
+ * @param {string} CHECKOUT_POPUP_CLOSE=checkoutPopupClose Event sent when SRC Checkout flow is closed, regardless of embedded or windowed mode.
10
+ * @param {string} CHECKOUT_COMPLETED=checkoutCompleted Event sent on successful checkout by customer. Check [data](#EventDataCheckoutCompletedData) for more information.
11
+ * @param {string} CHECKOUT_ERROR=checkoutError Event sent on error checkout by customer. Check [data](#EventData) for more information.
12
+ */
13
+ export declare enum EVENT {
14
+ IFRAME_LOADED = "iframeLoaded",
15
+ CHECKOUT_READY = "checkoutReady",
16
+ CHECKOUT_COMPLETED = "checkoutCompleted",
17
+ CHECKOUT_ERROR = "checkoutError",
18
+ CHECKOUT_POPUP_OPEN = "checkoutPopupOpen",
19
+ CHECKOUT_POPUP_CLOSE = "checkoutPopupClose"
20
+ }
21
+ export interface EventData {
22
+ type: EVENT_DATA_TYPE;
23
+ data?: string | EventDataCheckoutCompletedData;
24
+ }
25
+ /**
26
+ * List of available event data types
27
+ * @enum EVENT_DATA_TYPE
28
+ *
29
+ * @type {object}
30
+ * @param {string} CRITICAL_ERROR=CriticalError in this error scenario the checkout is understood to be in a non-recoverable state and should be closed by the merchant and give alternate payment options to the user
31
+ * @param {string} USER_ERROR=UserError in this error scenario the error in likely a user input error and the checkout is in a recoverable state, so the user will be kept within the checkout and can retry the flow
32
+ * @param {string} SUCCESS=Success
33
+ */
34
+ export declare enum EVENT_DATA_TYPE {
35
+ CRITICAL_ERROR = "CriticalError",
36
+ USER_ERROR = "UserError",
37
+ SUCCESS = "Success"
38
+ }
39
+ interface EventDataCheckoutCompletedData {
40
+ type: 'src' | 'manual';
41
+ token: string;
42
+ checkoutData?: {
43
+ card_number_bin?: string;
44
+ card_number_last4?: string;
45
+ card_scheme?: 'visa' | 'mastercard' | 'amex' | 'diners' | 'discover';
46
+ card_type?: 'credit' | 'debit' | 'prepaid' | 'combo' | 'flex';
47
+ address_line1?: string;
48
+ address_line2?: string;
49
+ address_line3?: string;
50
+ address_city?: string;
51
+ address_postcode?: string;
52
+ address_state?: string;
53
+ address_country?: string;
54
+ shipping?: {
55
+ address_line1?: string;
56
+ address_line2?: string;
57
+ address_line3?: string;
58
+ address_city?: string;
59
+ address_postcode?: string;
60
+ address_state?: string;
61
+ address_country?: string;
62
+ };
63
+ };
64
+ }
65
+ interface IBaseSRCMeta {
66
+ customizations?: IStyles;
67
+ dpa_data?: {
68
+ dpa_presentation_name?: string;
69
+ dpa_uri?: string;
70
+ };
71
+ dpa_transaction_options?: {
72
+ dpa_locale?: string;
73
+ dpa_accepted_billing_countries?: string[];
74
+ consumer_name_requested?: boolean;
75
+ consumer_email_address_requested?: boolean;
76
+ consumer_phone_number_requested?: boolean;
77
+ transaction_amount?: {
78
+ transaction_amount?: number;
79
+ transaction_currency_code?: string;
80
+ };
81
+ merchant_order_id?: string;
82
+ merchant_category_code?: string;
83
+ merchant_country_code?: string;
84
+ };
85
+ }
86
+ interface PhoneNumber {
87
+ country_code: string;
88
+ phone_number: string;
89
+ }
90
+ interface Customer {
91
+ email?: string;
92
+ phone?: {
93
+ country_code?: string;
94
+ phone?: string;
95
+ };
96
+ first_name?: string;
97
+ last_name?: string;
98
+ }
99
+ export interface IMastercardSRCMeta extends IBaseSRCMeta {
100
+ dpa_data?: IBaseSRCMeta['dpa_data'] & {
101
+ dpa_address?: string;
102
+ dpa_email_address?: string;
103
+ dpa_phone_number?: PhoneNumber;
104
+ dpa_logo_uri?: string;
105
+ dpa_supported_email_address?: string;
106
+ dpa_supported_phone_number?: PhoneNumber;
107
+ dpa_uri?: string;
108
+ dpa_support_uri?: string;
109
+ application_type?: 'WEB_BROWSER' | 'MOBILE_APP';
110
+ };
111
+ disable_summary_screen?: boolean;
112
+ co_brand_names?: string[];
113
+ checkout_experience?: 'WITHIN_CHECKOUT' | 'PAYMENT_SETTINGS';
114
+ services?: 'INLINE_CHECKOUT' | 'INLINE_INSTALLMENTS';
115
+ dpa_transaction_options?: IBaseSRCMeta['dpa_transaction_options'] & {
116
+ dpa_billing_preference?: MASTERCARD_DPA_SHIPPING_BILLING_PREFERENCE;
117
+ payment_options?: Array<{
118
+ dynamic_data_type?: string;
119
+ }>;
120
+ order_type?: MASTERCARD_ORDER_TYPE;
121
+ three_ds_preference?: string;
122
+ confirm_payment?: boolean;
123
+ };
124
+ customer?: Customer;
125
+ unaccepted_card_type?: 'CREDIT' | 'DEBIT';
126
+ }
127
+ export declare type MASTERCARD_DPA_SHIPPING_BILLING_PREFERENCE = 'FULL' | 'POSTAL_COUNTRY' | 'NONE';
128
+ export declare type DPA_DYNAMIC_DATA_TYPE = 'TAVV' | 'DTVV';
129
+ export declare type REVIEW_ACTION = 'pay' | 'continue';
130
+ export declare type TRANSACTION_TYPE = 'PURCHASE' | 'BILL_PAYMENT' | 'MONEY_TRANSFER';
131
+ export declare type MASTERCARD_ORDER_TYPE = 'SPLIT_SHIPMENT' | 'PREFERRED_CARD';
132
+ export interface IStyles {
133
+ primary_button_color?: string;
134
+ secondary_button_color?: string;
135
+ primary_button_text_color?: string;
136
+ secondary_button_text_color?: string;
137
+ font_family?: string;
138
+ enable_src_popup?: boolean;
139
+ }
140
+ export declare const STYLE: {
141
+ PRIMARY_BUTTON_COLOR: string;
142
+ SECONDARY_BUTTON_COLOR: string;
143
+ PRIMARY_BUTTON_TEXT_COLOR: string;
144
+ SECONDARY_BUTTON_TEXT_COLOR: string;
145
+ FONT_FAMILY: string;
146
+ ENABLE_SRC_POPUP: string;
147
+ };
148
+ export {};
@@ -0,0 +1,48 @@
1
+ /**
2
+ * List of available event's name in the SRC checkout lifecycle
3
+ * @enum EVENT
4
+ *
5
+ * @type {object}
6
+ * @param {string} IFRAME_LOADED=iframeLoaded Initial event sent when IFrame is initially loaded.
7
+ * @param {string} CHECKOUT_READY=checkoutReady Event sent when checkout is loaded and ready to be used by customer. Leverage alongside [showCheckout](#SRC+showCheckout) and [hideCheckout](#SRC+hideCheckout).
8
+ * @param {string} CHECKOUT_POPUP_OPEN=checkoutPopupOpen Event sent when SRC Checkout flow is started, regardless of embedded or windowed mode.
9
+ * @param {string} CHECKOUT_POPUP_CLOSE=checkoutPopupClose Event sent when SRC Checkout flow is closed, regardless of embedded or windowed mode.
10
+ * @param {string} CHECKOUT_COMPLETED=checkoutCompleted Event sent on successful checkout by customer. Check [data](#EventDataCheckoutCompletedData) for more information.
11
+ * @param {string} CHECKOUT_ERROR=checkoutError Event sent on error checkout by customer. Check [data](#EventData) for more information.
12
+ */
13
+ export var EVENT;
14
+ (function (EVENT) {
15
+ EVENT["IFRAME_LOADED"] = "iframeLoaded";
16
+ EVENT["CHECKOUT_READY"] = "checkoutReady";
17
+ EVENT["CHECKOUT_COMPLETED"] = "checkoutCompleted";
18
+ EVENT["CHECKOUT_ERROR"] = "checkoutError";
19
+ EVENT["CHECKOUT_POPUP_OPEN"] = "checkoutPopupOpen";
20
+ EVENT["CHECKOUT_POPUP_CLOSE"] = "checkoutPopupClose";
21
+ })(EVENT || (EVENT = {}));
22
+ ;
23
+ /**
24
+ * List of available event data types
25
+ * @enum EVENT_DATA_TYPE
26
+ *
27
+ * @type {object}
28
+ * @param {string} CRITICAL_ERROR=CriticalError in this error scenario the checkout is understood to be in a non-recoverable state and should be closed by the merchant and give alternate payment options to the user
29
+ * @param {string} USER_ERROR=UserError in this error scenario the error in likely a user input error and the checkout is in a recoverable state, so the user will be kept within the checkout and can retry the flow
30
+ * @param {string} SUCCESS=Success
31
+ */
32
+ export var EVENT_DATA_TYPE;
33
+ (function (EVENT_DATA_TYPE) {
34
+ EVENT_DATA_TYPE["CRITICAL_ERROR"] = "CriticalError";
35
+ EVENT_DATA_TYPE["USER_ERROR"] = "UserError";
36
+ EVENT_DATA_TYPE["SUCCESS"] = "Success";
37
+ })(EVENT_DATA_TYPE || (EVENT_DATA_TYPE = {}));
38
+ ;
39
+ ;
40
+ export const STYLE = {
41
+ PRIMARY_BUTTON_COLOR: 'primary_button_color',
42
+ SECONDARY_BUTTON_COLOR: 'secondary_button_color',
43
+ PRIMARY_BUTTON_TEXT_COLOR: 'primary_button_text_color',
44
+ SECONDARY_BUTTON_TEXT_COLOR: 'secondary_button_text_color',
45
+ FONT_FAMILY: 'font_family',
46
+ ENABLE_SRC_POPUP: 'enable_src_popup',
47
+ };
48
+ //# sourceMappingURL=../../src/lib/secure-remote-commerce/interfaces.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../secure-remote-commerce/interfaces.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,MAAM,CAAN,IAAY,KAOX;AAPD,WAAY,KAAK;IACb,uCAA8B,CAAA;IAC9B,yCAAgC,CAAA;IAChC,iDAAwC,CAAA;IACxC,yCAAgC,CAAA;IAChC,kDAAyC,CAAA;IACzC,oDAA2C,CAAA;AAC/C,CAAC,EAPW,KAAK,KAAL,KAAK,QAOhB;AAKA,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,CAAN,IAAY,eAIX;AAJD,WAAY,eAAe;IACvB,mDAAgC,CAAA;IAChC,2CAAwB,CAAA;IACxB,sCAAmB,CAAA;AACvB,CAAC,EAJW,eAAe,KAAf,eAAe,QAI1B;AAAA,CAAC;AA2BD,CAAC;AAuFF,MAAM,CAAC,MAAM,KAAK,GAAG;IACjB,oBAAoB,EAAE,sBAAsB;IAC5C,sBAAsB,EAAE,wBAAwB;IAChD,yBAAyB,EAAE,2BAA2B;IACtD,2BAA2B,EAAE,6BAA6B;IAC1D,WAAW,EAAE,aAAa;IAC1B,gBAAgB,EAAE,kBAAkB;CACvC,CAAC"}
@@ -0,0 +1,30 @@
1
+ import { IMastercardSRCMeta } from './interfaces';
2
+ import { SRC } from './secure-remote-commerce';
3
+ /**
4
+ * Class MastercardSRCClickToPay include methods for interacting with the MastercardSRC checkout and Manual Card option
5
+ *
6
+ * @extends SRC
7
+ *
8
+ * @constructor
9
+ *
10
+ * @param {string} iframe_selector - Selector of html element. Container for SRC checkout iFrame.
11
+ * @param {string} service_id - Card Scheme Service ID
12
+ * @param {string} public_key_or_access_token - Paydock public key or Access Token
13
+ * @param {IMastercardSRCMeta} meta - Data that configures the SRC checkout
14
+ * @example
15
+ * var mastercardSRC = new MastercardSRCClickToPay('#checkoutIframe', 'service_id', 'public_key', {});
16
+ *
17
+ */
18
+ declare class MastercardSRCClickToPay extends SRC {
19
+ protected iframe_selector: string;
20
+ protected service_id: string;
21
+ protected public_key_or_access_token: string;
22
+ protected meta: IMastercardSRCMeta;
23
+ /** @constructs */ constructor(iframe_selector: string, service_id: string, public_key_or_access_token: string, meta: IMastercardSRCMeta);
24
+ /**
25
+ * The final method after configuring the SRC to start the load process of SRC checkout
26
+ *
27
+ */
28
+ load(): void;
29
+ }
30
+ export { MastercardSRCClickToPay };
@@ -0,0 +1,40 @@
1
+ import { MastercardSRC } from './providers/mastercard-src/mastercard-src';
2
+ import { SRC } from './secure-remote-commerce';
3
+ /**
4
+ * Class MastercardSRCClickToPay include methods for interacting with the MastercardSRC checkout and Manual Card option
5
+ *
6
+ * @extends SRC
7
+ *
8
+ * @constructor
9
+ *
10
+ * @param {string} iframe_selector - Selector of html element. Container for SRC checkout iFrame.
11
+ * @param {string} service_id - Card Scheme Service ID
12
+ * @param {string} public_key_or_access_token - Paydock public key or Access Token
13
+ * @param {IMastercardSRCMeta} meta - Data that configures the SRC checkout
14
+ * @example
15
+ * var mastercardSRC = new MastercardSRCClickToPay('#checkoutIframe', 'service_id', 'public_key', {});
16
+ *
17
+ */
18
+ class MastercardSRCClickToPay extends SRC {
19
+ /** @constructs */ // constructs added for correct parse classes jsdoc2md
20
+ constructor(iframe_selector, service_id, public_key_or_access_token, meta) {
21
+ super(iframe_selector, service_id, public_key_or_access_token, meta);
22
+ this.iframe_selector = iframe_selector;
23
+ this.service_id = service_id;
24
+ this.public_key_or_access_token = public_key_or_access_token;
25
+ this.meta = meta;
26
+ }
27
+ /**
28
+ * The final method after configuring the SRC to start the load process of SRC checkout
29
+ *
30
+ */
31
+ load() {
32
+ if (this.provider)
33
+ return;
34
+ this.meta.customizations = this.style;
35
+ this.provider = new MastercardSRC(this.iframe_selector, this.service_id, this.public_key_or_access_token, this.meta, this.eventEmitter, this.autoResize, this.env, this.alias);
36
+ this.provider.load();
37
+ }
38
+ }
39
+ export { MastercardSRCClickToPay };
40
+ //# sourceMappingURL=../../src/lib/secure-remote-commerce/mastercard-secure-remote-commerce.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mastercard-secure-remote-commerce.js","sourceRoot":"","sources":["../../secure-remote-commerce/mastercard-secure-remote-commerce.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,2CAA2C,CAAC;AAC1E,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAE/C;;;;;;;;;;;;;;GAcG;AACH,MAAM,uBAAwB,SAAQ,GAAG;IACrC,kBAAkB,CAAC,sDAAsD;IACzE,YAAsB,eAAuB,EAAY,UAAkB,EAAY,0BAAkC,EAAY,IAAwB;QACzJ,KAAK,CAAC,eAAe,EAAE,UAAU,EAAE,0BAA0B,EAAE,IAAI,CAAC,CAAC;QADnD,oBAAe,GAAf,eAAe,CAAQ;QAAY,eAAU,GAAV,UAAU,CAAQ;QAAY,+BAA0B,GAA1B,0BAA0B,CAAQ;QAAY,SAAI,GAAJ,IAAI,CAAoB;IAE7J,CAAC;IAED;;;OAGG;IACI,IAAI;QACP,IAAI,IAAI,CAAC,QAAQ;YACb,OAAO;QAEX,IAAI,CAAC,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC;QAEtC,IAAI,CAAC,QAAQ,GAAG,IAAI,aAAa,CAC7B,IAAI,CAAC,eAAe,EACpB,IAAI,CAAC,UAAU,EACf,IAAI,CAAC,0BAA0B,EAC/B,IAAI,CAAC,IAAI,EACT,IAAI,CAAC,YAAY,EACjB,IAAI,CAAC,UAAU,EACf,IAAI,CAAC,GAAG,EACR,IAAI,CAAC,KAAK,CACb,CAAC;QAEF,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;IACzB,CAAC;CACJ;AAED,OAAO,EAAE,uBAAuB,EAAE,CAAC"}
@@ -0,0 +1 @@
1
+ export { MastercardSRC } from './mastercard-src';
@@ -0,0 +1,2 @@
1
+ export { MastercardSRC } from './mastercard-src';
2
+ //# sourceMappingURL=../../../../src/lib/secure-remote-commerce/providers/mastercard-src/index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../secure-remote-commerce/providers/mastercard-src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC"}
@@ -4,25 +4,21 @@ import { IFrame } from '../../../components/iframe';
4
4
  import { IFrameEvent } from '../../../components/iframe-event';
5
5
  import { EventEmitter } from "../../../helper/event-emitter";
6
6
  import { SRCProvider } from '../src-provider';
7
- import { IVisaSRCMeta } from '../../interfaces';
8
- export declare class VisaSRC implements SRCProvider {
9
- protected meta: IVisaSRCMeta;
7
+ import { IMastercardSRCMeta } from '../../interfaces';
8
+ export declare class MastercardSRC implements SRCProvider {
9
+ protected meta: IMastercardSRCMeta;
10
10
  protected eventEmitter: EventEmitter;
11
11
  protected autoResize: any;
12
12
  protected link: Link;
13
13
  protected iFrameContainer: Container;
14
- protected buttonContainer: Container;
15
14
  protected iFrame: IFrame;
16
15
  protected iFrameEvent: IFrameEvent;
17
- constructor(button_selector: string, iframe_selector: string, service_id: string, public_key: string, meta: IVisaSRCMeta, eventEmitter: EventEmitter, autoResize: any, env: string, alias: string);
16
+ constructor(iframe_selector: string, service_id: string, public_key: string, meta: IMastercardSRCMeta, eventEmitter: EventEmitter, autoResize: any, env: string, alias?: string);
18
17
  private setupIFrameEvents;
19
18
  load(): void;
20
19
  getEnv(): string;
21
- hideButton(_saveSize: boolean): void;
22
- showButton(): void;
23
20
  hideCheckout(saveSize: boolean): void;
24
21
  showCheckout(): void;
25
22
  reload(): void;
26
23
  useAutoResize(force?: boolean): void;
27
24
  }
28
- //# sourceMappingURL=visa-src.d.ts.map
@@ -0,0 +1,89 @@
1
+ import { Link, MASTERCARD_SRC } from '../../../components/link';
2
+ import { Container } from '../../../components/container';
3
+ import { IFrame } from '../../../components/iframe';
4
+ import { IFrameEvent } from '../../../components/iframe-event';
5
+ import { EVENT } from '../../interfaces';
6
+ import { SDK } from '../../../configs/sdk';
7
+ export class MastercardSRC {
8
+ constructor(iframe_selector, service_id, public_key, meta, eventEmitter, autoResize, env, alias) {
9
+ this.meta = meta;
10
+ this.eventEmitter = eventEmitter;
11
+ this.autoResize = autoResize;
12
+ this.link = new Link(MASTERCARD_SRC);
13
+ this.link.setParams(Object.assign({ service_id, public_key }, meta && { meta: JSON.stringify(meta) }));
14
+ if (SDK.version) {
15
+ this.link.setParams({
16
+ sdk_version: SDK.version,
17
+ sdk_type: SDK.type,
18
+ });
19
+ }
20
+ if (env)
21
+ this.link.setEnv(env, alias);
22
+ this.iFrameContainer = new Container(iframe_selector);
23
+ this.iFrame = new IFrame(this.iFrameContainer);
24
+ this.iFrameEvent = new IFrameEvent(window);
25
+ this.setupIFrameEvents();
26
+ }
27
+ setupIFrameEvents() {
28
+ const widgetId = this.link.getParams().widget_id;
29
+ if (!widgetId)
30
+ return;
31
+ this.iFrameEvent.on(EVENT.CHECKOUT_READY, widgetId, ({ data }) => {
32
+ this.eventEmitter.emit(EVENT.CHECKOUT_READY, data);
33
+ });
34
+ this.iFrameEvent.on(EVENT.CHECKOUT_COMPLETED, widgetId, ({ data }) => {
35
+ this.eventEmitter.emit(EVENT.CHECKOUT_COMPLETED, data);
36
+ });
37
+ this.iFrameEvent.on(EVENT.CHECKOUT_POPUP_OPEN, widgetId, ({ data }) => {
38
+ this.eventEmitter.emit(EVENT.CHECKOUT_POPUP_OPEN, data);
39
+ });
40
+ this.iFrameEvent.on(EVENT.CHECKOUT_POPUP_CLOSE, widgetId, ({ data }) => {
41
+ this.eventEmitter.emit(EVENT.CHECKOUT_POPUP_CLOSE, data);
42
+ });
43
+ this.iFrameEvent.on(EVENT.CHECKOUT_ERROR, widgetId, ({ data }) => {
44
+ this.eventEmitter.emit(EVENT.CHECKOUT_ERROR, data);
45
+ });
46
+ if (this.autoResize)
47
+ this.useAutoResize(true);
48
+ }
49
+ load() {
50
+ this.iFrame.load(this.link.getUrl(), { title: 'Mastercard SRC checkout' });
51
+ const iframeElement = this.iFrame.getElement();
52
+ this.iFrame.setStyle('width', '100%');
53
+ if (iframeElement)
54
+ iframeElement.onload = () => this.eventEmitter.emit(EVENT.IFRAME_LOADED, {});
55
+ }
56
+ getEnv() {
57
+ return this.link.getEnv();
58
+ }
59
+ hideCheckout(saveSize) {
60
+ if (this.iFrame)
61
+ this.iFrame.hide();
62
+ }
63
+ showCheckout() {
64
+ if (this.iFrame)
65
+ this.iFrame.show();
66
+ }
67
+ reload() {
68
+ this.iFrame.remove();
69
+ this.load();
70
+ }
71
+ useAutoResize(force) {
72
+ if (this.autoResize && !force)
73
+ return;
74
+ this.autoResize = true;
75
+ const params = this.link.getParams();
76
+ if (!(params === null || params === void 0 ? void 0 : params.widget_id))
77
+ return;
78
+ this.iFrameEvent.on('resize', params.widget_id, ({ data }) => {
79
+ var _a, _b;
80
+ const iframeElement = this.iFrame.getElement();
81
+ if (iframeElement) {
82
+ iframeElement.scrolling = 'no';
83
+ if ((_a = data === null || data === void 0 ? void 0 : data.data) === null || _a === void 0 ? void 0 : _a.height)
84
+ this.iFrame.setStyle('height', ((_b = data === null || data === void 0 ? void 0 : data.data) === null || _b === void 0 ? void 0 : _b.height) + 'px');
85
+ }
86
+ });
87
+ }
88
+ }
89
+ //# sourceMappingURL=../../../../src/lib/secure-remote-commerce/providers/mastercard-src/mastercard-src.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mastercard-src.js","sourceRoot":"","sources":["../../../../secure-remote-commerce/providers/mastercard-src/mastercard-src.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAc,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAG3E,OAAO,EAAE,KAAK,EAAsB,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAE3C,MAAM,OAAO,aAAa;IAMtB,YAAY,eAAuB,EAAE,UAAkB,EAAE,UAAkB,EAAY,IAAwB,EAAY,YAA0B,EAAY,UAAU,EAAE,GAAW,EAAE,KAAc;QAAjH,SAAI,GAAJ,IAAI,CAAoB;QAAY,iBAAY,GAAZ,YAAY,CAAc;QAAY,eAAU,GAAV,UAAU,CAAA;QACvK,IAAI,CAAC,IAAI,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,CAAC;QACrC,IAAI,CAAC,IAAI,CAAC,SAAS,iBAAG,UAAU,EAAE,UAAU,IAAK,IAAI,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,EAAG,CAAC;QAE3F,IAAI,GAAG,CAAC,OAAO,EAAE;YACb,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC;gBAChB,WAAW,EAAE,GAAG,CAAC,OAAO;gBACxB,QAAQ,EAAE,GAAG,CAAC,IAAI;aACrB,CAAC,CAAC;SACN;QAED,IAAI,GAAG;YACH,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QAEjC,IAAI,CAAC,eAAe,GAAG,IAAI,SAAS,CAAC,eAAe,CAAC,CAAC;QACtD,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QAE/C,IAAI,CAAC,WAAW,GAAG,IAAI,WAAW,CAAC,MAAM,CAAC,CAAC;QAE3C,IAAI,CAAC,iBAAiB,EAAE,CAAC;IAC7B,CAAC;IAEO,iBAAiB;QACrB,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,SAAS,CAAC;QACjD,IAAI,CAAC,QAAQ;YACT,OAAO;QAEX,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,KAAK,CAAC,cAAc,EAAE,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAc,EAAE,EAAE;YACzE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,cAAc,EAAE,IAAI,CAAC,CAAC;QACvD,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,KAAK,CAAC,kBAAkB,EAAE,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAc,EAAE,EAAE;YAC7E,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,kBAAkB,EAAE,IAAI,CAAC,CAAC;QAC3D,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,KAAK,CAAC,mBAAmB,EAAE,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAc,EAAE,EAAE;YAC9E,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,mBAAmB,EAAE,IAAI,CAAC,CAAC;QAC5D,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,KAAK,CAAC,oBAAoB,EAAE,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAc,EAAE,EAAE;YAC/E,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,oBAAoB,EAAE,IAAI,CAAC,CAAC;QAC7D,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,KAAK,CAAC,cAAc,EAAE,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAc,EAAE,EAAE;YACzE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,cAAc,EAAE,IAAI,CAAC,CAAC;QACvD,CAAC,CAAC,CAAC;QAEH,IAAI,IAAI,CAAC,UAAU;YACf,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;IACjC,CAAC;IAEM,IAAI;QACP,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,yBAAyB,EAAC,CAAC,CAAC;QAC1E,MAAM,aAAa,GAAG,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC;QAC/C,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QACtC,IAAI,aAAa;YACb,aAAa,CAAC,MAAM,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC;IACrF,CAAC;IAEM,MAAM;QACT,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;IAC9B,CAAC;IAEM,YAAY,CAAC,QAAiB;QACjC,IAAI,IAAI,CAAC,MAAM;YACX,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;IAC3B,CAAC;IAEM,YAAY;QACf,IAAI,IAAI,CAAC,MAAM;YACX,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;IAC3B,CAAC;IAEM,MAAM;QACT,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;QACrB,IAAI,CAAC,IAAI,EAAE,CAAC;IAChB,CAAC;IAEM,aAAa,CAAC,KAAe;QAChC,IAAI,IAAI,CAAC,UAAU,IAAI,CAAC,KAAK;YACzB,OAAO;QACX,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;QAEvB,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC;QACrC,IAAI,EAAC,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,SAAS,CAAA;YAClB,OAAO;QAEX,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,CAAC,SAAS,EAAE,CAAC,EAAE,IAAI,EAAc,EAAE,EAAE;;YACrE,MAAM,aAAa,GAAG,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC;YAC/C,IAAI,aAAa,EAAE;gBACf,aAAa,CAAC,SAAS,GAAG,IAAI,CAAC;gBAC/B,UAAI,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,IAAI,0CAAE,MAAM;oBAClB,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,EAAE,OAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,IAAI,0CAAE,MAAM,IAAG,IAAI,CAAC,CAAC;aACjE;QACL,CAAC,CAAC,CAAC;IACP,CAAC;CACJ"}
@@ -8,4 +8,3 @@ export interface SRCProvider {
8
8
  reload(): void;
9
9
  useAutoResize?(): void;
10
10
  }
11
- //# sourceMappingURL=src-provider.d.ts.map
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=../../../src/lib/secure-remote-commerce/providers/src-provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"src-provider.js","sourceRoot":"","sources":["../../../secure-remote-commerce/providers/src-provider.ts"],"names":[],"mappings":""}