@paydock/client-sdk 1.105.1 → 1.105.56-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 (649) hide show
  1. package/README.md +2094 -465
  2. package/bundles/index.cjs +35088 -0
  3. package/bundles/index.cjs.d.ts +4021 -0
  4. package/bundles/index.mjs +35050 -0
  5. package/bundles/index.mjs.d.ts +4021 -0
  6. package/bundles/types/api/api-base.d.ts +54 -0
  7. package/bundles/types/api/api-base.d.ts.map +1 -0
  8. package/{lib → bundles/types}/api/api-charge-internal.d.ts +2 -0
  9. package/bundles/types/api/api-charge-internal.d.ts.map +1 -0
  10. package/{lib → bundles/types}/api/api-charge.d.ts +1 -0
  11. package/bundles/types/api/api-charge.d.ts.map +1 -0
  12. package/bundles/types/api/api-checkout-internal.d.ts +57 -0
  13. package/bundles/types/api/api-checkout-internal.d.ts.map +1 -0
  14. package/bundles/types/api/api-gateway-internal.d.ts +12 -0
  15. package/bundles/types/api/api-gateway-internal.d.ts.map +1 -0
  16. package/{lib → bundles/types}/api/api-internal.d.ts +5 -0
  17. package/bundles/types/api/api-internal.d.ts.map +1 -0
  18. package/{lib → bundles/types}/api/api-service-internal.d.ts +3 -1
  19. package/bundles/types/api/api-service-internal.d.ts.map +1 -0
  20. package/{lib → bundles/types}/api/api.d.ts +1 -0
  21. package/bundles/types/api/api.d.ts.map +1 -0
  22. package/bundles/types/api/index.d.ts +2 -0
  23. package/bundles/types/api/index.d.ts.map +1 -0
  24. package/{lib → bundles/types}/canvas-3ds/canvas-3ds.d.ts +1 -0
  25. package/bundles/types/canvas-3ds/canvas-3ds.d.ts.map +1 -0
  26. package/{lib → bundles/types}/canvas-3ds/index.d.ts +1 -0
  27. package/bundles/types/canvas-3ds/index.d.ts.map +1 -0
  28. package/{lib → bundles/types}/canvas-3ds/services/gpayments-service.d.ts +4 -3
  29. package/bundles/types/canvas-3ds/services/gpayments-service.d.ts.map +1 -0
  30. package/{lib → bundles/types}/canvas-3ds/services/index.d.ts +1 -0
  31. package/bundles/types/canvas-3ds/services/index.d.ts.map +1 -0
  32. package/{lib → bundles/types}/canvas-3ds/services/standalone3ds-service.d.ts +1 -0
  33. package/bundles/types/canvas-3ds/services/standalone3ds-service.d.ts.map +1 -0
  34. package/bundles/types/checkout/checkout.d.ts +86 -0
  35. package/bundles/types/checkout/checkout.d.ts.map +1 -0
  36. package/bundles/types/checkout/helpers/instruction-handler.d.ts +23 -0
  37. package/bundles/types/checkout/helpers/instruction-handler.d.ts.map +1 -0
  38. package/bundles/types/checkout/helpers/instruction-module.d.ts +6 -0
  39. package/bundles/types/checkout/helpers/instruction-module.d.ts.map +1 -0
  40. package/bundles/types/checkout/helpers/instruction-module.decorator.d.ts +6 -0
  41. package/bundles/types/checkout/helpers/instruction-module.decorator.d.ts.map +1 -0
  42. package/bundles/types/checkout/helpers/instruction.decorator.d.ts +5 -0
  43. package/bundles/types/checkout/helpers/instruction.decorator.d.ts.map +1 -0
  44. package/bundles/types/checkout/helpers/resource-helper.d.ts +5 -0
  45. package/bundles/types/checkout/helpers/resource-helper.d.ts.map +1 -0
  46. package/bundles/types/checkout/helpers/session-helper.d.ts +5 -0
  47. package/bundles/types/checkout/helpers/session-helper.d.ts.map +1 -0
  48. package/bundles/types/checkout/index.d.ts +2 -0
  49. package/bundles/types/checkout/index.d.ts.map +1 -0
  50. package/bundles/types/checkout/instructions/index.d.ts +3 -0
  51. package/bundles/types/checkout/instructions/index.d.ts.map +1 -0
  52. package/bundles/types/checkout/instructions/v1/index.d.ts +4 -0
  53. package/bundles/types/checkout/instructions/v1/index.d.ts.map +1 -0
  54. package/bundles/types/checkout/instructions/v1/instruction.afterpay_checkout_form.show.d.ts +20 -0
  55. package/bundles/types/checkout/instructions/v1/instruction.afterpay_checkout_form.show.d.ts.map +1 -0
  56. package/bundles/types/checkout/instructions/v1/instruction.afterpay_wallet_form.show.d.ts +14 -0
  57. package/bundles/types/checkout/instructions/v1/instruction.afterpay_wallet_form.show.d.ts.map +1 -0
  58. package/bundles/types/checkout/instructions/v1/instruction.apple_pay_form.show.d.ts +18 -0
  59. package/bundles/types/checkout/instructions/v1/instruction.apple_pay_form.show.d.ts.map +1 -0
  60. package/bundles/types/checkout/instructions/v1/instruction.bank_account_form.show.d.ts +15 -0
  61. package/bundles/types/checkout/instructions/v1/instruction.bank_account_form.show.d.ts.map +1 -0
  62. package/bundles/types/checkout/instructions/v1/instruction.canvas_3ds.show.d.ts +11 -0
  63. package/bundles/types/checkout/instructions/v1/instruction.canvas_3ds.show.d.ts.map +1 -0
  64. package/bundles/types/checkout/instructions/v1/instruction.card_form.show.d.ts +19 -0
  65. package/bundles/types/checkout/instructions/v1/instruction.card_form.show.d.ts.map +1 -0
  66. package/bundles/types/checkout/instructions/v1/instruction.disable_payment_method_event.emit.d.ts +19 -0
  67. package/bundles/types/checkout/instructions/v1/instruction.disable_payment_method_event.emit.d.ts.map +1 -0
  68. package/bundles/types/checkout/instructions/v1/instruction.generic.show_message.d.ts +26 -0
  69. package/bundles/types/checkout/instructions/v1/instruction.generic.show_message.d.ts.map +1 -0
  70. package/bundles/types/checkout/instructions/v1/instruction.google_pay_form.show.d.ts +18 -0
  71. package/bundles/types/checkout/instructions/v1/instruction.google_pay_form.show.d.ts.map +1 -0
  72. package/bundles/types/checkout/instructions/v1/instruction.merchant_event.emit.d.ts +18 -0
  73. package/bundles/types/checkout/instructions/v1/instruction.merchant_event.emit.d.ts.map +1 -0
  74. package/bundles/types/checkout/instructions/v1/instruction.payment_methods.show.d.ts +18 -0
  75. package/bundles/types/checkout/instructions/v1/instruction.payment_methods.show.d.ts.map +1 -0
  76. package/bundles/types/checkout/instructions/v1/instruction.paypal_form.show.d.ts +21 -0
  77. package/bundles/types/checkout/instructions/v1/instruction.paypal_form.show.d.ts.map +1 -0
  78. package/bundles/types/checkout/instructions/v1/instruction.zip_checkout_form.show.d.ts +19 -0
  79. package/bundles/types/checkout/instructions/v1/instruction.zip_checkout_form.show.d.ts.map +1 -0
  80. package/bundles/types/checkout/layout-widgets/additionals.d.ts +3 -0
  81. package/bundles/types/checkout/layout-widgets/additionals.d.ts.map +1 -0
  82. package/bundles/types/checkout/layout-widgets/default-variables.enum.d.ts +9 -0
  83. package/bundles/types/checkout/layout-widgets/default-variables.enum.d.ts.map +1 -0
  84. package/bundles/types/checkout/layout-widgets/message.d.ts +34 -0
  85. package/bundles/types/checkout/layout-widgets/message.d.ts.map +1 -0
  86. package/bundles/types/checkout/layout-widgets/payment-methods-template.d.ts +13 -0
  87. package/bundles/types/checkout/layout-widgets/payment-methods-template.d.ts.map +1 -0
  88. package/bundles/types/checkout/layout-widgets/payment-methods.d.ts +52 -0
  89. package/bundles/types/checkout/layout-widgets/payment-methods.d.ts.map +1 -0
  90. package/bundles/types/checkout/layout-widgets/payment-template.d.ts +3 -0
  91. package/bundles/types/checkout/layout-widgets/payment-template.d.ts.map +1 -0
  92. package/{lib → bundles/types}/checkout-button/afterpay/afterpay-checkout-button.d.ts +1 -0
  93. package/bundles/types/checkout-button/afterpay/afterpay-checkout-button.d.ts.map +1 -0
  94. package/{lib → bundles/types}/checkout-button/afterpay/afterpay.runner.d.ts +3 -0
  95. package/bundles/types/checkout-button/afterpay/afterpay.runner.d.ts.map +1 -0
  96. package/{lib → bundles/types}/checkout-button/checkout-button.d.ts +1 -0
  97. package/bundles/types/checkout-button/checkout-button.d.ts.map +1 -0
  98. package/{lib → bundles/types}/checkout-button/checkout-button.interface.d.ts +1 -0
  99. package/bundles/types/checkout-button/checkout-button.interface.d.ts.map +1 -0
  100. package/{lib → bundles/types}/checkout-button/checkout-contextual-handler.d.ts +5 -0
  101. package/bundles/types/checkout-button/checkout-contextual-handler.d.ts.map +1 -0
  102. package/{lib → bundles/types}/checkout-button/index.d.ts +2 -1
  103. package/bundles/types/checkout-button/index.d.ts.map +1 -0
  104. package/{lib → bundles/types}/checkout-button/paypal/paypal-checkout-button.d.ts +1 -0
  105. package/bundles/types/checkout-button/paypal/paypal-checkout-button.d.ts.map +1 -0
  106. package/{lib → bundles/types}/checkout-button/paypal/paypal.runner.d.ts +1 -0
  107. package/bundles/types/checkout-button/paypal/paypal.runner.d.ts.map +1 -0
  108. package/{lib → bundles/types}/checkout-button/runner/base.runner.d.ts +4 -3
  109. package/bundles/types/checkout-button/runner/base.runner.d.ts.map +1 -0
  110. package/{lib → bundles/types}/checkout-button/runner/contextual.runner.d.ts +4 -2
  111. package/bundles/types/checkout-button/runner/contextual.runner.d.ts.map +1 -0
  112. package/{lib → bundles/types}/checkout-button/runner/index.d.ts +1 -0
  113. package/bundles/types/checkout-button/runner/index.d.ts.map +1 -0
  114. package/{lib → bundles/types}/checkout-button/runner/popup.runner.d.ts +5 -4
  115. package/bundles/types/checkout-button/runner/popup.runner.d.ts.map +1 -0
  116. package/{lib → bundles/types}/checkout-button/runner/redirect.runner.d.ts +2 -1
  117. package/bundles/types/checkout-button/runner/redirect.runner.d.ts.map +1 -0
  118. package/bundles/types/checkout-button/zipmoney/index.d.ts +4 -0
  119. package/bundles/types/checkout-button/zipmoney/index.d.ts.map +1 -0
  120. package/{lib → bundles/types}/checkout-button/zipmoney/zipmoney-checkout-button.d.ts +1 -0
  121. package/bundles/types/checkout-button/zipmoney/zipmoney-checkout-button.d.ts.map +1 -0
  122. package/{lib → bundles/types}/checkout-button/zipmoney/zipmoney-contextual.runner.d.ts +2 -1
  123. package/bundles/types/checkout-button/zipmoney/zipmoney-contextual.runner.d.ts.map +1 -0
  124. package/{lib → bundles/types}/checkout-button/zipmoney/zipmoney-redirect.runner.d.ts +2 -1
  125. package/bundles/types/checkout-button/zipmoney/zipmoney-redirect.runner.d.ts.map +1 -0
  126. package/{lib → bundles/types}/checkout-button/zipmoney/zipmoney.config.d.ts +1 -0
  127. package/bundles/types/checkout-button/zipmoney/zipmoney.config.d.ts.map +1 -0
  128. package/{lib → bundles/types}/checkout-button/zipmoney/zipmoney.runner.d.ts +2 -1
  129. package/bundles/types/checkout-button/zipmoney/zipmoney.runner.d.ts.map +1 -0
  130. package/{lib → bundles/types}/checkout-button/zipmoney/zipmoney.types.d.ts +1 -0
  131. package/bundles/types/checkout-button/zipmoney/zipmoney.types.d.ts.map +1 -0
  132. package/{lib → bundles/types}/components/ability-guard.d.ts +1 -0
  133. package/bundles/types/components/ability-guard.d.ts.map +1 -0
  134. package/{lib → bundles/types}/components/background.d.ts +1 -0
  135. package/bundles/types/components/background.d.ts.map +1 -0
  136. package/{lib → bundles/types}/components/container.d.ts +1 -0
  137. package/bundles/types/components/container.d.ts.map +1 -0
  138. package/{lib → bundles/types}/components/dispatcher.d.ts +2 -1
  139. package/bundles/types/components/dispatcher.d.ts.map +1 -0
  140. package/{lib → bundles/types}/components/element-style.d.ts +2 -1
  141. package/bundles/types/components/element-style.d.ts.map +1 -0
  142. package/{lib → bundles/types}/components/flypay-iframe-event.d.ts +1 -0
  143. package/bundles/types/components/flypay-iframe-event.d.ts.map +1 -0
  144. package/{lib/components/form-Interceptor.d.ts → bundles/types/components/form-interceptor.d.ts} +1 -0
  145. package/bundles/types/components/form-interceptor.d.ts.map +1 -0
  146. package/{lib → bundles/types}/components/http-core.d.ts +1 -0
  147. package/bundles/types/components/http-core.d.ts.map +1 -0
  148. package/{lib → bundles/types}/components/iframe-event.d.ts +6 -0
  149. package/bundles/types/components/iframe-event.d.ts.map +1 -0
  150. package/{lib → bundles/types}/components/iframe.d.ts +3 -0
  151. package/bundles/types/components/iframe.d.ts.map +1 -0
  152. package/{lib → bundles/types}/components/link.d.ts +6 -3
  153. package/bundles/types/components/link.d.ts.map +1 -0
  154. package/{lib → bundles/types}/components/loader.d.ts +1 -0
  155. package/bundles/types/components/loader.d.ts.map +1 -0
  156. package/{lib → bundles/types}/components/param.d.ts +16 -9
  157. package/bundles/types/components/param.d.ts.map +1 -0
  158. package/{lib → bundles/types}/components/popup.d.ts +1 -0
  159. package/bundles/types/components/popup.d.ts.map +1 -0
  160. package/{lib → bundles/types}/components/storage-dispatcher.d.ts +1 -0
  161. package/bundles/types/components/storage-dispatcher.d.ts.map +1 -0
  162. package/{lib → bundles/types}/components/trigger.d.ts +1 -0
  163. package/bundles/types/components/trigger.d.ts.map +1 -0
  164. package/{lib → bundles/types}/components/vault-display-iframe-event.d.ts +1 -0
  165. package/bundles/types/components/vault-display-iframe-event.d.ts.map +1 -0
  166. package/{lib → bundles/types}/components/wallet-background.d.ts +3 -1
  167. package/bundles/types/components/wallet-background.d.ts.map +1 -0
  168. package/{lib → bundles/types}/components/wallet-trigger.d.ts +1 -0
  169. package/bundles/types/components/wallet-trigger.d.ts.map +1 -0
  170. package/bundles/types/configs/env/environment.cba.d.ts +29 -0
  171. package/bundles/types/configs/env/environment.cba.d.ts.map +1 -0
  172. package/bundles/types/configs/env/environment.interface.d.ts +12 -0
  173. package/bundles/types/configs/env/environment.interface.d.ts.map +1 -0
  174. package/{lib/configs/env/env.d.ts → bundles/types/configs/env/environment.paydock.d.ts} +5 -8
  175. package/bundles/types/configs/env/environment.paydock.d.ts.map +1 -0
  176. package/bundles/types/configs/env/index.d.ts +3 -0
  177. package/bundles/types/configs/env/index.d.ts.map +1 -0
  178. package/{lib → bundles/types}/configs/sdk.d.ts +3 -2
  179. package/bundles/types/configs/sdk.d.ts.map +1 -0
  180. package/{lib → bundles/types}/constants/validators.d.ts +3 -2
  181. package/bundles/types/constants/validators.d.ts.map +1 -0
  182. package/{lib → bundles/types}/external-checkout/builder.d.ts +1 -0
  183. package/bundles/types/external-checkout/builder.d.ts.map +1 -0
  184. package/{lib → bundles/types}/external-checkout/checker.d.ts +1 -0
  185. package/bundles/types/external-checkout/checker.d.ts.map +1 -0
  186. package/bundles/types/external-checkout/index.d.ts +3 -0
  187. package/bundles/types/external-checkout/index.d.ts.map +1 -0
  188. package/{lib → bundles/types}/helper/access-token.d.ts +2 -0
  189. package/bundles/types/helper/access-token.d.ts.map +1 -0
  190. package/{lib → bundles/types}/helper/browser.d.ts +1 -0
  191. package/bundles/types/helper/browser.d.ts.map +1 -0
  192. package/bundles/types/helper/element-id.d.ts +5 -0
  193. package/bundles/types/helper/element-id.d.ts.map +1 -0
  194. package/{lib → bundles/types}/helper/event-emitter.d.ts +2 -0
  195. package/bundles/types/helper/event-emitter.d.ts.map +1 -0
  196. package/{lib → bundles/types}/helper/event.d.ts +1 -0
  197. package/bundles/types/helper/event.d.ts.map +1 -0
  198. package/{lib → bundles/types}/helper/ms.d.ts +1 -0
  199. package/bundles/types/helper/ms.d.ts.map +1 -0
  200. package/{lib → bundles/types}/helper/object.d.ts +1 -0
  201. package/bundles/types/helper/object.d.ts.map +1 -0
  202. package/bundles/types/helper/spiner.util.d.ts +6 -0
  203. package/bundles/types/helper/spiner.util.d.ts.map +1 -0
  204. package/{lib → bundles/types}/helper/url.d.ts +1 -0
  205. package/bundles/types/helper/url.d.ts.map +1 -0
  206. package/{lib → bundles/types}/helper/uuid.d.ts +1 -0
  207. package/bundles/types/helper/uuid.d.ts.map +1 -0
  208. package/bundles/types/helper/widget-logger.d.ts +9 -0
  209. package/bundles/types/helper/widget-logger.d.ts.map +1 -0
  210. package/bundles/types/index-cba.d.ts +17 -0
  211. package/bundles/types/index-cba.d.ts.map +1 -0
  212. package/bundles/types/index.d.ts +18 -0
  213. package/bundles/types/index.d.ts.map +1 -0
  214. package/{lib → bundles/types}/payment-source/builder.d.ts +1 -0
  215. package/bundles/types/payment-source/builder.d.ts.map +1 -0
  216. package/{lib → bundles/types}/payment-source/index.d.ts +1 -0
  217. package/bundles/types/payment-source/index.d.ts.map +1 -0
  218. package/{lib → bundles/types}/payment-source-widget/html-payment-source-widget.d.ts +1 -0
  219. package/bundles/types/payment-source-widget/html-payment-source-widget.d.ts.map +1 -0
  220. package/{lib → bundles/types}/payment-source-widget/index.d.ts +1 -0
  221. package/bundles/types/payment-source-widget/index.d.ts.map +1 -0
  222. package/{lib → bundles/types}/payment-source-widget/interfaces.d.ts +1 -0
  223. package/bundles/types/payment-source-widget/interfaces.d.ts.map +1 -0
  224. package/{lib → bundles/types}/payment-source-widget/payment-source-widget.d.ts +1 -0
  225. package/bundles/types/payment-source-widget/payment-source-widget.d.ts.map +1 -0
  226. package/bundles/types/paypal-data-collector/index.d.ts +23 -0
  227. package/bundles/types/paypal-data-collector/index.d.ts.map +1 -0
  228. package/bundles/types/paypal-data-collector/paypal-data-collector.d.ts +59 -0
  229. package/bundles/types/paypal-data-collector/paypal-data-collector.d.ts.map +1 -0
  230. package/bundles/types/paypal-data-collector/paypal-data-collector.interfaces.d.ts +21 -0
  231. package/bundles/types/paypal-data-collector/paypal-data-collector.interfaces.d.ts.map +1 -0
  232. package/bundles/types/paypal-data-collector/paypal-data-collector.service.d.ts +18 -0
  233. package/bundles/types/paypal-data-collector/paypal-data-collector.service.d.ts.map +1 -0
  234. package/bundles/types/paypal-save-payment-source/index.d.ts +61 -0
  235. package/bundles/types/paypal-save-payment-source/index.d.ts.map +1 -0
  236. package/bundles/types/paypal-save-payment-source/paypal-save-payment-source.d.ts +86 -0
  237. package/bundles/types/paypal-save-payment-source/paypal-save-payment-source.d.ts.map +1 -0
  238. package/bundles/types/paypal-save-payment-source/paypal-save-payment-source.interfaces.d.ts +84 -0
  239. package/bundles/types/paypal-save-payment-source/paypal-save-payment-source.interfaces.d.ts.map +1 -0
  240. package/bundles/types/paypal-save-payment-source/paypal-save-payment-source.service.d.ts +37 -0
  241. package/bundles/types/paypal-save-payment-source/paypal-save-payment-source.service.d.ts.map +1 -0
  242. package/bundles/types/secure-remote-commerce/click-to-pay-secure-remote-commerce.d.ts +31 -0
  243. package/bundles/types/secure-remote-commerce/click-to-pay-secure-remote-commerce.d.ts.map +1 -0
  244. package/bundles/types/secure-remote-commerce/index.d.ts +104 -0
  245. package/bundles/types/secure-remote-commerce/index.d.ts.map +1 -0
  246. package/bundles/types/secure-remote-commerce/interfaces.d.ts +159 -0
  247. package/bundles/types/secure-remote-commerce/interfaces.d.ts.map +1 -0
  248. package/bundles/types/secure-remote-commerce/providers/mastercard-src/index.d.ts +2 -0
  249. package/bundles/types/secure-remote-commerce/providers/mastercard-src/index.d.ts.map +1 -0
  250. package/{lib/secure-remote-commerce/providers/visa-src/visa-src.d.ts → bundles/types/secure-remote-commerce/providers/mastercard-src/mastercard-src.d.ts} +5 -7
  251. package/bundles/types/secure-remote-commerce/providers/mastercard-src/mastercard-src.d.ts.map +1 -0
  252. package/{lib → bundles/types}/secure-remote-commerce/providers/src-provider.d.ts +1 -0
  253. package/bundles/types/secure-remote-commerce/providers/src-provider.d.ts.map +1 -0
  254. package/bundles/types/secure-remote-commerce/secure-remote-commerce.d.ts +86 -0
  255. package/bundles/types/secure-remote-commerce/secure-remote-commerce.d.ts.map +1 -0
  256. package/bundles/types/shared/http/http-request.d.ts +14 -0
  257. package/bundles/types/shared/http/http-request.d.ts.map +1 -0
  258. package/bundles/types/shared/http/index.d.ts +2 -0
  259. package/bundles/types/shared/http/index.d.ts.map +1 -0
  260. package/bundles/types/shared/services/instrumentation/instrumentation.agent.d.ts +15 -0
  261. package/bundles/types/shared/services/instrumentation/instrumentation.agent.d.ts.map +1 -0
  262. package/bundles/types/shared/services/instrumentation/instrumentation.config.d.ts +66 -0
  263. package/bundles/types/shared/services/instrumentation/instrumentation.config.d.ts.map +1 -0
  264. package/bundles/types/shared/services/instrumentation/instrumentation.types.d.ts +14 -0
  265. package/bundles/types/shared/services/instrumentation/instrumentation.types.d.ts.map +1 -0
  266. package/bundles/types/shared/services/instrumentation/repositories/action.repository.d.ts +15 -0
  267. package/bundles/types/shared/services/instrumentation/repositories/action.repository.d.ts.map +1 -0
  268. package/bundles/types/shared/services/instrumentation/repositories/error.repository.d.ts +23 -0
  269. package/bundles/types/shared/services/instrumentation/repositories/error.repository.d.ts.map +1 -0
  270. package/bundles/types/shared/services/instrumentation/repositories/event.repository.d.ts +15 -0
  271. package/bundles/types/shared/services/instrumentation/repositories/event.repository.d.ts.map +1 -0
  272. package/bundles/types/shared/services/instrumentation/repositories/index.d.ts +4 -0
  273. package/bundles/types/shared/services/instrumentation/repositories/index.d.ts.map +1 -0
  274. package/{lib → bundles/types}/vault-display-widget/index.d.ts +1 -0
  275. package/bundles/types/vault-display-widget/index.d.ts.map +1 -0
  276. package/{lib → bundles/types}/vault-display-widget/vault-display-widget.d.ts +1 -0
  277. package/bundles/types/vault-display-widget/vault-display-widget.d.ts.map +1 -0
  278. package/bundles/types/wallet-buttons/helpers/flypay-v2.helper.d.ts +6 -0
  279. package/bundles/types/wallet-buttons/helpers/flypay-v2.helper.d.ts.map +1 -0
  280. package/bundles/types/wallet-buttons/index-cba.d.ts +2 -0
  281. package/bundles/types/wallet-buttons/index-cba.d.ts.map +1 -0
  282. package/{lib → bundles/types}/wallet-buttons/index.d.ts +5 -0
  283. package/bundles/types/wallet-buttons/index.d.ts.map +1 -0
  284. package/{lib → bundles/types}/wallet-buttons/interfaces.d.ts +1 -0
  285. package/bundles/types/wallet-buttons/interfaces.d.ts.map +1 -0
  286. package/{lib → bundles/types}/wallet-buttons/wallet-buttons.d.ts +5 -4
  287. package/bundles/types/wallet-buttons/wallet-buttons.d.ts.map +1 -0
  288. package/bundles/types/wallet-buttons/wallet-cba-buttons.d.ts +330 -0
  289. package/bundles/types/wallet-buttons/wallet-cba-buttons.d.ts.map +1 -0
  290. package/{lib/wallet-buttons → bundles/types/wallet-buttons/wallet-services}/afterpay.wallet-service.d.ts +2 -1
  291. package/bundles/types/wallet-buttons/wallet-services/afterpay.wallet-service.d.ts.map +1 -0
  292. package/{lib/wallet-buttons → bundles/types/wallet-buttons/wallet-services}/apple.wallet-service.d.ts +4 -3
  293. package/bundles/types/wallet-buttons/wallet-services/apple.wallet-service.d.ts.map +1 -0
  294. package/{lib/wallet-buttons → bundles/types/wallet-buttons/wallet-services}/flypay-v2.wallet-service.d.ts +5 -5
  295. package/bundles/types/wallet-buttons/wallet-services/flypay-v2.wallet-service.d.ts.map +1 -0
  296. package/{lib/wallet-buttons → bundles/types/wallet-buttons/wallet-services}/flypay.wallet-service.d.ts +7 -6
  297. package/bundles/types/wallet-buttons/wallet-services/flypay.wallet-service.d.ts.map +1 -0
  298. package/{lib/wallet-buttons → bundles/types/wallet-buttons/wallet-services}/google.wallet-service.d.ts +5 -4
  299. package/bundles/types/wallet-buttons/wallet-services/google.wallet-service.d.ts.map +1 -0
  300. package/{lib/wallet-buttons → bundles/types/wallet-buttons/wallet-services}/mastercard.wallet-service.d.ts +1 -0
  301. package/bundles/types/wallet-buttons/wallet-services/mastercard.wallet-service.d.ts.map +1 -0
  302. package/{lib/wallet-buttons → bundles/types/wallet-buttons/wallet-services}/paypal.wallet-service.d.ts +2 -1
  303. package/bundles/types/wallet-buttons/wallet-services/paypal.wallet-service.d.ts.map +1 -0
  304. package/{lib/wallet-buttons → bundles/types/wallet-buttons/wallet-services}/stripe.wallet-service.d.ts +2 -1
  305. package/bundles/types/wallet-buttons/wallet-services/stripe.wallet-service.d.ts.map +1 -0
  306. package/{lib/wallet-buttons → bundles/types/wallet-buttons/wallet-services}/wallet-service.d.ts +5 -4
  307. package/bundles/types/wallet-buttons/wallet-services/wallet-service.d.ts.map +1 -0
  308. package/bundles/types/wallet-buttons-express/base.wallet-button-express.d.ts +195 -0
  309. package/bundles/types/wallet-buttons-express/base.wallet-button-express.d.ts.map +1 -0
  310. package/bundles/types/wallet-buttons-express/enum/event.enum.d.ts +10 -0
  311. package/bundles/types/wallet-buttons-express/enum/event.enum.d.ts.map +1 -0
  312. package/bundles/types/wallet-buttons-express/index.d.ts +131 -0
  313. package/bundles/types/wallet-buttons-express/index.d.ts.map +1 -0
  314. package/bundles/types/wallet-buttons-express/interfaces/base-event-data.interface.d.ts +6 -0
  315. package/bundles/types/wallet-buttons-express/interfaces/base-event-data.interface.d.ts.map +1 -0
  316. package/bundles/types/wallet-buttons-express/interfaces/base-gateway-config.interface.d.ts +6 -0
  317. package/bundles/types/wallet-buttons-express/interfaces/base-gateway-config.interface.d.ts.map +1 -0
  318. package/bundles/types/wallet-buttons-express/interfaces/base-wallet-meta.interface.d.ts +5 -0
  319. package/bundles/types/wallet-buttons-express/interfaces/base-wallet-meta.interface.d.ts.map +1 -0
  320. package/bundles/types/wallet-buttons-express/interfaces/charge-wallet-token-meta.interface.d.ts +14 -0
  321. package/bundles/types/wallet-buttons-express/interfaces/charge-wallet-token-meta.interface.d.ts.map +1 -0
  322. package/bundles/types/wallet-buttons-express/interfaces/on-click-event-data.interface.d.ts +6 -0
  323. package/bundles/types/wallet-buttons-express/interfaces/on-click-event-data.interface.d.ts.map +1 -0
  324. package/bundles/types/wallet-buttons-express/interfaces/on-close-event-data.interface.d.ts +6 -0
  325. package/bundles/types/wallet-buttons-express/interfaces/on-close-event-data.interface.d.ts.map +1 -0
  326. package/bundles/types/wallet-buttons-express/interfaces/on-error-event-data.interface.d.ts +6 -0
  327. package/bundles/types/wallet-buttons-express/interfaces/on-error-event-data.interface.d.ts.map +1 -0
  328. package/bundles/types/wallet-buttons-express/interfaces/on-payment-error-event-data.interface.d.ts +9 -0
  329. package/bundles/types/wallet-buttons-express/interfaces/on-payment-error-event-data.interface.d.ts.map +1 -0
  330. package/bundles/types/wallet-buttons-express/interfaces/on-payment-in-review-event-data.interface.d.ts +6 -0
  331. package/bundles/types/wallet-buttons-express/interfaces/on-payment-in-review-event-data.interface.d.ts.map +1 -0
  332. package/bundles/types/wallet-buttons-express/interfaces/on-payment-successful-event-data.interface.d.ts +11 -0
  333. package/bundles/types/wallet-buttons-express/interfaces/on-payment-successful-event-data.interface.d.ts.map +1 -0
  334. package/bundles/types/wallet-buttons-express/interfaces/on-unavailable-event-data.interface.d.ts +6 -0
  335. package/bundles/types/wallet-buttons-express/interfaces/on-unavailable-event-data.interface.d.ts.map +1 -0
  336. package/bundles/types/wallet-buttons-express/interfaces/wallet-capture-request.interface.d.ts +22 -0
  337. package/bundles/types/wallet-buttons-express/interfaces/wallet-capture-request.interface.d.ts.map +1 -0
  338. package/bundles/types/wallet-buttons-express/services/apple-pay/apple-pay.wallet-button-express.d.ts +50 -0
  339. package/bundles/types/wallet-buttons-express/services/apple-pay/apple-pay.wallet-button-express.d.ts.map +1 -0
  340. package/bundles/types/wallet-buttons-express/services/apple-pay/constants/apple-pay-button-style.constant.d.ts +3 -0
  341. package/bundles/types/wallet-buttons-express/services/apple-pay/constants/apple-pay-button-style.constant.d.ts.map +1 -0
  342. package/bundles/types/wallet-buttons-express/services/apple-pay/interfaces/apple-pay-gateway-config.interface.d.ts +6 -0
  343. package/bundles/types/wallet-buttons-express/services/apple-pay/interfaces/apple-pay-gateway-config.interface.d.ts.map +1 -0
  344. package/bundles/types/wallet-buttons-express/services/apple-pay/interfaces/apple-pay-wallet-meta.interface.d.ts +17 -0
  345. package/bundles/types/wallet-buttons-express/services/apple-pay/interfaces/apple-pay-wallet-meta.interface.d.ts.map +1 -0
  346. package/bundles/types/wallet-buttons-express/services/apple-pay/types/apple-pay-button-style.type.d.ts +2 -0
  347. package/bundles/types/wallet-buttons-express/services/apple-pay/types/apple-pay-button-style.type.d.ts.map +1 -0
  348. package/bundles/types/wallet-buttons-express/services/apple-pay/types/apple-pay-button-type.type.d.ts +2 -0
  349. package/bundles/types/wallet-buttons-express/services/apple-pay/types/apple-pay-button-type.type.d.ts.map +1 -0
  350. package/bundles/types/wallet-buttons-express/services/paypal/interfaces/paypal-gateway-config.interface.d.ts +4 -0
  351. package/bundles/types/wallet-buttons-express/services/paypal/interfaces/paypal-gateway-config.interface.d.ts.map +1 -0
  352. package/bundles/types/wallet-buttons-express/services/paypal/interfaces/paypal-wallet-meta.interface.d.ts +31 -0
  353. package/bundles/types/wallet-buttons-express/services/paypal/interfaces/paypal-wallet-meta.interface.d.ts.map +1 -0
  354. package/bundles/types/wallet-buttons-express/services/paypal/paypal.wallet-button-express.d.ts +47 -0
  355. package/bundles/types/wallet-buttons-express/services/paypal/paypal.wallet-button-express.d.ts.map +1 -0
  356. package/{lib → bundles/types}/widget/configuration.d.ts +2 -1
  357. package/bundles/types/widget/configuration.d.ts.map +1 -0
  358. package/{lib → bundles/types}/widget/html-multi-widget.d.ts +6 -4
  359. package/bundles/types/widget/html-multi-widget.d.ts.map +1 -0
  360. package/{lib → bundles/types}/widget/html-widget.d.ts +1 -0
  361. package/bundles/types/widget/html-widget.d.ts.map +1 -0
  362. package/{lib → bundles/types}/widget/index.d.ts +2 -1
  363. package/bundles/types/widget/index.d.ts.map +1 -0
  364. package/{lib → bundles/types}/widget/meta.d.ts +1 -0
  365. package/bundles/types/widget/meta.d.ts.map +1 -0
  366. package/{lib → bundles/types}/widget/multi-widget.d.ts +2 -1
  367. package/bundles/types/widget/multi-widget.d.ts.map +1 -0
  368. package/{lib → bundles/types}/widget/style.d.ts +1 -0
  369. package/bundles/types/widget/style.d.ts.map +1 -0
  370. package/bundles/widget.umd.js +33407 -9468
  371. package/bundles/widget.umd.js.d.ts +4021 -0
  372. package/bundles/widget.umd.js.min.d.ts +4021 -0
  373. package/bundles/widget.umd.min.js +61 -1
  374. package/docs/api-canvas3ds.md +158 -0
  375. package/docs/api-checkout-button.md +912 -0
  376. package/docs/api-examples.md +65 -0
  377. package/docs/api-ps-widget.md +585 -0
  378. package/docs/api-vault-display.md +94 -0
  379. package/docs/api-widget.md +2499 -0
  380. package/docs/api-wrapper.md +78 -0
  381. package/docs/canvas3ds-examples.md +242 -0
  382. package/docs/cba-header.md +13 -0
  383. package/docs/cba-license.md +2 -0
  384. package/docs/checkout-examples.md +248 -0
  385. package/docs/click-to-pay-examples.md +267 -0
  386. package/docs/click-to-pay.md +339 -0
  387. package/docs/header.md +15 -0
  388. package/docs/html/layout.html +79 -0
  389. package/docs/html/marked.js +23 -0
  390. package/docs/html/style.css +365 -0
  391. package/docs/install/npm.content.md +16 -0
  392. package/docs/install/npm.example.md +24 -0
  393. package/docs/install/umd.content.md +20 -0
  394. package/docs/install/umd.example.md +6 -0
  395. package/docs/install.md +43 -0
  396. package/docs/install.readme.t.md +17 -0
  397. package/docs/install.slate.t.md +17 -0
  398. package/docs/license.md +2 -0
  399. package/docs/partials/header.hbs +3 -0
  400. package/docs/paypal-data-collector-examples.md +58 -0
  401. package/docs/paypal-data-collector.md +149 -0
  402. package/docs/paypal-save-payment-source-examples.md +63 -0
  403. package/docs/paypal-save-payment-source.md +256 -0
  404. package/docs/ps-examples.md +129 -0
  405. package/docs/vault-display-example.md +132 -0
  406. package/docs/wallet-buttons-examples.md +636 -0
  407. package/docs/wallet-buttons-express-examples.md +201 -0
  408. package/docs/wallet-buttons-express.md +786 -0
  409. package/docs/wallet-buttons.md +622 -0
  410. package/docs/wallet-cba-buttons-examples.md +388 -0
  411. package/docs/widget-examples.md +134 -0
  412. package/examples/multi-html-widget/simple.html +2 -1
  413. package/package.json +208 -80
  414. package/slate.md +227 -191
  415. package/.nvmrc +0 -1
  416. package/api.d.ts +0 -1
  417. package/api.js +0 -1
  418. package/canvas3ds.d.ts +0 -1
  419. package/canvas3ds.js +0 -1
  420. package/checkout-button.d.ts +0 -1
  421. package/checkout-button.js +0 -1
  422. package/inicialization-guide.md +0 -7
  423. package/lib/api/api-base.d.ts +0 -40
  424. package/lib/api/api-base.js +0 -101
  425. package/lib/api/api-base.js.map +0 -1
  426. package/lib/api/api-charge-internal.js +0 -30
  427. package/lib/api/api-charge-internal.js.map +0 -1
  428. package/lib/api/api-charge.js +0 -49
  429. package/lib/api/api-charge.js.map +0 -1
  430. package/lib/api/api-internal.js +0 -13
  431. package/lib/api/api-internal.js.map +0 -1
  432. package/lib/api/api-service-internal.js +0 -18
  433. package/lib/api/api-service-internal.js.map +0 -1
  434. package/lib/api/api.js +0 -62
  435. package/lib/api/api.js.map +0 -1
  436. package/lib/api/index.d.ts +0 -1
  437. package/lib/api/index.js +0 -2
  438. package/lib/api/index.js.map +0 -1
  439. package/lib/canvas-3ds/canvas-3ds.js +0 -157
  440. package/lib/canvas-3ds/canvas-3ds.js.map +0 -1
  441. package/lib/canvas-3ds/index.js +0 -2
  442. package/lib/canvas-3ds/index.js.map +0 -1
  443. package/lib/canvas-3ds/services/gpayments-service.js +0 -181
  444. package/lib/canvas-3ds/services/gpayments-service.js.map +0 -1
  445. package/lib/canvas-3ds/services/index.js +0 -2
  446. package/lib/canvas-3ds/services/index.js.map +0 -1
  447. package/lib/canvas-3ds/services/standalone3ds-service.js +0 -32
  448. package/lib/canvas-3ds/services/standalone3ds-service.js.map +0 -1
  449. package/lib/checkout-button/afterpay/afterpay-checkout-button.js +0 -50
  450. package/lib/checkout-button/afterpay/afterpay-checkout-button.js.map +0 -1
  451. package/lib/checkout-button/afterpay/afterpay.runner.js +0 -41
  452. package/lib/checkout-button/afterpay/afterpay.runner.js.map +0 -1
  453. package/lib/checkout-button/checkout-button.interface.js +0 -45
  454. package/lib/checkout-button/checkout-button.interface.js.map +0 -1
  455. package/lib/checkout-button/checkout-button.js +0 -266
  456. package/lib/checkout-button/checkout-button.js.map +0 -1
  457. package/lib/checkout-button/checkout-contextual-handler.js +0 -75
  458. package/lib/checkout-button/checkout-contextual-handler.js.map +0 -1
  459. package/lib/checkout-button/index.js +0 -85
  460. package/lib/checkout-button/index.js.map +0 -1
  461. package/lib/checkout-button/paypal/paypal-checkout-button.js +0 -25
  462. package/lib/checkout-button/paypal/paypal-checkout-button.js.map +0 -1
  463. package/lib/checkout-button/paypal/paypal.runner.js +0 -14
  464. package/lib/checkout-button/paypal/paypal.runner.js.map +0 -1
  465. package/lib/checkout-button/runner/base.runner.js +0 -13
  466. package/lib/checkout-button/runner/base.runner.js.map +0 -1
  467. package/lib/checkout-button/runner/contextual.runner.js +0 -40
  468. package/lib/checkout-button/runner/contextual.runner.js.map +0 -1
  469. package/lib/checkout-button/runner/index.js +0 -11
  470. package/lib/checkout-button/runner/index.js.map +0 -1
  471. package/lib/checkout-button/runner/popup.runner.js +0 -68
  472. package/lib/checkout-button/runner/popup.runner.js.map +0 -1
  473. package/lib/checkout-button/runner/redirect.runner.js +0 -15
  474. package/lib/checkout-button/runner/redirect.runner.js.map +0 -1
  475. package/lib/checkout-button/zipmoney/zipmoney-checkout-button.js +0 -64
  476. package/lib/checkout-button/zipmoney/zipmoney-checkout-button.js.map +0 -1
  477. package/lib/checkout-button/zipmoney/zipmoney-contextual.runner.js +0 -78
  478. package/lib/checkout-button/zipmoney/zipmoney-contextual.runner.js.map +0 -1
  479. package/lib/checkout-button/zipmoney/zipmoney-redirect.runner.js +0 -49
  480. package/lib/checkout-button/zipmoney/zipmoney-redirect.runner.js.map +0 -1
  481. package/lib/checkout-button/zipmoney/zipmoney.config.js +0 -4
  482. package/lib/checkout-button/zipmoney/zipmoney.config.js.map +0 -1
  483. package/lib/checkout-button/zipmoney/zipmoney.runner.js +0 -23
  484. package/lib/checkout-button/zipmoney/zipmoney.runner.js.map +0 -1
  485. package/lib/checkout-button/zipmoney/zipmoney.types.js +0 -1
  486. package/lib/checkout-button/zipmoney/zipmoney.types.js.map +0 -1
  487. package/lib/components/ability-guard.js +0 -44
  488. package/lib/components/ability-guard.js.map +0 -1
  489. package/lib/components/background.js +0 -193
  490. package/lib/components/background.js.map +0 -1
  491. package/lib/components/container.js +0 -63
  492. package/lib/components/container.js.map +0 -1
  493. package/lib/components/dispatcher.js +0 -39
  494. package/lib/components/dispatcher.js.map +0 -1
  495. package/lib/components/element-style.js +0 -52
  496. package/lib/components/element-style.js.map +0 -1
  497. package/lib/components/flypay-iframe-event.js +0 -28
  498. package/lib/components/flypay-iframe-event.js.map +0 -1
  499. package/lib/components/form-Interceptor.js +0 -38
  500. package/lib/components/form-Interceptor.js.map +0 -1
  501. package/lib/components/http-core.js +0 -57
  502. package/lib/components/http-core.js.map +0 -1
  503. package/lib/components/iframe-event.js +0 -75
  504. package/lib/components/iframe-event.js.map +0 -1
  505. package/lib/components/iframe.js +0 -62
  506. package/lib/components/iframe.js.map +0 -1
  507. package/lib/components/link.js +0 -59
  508. package/lib/components/link.js.map +0 -1
  509. package/lib/components/loader.js +0 -234
  510. package/lib/components/loader.js.map +0 -1
  511. package/lib/components/param.js +0 -147
  512. package/lib/components/param.js.map +0 -1
  513. package/lib/components/popup.js +0 -104
  514. package/lib/components/popup.js.map +0 -1
  515. package/lib/components/storage-dispatcher.js +0 -75
  516. package/lib/components/storage-dispatcher.js.map +0 -1
  517. package/lib/components/trigger.js +0 -49
  518. package/lib/components/trigger.js.map +0 -1
  519. package/lib/components/vault-display-iframe-event.js +0 -27
  520. package/lib/components/vault-display-iframe-event.js.map +0 -1
  521. package/lib/components/wallet-background.js +0 -63
  522. package/lib/components/wallet-background.js.map +0 -1
  523. package/lib/components/wallet-trigger.js +0 -27
  524. package/lib/components/wallet-trigger.js.map +0 -1
  525. package/lib/configs/env/env.js +0 -117
  526. package/lib/configs/env/env.js.map +0 -1
  527. package/lib/configs/sdk.js +0 -16
  528. package/lib/configs/sdk.js.map +0 -1
  529. package/lib/constants/validators.js +0 -42
  530. package/lib/constants/validators.js.map +0 -1
  531. package/lib/external-checkout/builder.js +0 -45
  532. package/lib/external-checkout/builder.js.map +0 -1
  533. package/lib/external-checkout/checker.js +0 -22
  534. package/lib/external-checkout/checker.js.map +0 -1
  535. package/lib/external-checkout/index.d.ts +0 -2
  536. package/lib/external-checkout/index.js +0 -3
  537. package/lib/external-checkout/index.js.map +0 -1
  538. package/lib/helper/access-token.js +0 -44
  539. package/lib/helper/access-token.js.map +0 -1
  540. package/lib/helper/browser.js +0 -79
  541. package/lib/helper/browser.js.map +0 -1
  542. package/lib/helper/event-emitter.js +0 -23
  543. package/lib/helper/event-emitter.js.map +0 -1
  544. package/lib/helper/event.js +0 -23
  545. package/lib/helper/event.js.map +0 -1
  546. package/lib/helper/ms.js +0 -32
  547. package/lib/helper/ms.js.map +0 -1
  548. package/lib/helper/object.js +0 -6
  549. package/lib/helper/object.js.map +0 -1
  550. package/lib/helper/url.js +0 -11
  551. package/lib/helper/url.js.map +0 -1
  552. package/lib/helper/uuid.js +0 -26
  553. package/lib/helper/uuid.js.map +0 -1
  554. package/lib/index.d.ts +0 -15
  555. package/lib/index.js +0 -15
  556. package/lib/index.js.map +0 -1
  557. package/lib/payment-source/builder.js +0 -49
  558. package/lib/payment-source/builder.js.map +0 -1
  559. package/lib/payment-source/index.js +0 -2
  560. package/lib/payment-source/index.js.map +0 -1
  561. package/lib/payment-source-widget/html-payment-source-widget.js +0 -172
  562. package/lib/payment-source-widget/html-payment-source-widget.js.map +0 -1
  563. package/lib/payment-source-widget/index.js +0 -35
  564. package/lib/payment-source-widget/index.js.map +0 -1
  565. package/lib/payment-source-widget/interfaces.js +0 -2
  566. package/lib/payment-source-widget/interfaces.js.map +0 -1
  567. package/lib/payment-source-widget/payment-source-widget.js +0 -142
  568. package/lib/payment-source-widget/payment-source-widget.js.map +0 -1
  569. package/lib/secure-remote-commerce/index.d.ts +0 -1
  570. package/lib/secure-remote-commerce/index.js +0 -2
  571. package/lib/secure-remote-commerce/index.js.map +0 -1
  572. package/lib/secure-remote-commerce/interfaces.d.ts +0 -71
  573. package/lib/secure-remote-commerce/interfaces.js +0 -28
  574. package/lib/secure-remote-commerce/interfaces.js.map +0 -1
  575. package/lib/secure-remote-commerce/providers/src-provider.js +0 -1
  576. package/lib/secure-remote-commerce/providers/src-provider.js.map +0 -1
  577. package/lib/secure-remote-commerce/providers/visa-src/helper.d.ts +0 -7
  578. package/lib/secure-remote-commerce/providers/visa-src/helper.js +0 -36
  579. package/lib/secure-remote-commerce/providers/visa-src/helper.js.map +0 -1
  580. package/lib/secure-remote-commerce/providers/visa-src/index.d.ts +0 -1
  581. package/lib/secure-remote-commerce/providers/visa-src/index.js +0 -2
  582. package/lib/secure-remote-commerce/providers/visa-src/index.js.map +0 -1
  583. package/lib/secure-remote-commerce/providers/visa-src/visa-src.js +0 -113
  584. package/lib/secure-remote-commerce/providers/visa-src/visa-src.js.map +0 -1
  585. package/lib/secure-remote-commerce/providers/visa-src/visa-src.styles.d.ts +0 -8
  586. package/lib/secure-remote-commerce/providers/visa-src/visa-src.styles.js +0 -10
  587. package/lib/secure-remote-commerce/providers/visa-src/visa-src.styles.js.map +0 -1
  588. package/lib/secure-remote-commerce/secure-remote-commerce.d.ts +0 -163
  589. package/lib/secure-remote-commerce/secure-remote-commerce.js +0 -239
  590. package/lib/secure-remote-commerce/secure-remote-commerce.js.map +0 -1
  591. package/lib/vault-display-widget/index.js +0 -14
  592. package/lib/vault-display-widget/index.js.map +0 -1
  593. package/lib/vault-display-widget/vault-display-widget.js +0 -99
  594. package/lib/vault-display-widget/vault-display-widget.js.map +0 -1
  595. package/lib/wallet-buttons/afterpay.wallet-service.js +0 -152
  596. package/lib/wallet-buttons/afterpay.wallet-service.js.map +0 -1
  597. package/lib/wallet-buttons/apple.wallet-service.js +0 -324
  598. package/lib/wallet-buttons/apple.wallet-service.js.map +0 -1
  599. package/lib/wallet-buttons/flypay-v2.wallet-service.js +0 -165
  600. package/lib/wallet-buttons/flypay-v2.wallet-service.js.map +0 -1
  601. package/lib/wallet-buttons/flypay.wallet-service.js +0 -117
  602. package/lib/wallet-buttons/flypay.wallet-service.js.map +0 -1
  603. package/lib/wallet-buttons/google.wallet-service.js +0 -301
  604. package/lib/wallet-buttons/google.wallet-service.js.map +0 -1
  605. package/lib/wallet-buttons/helpers/flypay-v2.helper.d.ts +0 -3
  606. package/lib/wallet-buttons/helpers/flypay-v2.helper.js +0 -151
  607. package/lib/wallet-buttons/helpers/flypay-v2.helper.js.map +0 -1
  608. package/lib/wallet-buttons/index.js +0 -128
  609. package/lib/wallet-buttons/index.js.map +0 -1
  610. package/lib/wallet-buttons/interfaces.js +0 -1
  611. package/lib/wallet-buttons/interfaces.js.map +0 -1
  612. package/lib/wallet-buttons/mastercard.wallet-service.js +0 -27
  613. package/lib/wallet-buttons/mastercard.wallet-service.js.map +0 -1
  614. package/lib/wallet-buttons/paypal.wallet-service.js +0 -144
  615. package/lib/wallet-buttons/paypal.wallet-service.js.map +0 -1
  616. package/lib/wallet-buttons/stripe.wallet-service.js +0 -100
  617. package/lib/wallet-buttons/stripe.wallet-service.js.map +0 -1
  618. package/lib/wallet-buttons/wallet-buttons.js +0 -479
  619. package/lib/wallet-buttons/wallet-buttons.js.map +0 -1
  620. package/lib/wallet-buttons/wallet-service.js +0 -60
  621. package/lib/wallet-buttons/wallet-service.js.map +0 -1
  622. package/lib/widget/configuration.js +0 -260
  623. package/lib/widget/configuration.js.map +0 -1
  624. package/lib/widget/html-multi-widget.js +0 -422
  625. package/lib/widget/html-multi-widget.js.map +0 -1
  626. package/lib/widget/html-widget.js +0 -127
  627. package/lib/widget/html-widget.js.map +0 -1
  628. package/lib/widget/index.js +0 -132
  629. package/lib/widget/index.js.map +0 -1
  630. package/lib/widget/meta.js +0 -8
  631. package/lib/widget/meta.js.map +0 -1
  632. package/lib/widget/multi-widget.js +0 -437
  633. package/lib/widget/multi-widget.js.map +0 -1
  634. package/lib/widget/style.js +0 -204
  635. package/lib/widget/style.js.map +0 -1
  636. package/payment-source-widget.d.ts +0 -1
  637. package/payment-source-widget.js +0 -1
  638. package/tslint.json +0 -129
  639. package/typings/globals/@auspayplus/open-payments-checkout/index.d.ts +0 -43
  640. package/typings/globals/jasmine/index.d.ts +0 -576
  641. package/typings/globals/jasmine-ajax/index.d.ts +0 -83
  642. package/typings/globals/jquery/index.d.ts +0 -3759
  643. package/typings/index.d.ts +0 -4
  644. package/vault-display-widget.d.ts +0 -1
  645. package/vault-display-widget.js +0 -1
  646. package/vendors/zipmoney.d.ts +0 -18
  647. package/vendors/zipmoney.js +0 -2
  648. package/widget.d.ts +0 -1
  649. package/widget.js +0 -1
@@ -1,181 +0,0 @@
1
- import { Container } from "../../components/container";
2
- import { IFrame } from "../../components/iframe";
3
- import { EVENT, IFrameEvent } from "../../components/iframe-event";
4
- const hiddenStyle = {
5
- visibility: "hidden",
6
- border: "0",
7
- width: "0",
8
- height: "0",
9
- };
10
- export var PROCESS_STANDALONE_3DS_STATUS;
11
- (function (PROCESS_STANDALONE_3DS_STATUS) {
12
- PROCESS_STANDALONE_3DS_STATUS["SUCCESS"] = "success";
13
- PROCESS_STANDALONE_3DS_STATUS["ERROR"] = "error";
14
- PROCESS_STANDALONE_3DS_STATUS["PENDING"] = "pending";
15
- })(PROCESS_STANDALONE_3DS_STATUS || (PROCESS_STANDALONE_3DS_STATUS = {}));
16
- export const GPAYMENTS_EVENT = {
17
- AUTH_SUCCESS: 'chargeAuthSuccess',
18
- AUTH_ERROR: 'chargeAuthReject',
19
- DECOUPLED: 'chargeAuthDecoupled',
20
- CHALLENGE: 'chargeAuthChallenge',
21
- INFO: 'chargeAuthInfo',
22
- ERROR: 'error',
23
- };
24
- const AUTH_STATUS = {
25
- REJECTED: 'rejected',
26
- };
27
- export class GPaymentsService {
28
- constructor(container, api, eventEmitter) {
29
- this.container = container;
30
- this.api = api;
31
- this.eventEmitter = eventEmitter;
32
- this.resultRead = false;
33
- this.iFrameEvent = new IFrameEvent(window);
34
- }
35
- load({ initialization_url, secondary_url, charge_3ds_id }, title) {
36
- try {
37
- this.setupIFrameEvents(charge_3ds_id);
38
- this.initializeIFrames(initialization_url, secondary_url, title);
39
- }
40
- catch (err) {
41
- this.eventEmitter.emit(GPAYMENTS_EVENT.ERROR, this.parseError(err, charge_3ds_id));
42
- }
43
- }
44
- initializeIFrames(initializationUrl, secondaryUrl, title, hideAuthorization = true) {
45
- const container = this.container.getElement();
46
- if (!container)
47
- return;
48
- let divAuthorization = document.createElement("div");
49
- divAuthorization.setAttribute("id", "paydock_authorization_iframe");
50
- container.appendChild(divAuthorization);
51
- this.browserAndChallengeContainer = new Container("#paydock_authorization_iframe");
52
- this.iFrameAuthorization = new IFrame(this.browserAndChallengeContainer);
53
- this.iFrameAuthorization.load(initializationUrl, { title });
54
- if (secondaryUrl) {
55
- let divSecondaryURL = document.createElement("div");
56
- divSecondaryURL.setAttribute("id", "paydock_secondary_iframe");
57
- container.appendChild(divSecondaryURL);
58
- this.monitoringContainer = new Container("#paydock_secondary_iframe");
59
- this.iFrameSecondaryUrl = new IFrame(this.monitoringContainer);
60
- this.iFrameSecondaryUrl.load(secondaryUrl, { title });
61
- }
62
- else {
63
- this.iFrameSecondaryUrl = undefined;
64
- }
65
- this.hideIframes(hideAuthorization);
66
- }
67
- hideIframes(hideAuthorization = true) {
68
- var _a;
69
- for (const prop in hiddenStyle) {
70
- if (!hiddenStyle.hasOwnProperty(prop))
71
- continue;
72
- if (hideAuthorization)
73
- this.iFrameAuthorization.setStyle(prop, hiddenStyle[prop]);
74
- (_a = this.iFrameSecondaryUrl) === null || _a === void 0 ? void 0 : _a.setStyle(prop, hiddenStyle[prop]);
75
- }
76
- }
77
- setupIFrameEvents(widgetId) {
78
- this.iFrameEvent.on(EVENT.CHARGE_AUTH, widgetId, (data) => {
79
- if (data.status === "MethodSkipped" /* SKIPPED */ || data.status === "MethodFinished" /* FINISHED */) {
80
- if (data.info)
81
- this.eventEmitter.emit(GPAYMENTS_EVENT.INFO, { info: data.info });
82
- this.performAuthentication(data);
83
- }
84
- else if (data.status === "AuthTimedOut" /* TIMEOUT */ || data.status === "invalid_event" /* INVALID */)
85
- this.eventEmitter.emit(GPAYMENTS_EVENT.AUTH_ERROR, this.parseHandleResponse({ status: data.status }, data.charge_3ds_id));
86
- });
87
- this.iFrameEvent.on(EVENT.CHARGE_AUTH_SUCCESS, widgetId, (data) => {
88
- this.processResult(data.charge_3ds_id);
89
- });
90
- }
91
- parseResultData({ status }, charge3dsId) {
92
- return {
93
- status,
94
- charge_3ds_id: charge3dsId,
95
- };
96
- }
97
- parseHandleResponse({ status, result }, charge3dsId) {
98
- return {
99
- status,
100
- charge_3ds_id: charge3dsId,
101
- result: {
102
- description: result === null || result === void 0 ? void 0 : result.description,
103
- },
104
- };
105
- }
106
- parseError(data, charge3dsId) {
107
- return { charge_3ds_id: charge3dsId, error: data };
108
- }
109
- processResult(charge3dsId) {
110
- if (this.resultRead)
111
- return;
112
- this.resultRead = true;
113
- this.api.charge().standalone3dsHandle().then((result) => {
114
- var _a;
115
- this.iFrameAuthorization.remove();
116
- (_a = this.iFrameSecondaryUrl) === null || _a === void 0 ? void 0 : _a.remove();
117
- if (result.status === PROCESS_STANDALONE_3DS_STATUS.SUCCESS)
118
- this.eventEmitter.emit(GPAYMENTS_EVENT.AUTH_SUCCESS, this.parseResultData(result, charge3dsId));
119
- else
120
- this.eventEmitter.emit(GPAYMENTS_EVENT.AUTH_ERROR, this.parseResultData(result, charge3dsId));
121
- }, (err) => {
122
- this.eventEmitter.emit(GPAYMENTS_EVENT.ERROR, this.parseError(err, charge3dsId));
123
- });
124
- }
125
- externalAPI(method, url) {
126
- let request = new XMLHttpRequest();
127
- request.open(method, url, true);
128
- return new Promise((resolve, reject) => {
129
- request.onload = () => {
130
- try {
131
- const body = JSON.parse(request.responseText);
132
- resolve(body);
133
- }
134
- catch (error) {
135
- reject(error);
136
- }
137
- };
138
- request.send();
139
- });
140
- }
141
- doPolling(url, charge3dsId) {
142
- this.externalAPI("GET", url).then((data) => {
143
- if (!data.event || data.event === "AuthResultNotReady")
144
- setTimeout(() => {
145
- this.doPolling(url, charge3dsId);
146
- }, 2000);
147
- else if (data.event === 'AuthResultReady')
148
- this.processResult(charge3dsId);
149
- else
150
- throw new Error("Event not supported");
151
- }).catch((err) => this.eventEmitter.emit(GPAYMENTS_EVENT.ERROR, this.parseError(err, charge3dsId)));
152
- }
153
- performAuthentication({ charge_3ds_id }) {
154
- var _a;
155
- this.iFrameAuthorization.remove();
156
- (_a = this.iFrameSecondaryUrl) === null || _a === void 0 ? void 0 : _a.remove();
157
- this.api.charge().standalone3dsProcess({ charge_3ds_id }).then((authenticationResult) => {
158
- var _a, _b;
159
- if (authenticationResult.status === "success" /* SUCCESS */)
160
- this.eventEmitter.emit(GPAYMENTS_EVENT.AUTH_SUCCESS, this.parseHandleResponse(authenticationResult, charge_3ds_id));
161
- else if (authenticationResult.status === "pending" /* PENDING */) {
162
- if ((_a = authenticationResult === null || authenticationResult === void 0 ? void 0 : authenticationResult.result) === null || _a === void 0 ? void 0 : _a.challenge) {
163
- this.eventEmitter.emit(GPAYMENTS_EVENT.CHALLENGE, this.parseHandleResponse(authenticationResult, charge_3ds_id));
164
- this.initializeIFrames(authenticationResult.result.challenge_url, undefined, 'Authentication Challenge', false);
165
- if (authenticationResult.result.secondary_url)
166
- this.doPolling(authenticationResult.result.secondary_url, charge_3ds_id);
167
- }
168
- else if ((_b = authenticationResult === null || authenticationResult === void 0 ? void 0 : authenticationResult.result) === null || _b === void 0 ? void 0 : _b.decoupled_challenge) {
169
- this.eventEmitter.emit(GPAYMENTS_EVENT.DECOUPLED, this.parseHandleResponse(authenticationResult, charge_3ds_id));
170
- if (authenticationResult.result.secondary_url)
171
- this.doPolling(authenticationResult.result.secondary_url, charge_3ds_id);
172
- }
173
- }
174
- else
175
- return this.eventEmitter.emit(GPAYMENTS_EVENT.AUTH_ERROR, this.parseHandleResponse(authenticationResult, charge_3ds_id));
176
- }, (err) => {
177
- this.eventEmitter.emit(GPAYMENTS_EVENT.ERROR, this.parseError(err, charge_3ds_id));
178
- });
179
- }
180
- }
181
- //# sourceMappingURL=../../../src/lib/canvas-3ds/services/gpayments-service.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"gpayments-service.js","sourceRoot":"","sources":["../../../canvas-3ds/services/gpayments-service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAKnE,MAAM,WAAW,GAAG;IAChB,UAAU,EAAE,QAAQ;IACpB,MAAM,EAAE,GAAG;IACX,KAAK,EAAE,GAAG;IACV,MAAM,EAAE,GAAG;CACd,CAAC;AAEF,MAAM,CAAN,IAAY,6BAIX;AAJD,WAAY,6BAA6B;IACrC,oDAAmB,CAAA;IACnB,gDAAe,CAAA;IACf,oDAAmB,CAAA;AACvB,CAAC,EAJW,6BAA6B,KAA7B,6BAA6B,QAIxC;AA6BD,MAAM,CAAC,MAAM,eAAe,GAAG;IAC3B,YAAY,EAAE,mBAAmB;IACjC,UAAU,EAAE,kBAAkB;IAC9B,SAAS,EAAE,qBAAqB;IAChC,SAAS,EAAE,qBAAqB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AG,EAAE,aAAa,CAAC,CAAC,CAAC;QACvF,CAAC,CAAC,CAAC;IACP,CAAC;CACJ"}
@@ -1,2 +0,0 @@
1
- export { Standalone3dsService } from "./standalone3ds-service";
2
- //# sourceMappingURL=../../../src/lib/canvas-3ds/services/index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../canvas-3ds/services/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC"}
@@ -1,32 +0,0 @@
1
- import { GPaymentsService } from "./gpayments-service";
2
- import { AccessToken } from "../../helper/access-token";
3
- import { ApiInternal, API_AUTH_TYPE } from "../../api/api-internal";
4
- import { DEFAULT_ENV } from '../../configs/env/env';
5
- const STANDALONE_3DS_GATEWAYS = {
6
- GPAYMENTS: "GPayments",
7
- };
8
- export class Standalone3dsService {
9
- constructor(container, eventEmitter) {
10
- this.env = DEFAULT_ENV;
11
- this.container = container;
12
- this.eventEmitter = eventEmitter;
13
- }
14
- load(token, options) {
15
- const parsedToken = AccessToken.validateJWT(token);
16
- if (!parsedToken)
17
- throw new Error("Invalid charge token");
18
- const tokenData = AccessToken.extractData(parsedToken.body);
19
- const api = new ApiInternal(token, API_AUTH_TYPE.TOKEN);
20
- api.setEnv(this.env, this.alias);
21
- switch (tokenData.service_type) {
22
- case STANDALONE_3DS_GATEWAYS.GPAYMENTS:
23
- new GPaymentsService(this.container, api, this.eventEmitter).load(tokenData, options.title);
24
- break;
25
- }
26
- }
27
- setEnv(env, alias) {
28
- this.env = env;
29
- this.alias = alias;
30
- }
31
- }
32
- //# sourceMappingURL=../../../src/lib/canvas-3ds/services/standalone3ds-service.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"standalone3ds-service.js","sourceRoot":"","sources":["../../../canvas-3ds/services/standalone3ds-service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,WAA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1
- import { CheckoutButton } from '../checkout-button';
2
- import { GATEWAY_TYPE } from '../checkout-button.interface';
3
- import { Browser } from '../../helper/browser';
4
- /**
5
- * Class AfterpayCheckoutButton is wrapper of CheckoutButton transform usual button into checkout
6
- *
7
- * @extends CheckoutButton
8
- *
9
- * @constructor
10
- *
11
- * @param {string} selector - Selector of html element.
12
- * @param {string} accessToken - PayDock access-token or users public key
13
- * @param {string} [gatewayId=default] - PayDock's gatewayId. By default or if put 'default', it will use the selected default gateway
14
- * @example
15
- * var widget = new AfterpayCheckoutButton('#button', 'access-token','gatewayId');
16
- */
17
- class AfterpayCheckoutButton extends CheckoutButton {
18
- /** @constructs */ // constructs added for correct parse classes jsdoc2md
19
- constructor(selector, accessToken, gatewayId = 'default') {
20
- super(selector, accessToken, gatewayId, GATEWAY_TYPE.AFTERPAY);
21
- this.accessToken = accessToken;
22
- this.gatewayId = gatewayId;
23
- this.showETP = false;
24
- }
25
- /**
26
- * Method which toggles the "Enhanced Tracking Protection" warning popup to 'on' mode.
27
- *
28
- * This popup with a warning about "Enhanced Tracking Protection" limitations
29
- * would be shown in the Mozilla Firefox browser version 100+
30
- *
31
- * By default, the popup would not be shown, until
32
- * the flag would be set to `true`
33
-
34
- * @param {doShow} boolean - flag which toggle the popup visibility
35
- */
36
- showEnhancedTrackingProtectionPopup(doShow) {
37
- const { name, version } = Browser.getBrowserInfo();
38
- if (doShow && name === 'Firefox' && +version >= 100)
39
- this.showETP = true;
40
- }
41
- buildAdditionalParams() {
42
- const params = super.buildAdditionalParams();
43
- if (this.showETP) {
44
- params.show_etp = true;
45
- }
46
- return params;
47
- }
48
- }
49
- export { AfterpayCheckoutButton };
50
- //# sourceMappingURL=../../../src/lib/checkout-button/afterpay/afterpay-checkout-button.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"afterpay-checkout-button.js","sourceRoot":"","sources":["../../../checkout-button/afterpay/afterpay-checkout-button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAG/C;;;;;;;;;;;;GAYG;AACH,MAAM,sBAAuB,SAAQ,cAAc;IAG/C,kBAAkB,CAAC,sDAAsD;IACzE,YAAY,QAAgB,EAAY,WAAmB,EAAY,YAAoB,SAAS;QAChG,KAAK,CAAC,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,YAAY,CAAC,QAAQ,CAAC,CAAC;QAD3B,gBAAW,GAAX,WAAW,CAAQ;QAAY,cAAS,GAAT,SAAS,CAAoB;QAH1F,YAAO,GAAG,KAAK,CAAC;IAK1B,CAAC;IAED;;;;;;;;;;OAUG;IACI,mCAAmC,CAAC,MAAe;QACtD,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC;QACnD,IAAI,MAAM,IAAI,IAAI,KAAK,SAAS,IAAI,CAAC,OAAO,IAAI,GAAG;YAC/C,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;IAC5B,CAAC;IAES,qBAAqB;QAC3B,MAAM,MAAM,GAAG,KAAK,CAAC,qBAAqB,EAAE,CAAC;QAC7C,IAAI,IAAI,CAAC,OAAO,EAAE;YACd,MAAM,CAAC,QAAQ,GAAG,IAAI,CAAC;SAC1B;QACD,OAAO,MAAM,CAAC;IAClB,CAAC;CACJ;AAED,OAAO,EAAE,sBAAsB,EAAE,CAAC"}
@@ -1,41 +0,0 @@
1
- import { PopupRunner } from '../runner';
2
- import { Browser } from '../../helper/browser';
3
- import { Url } from '../../helper/url';
4
- const REDIRECT_URI_SUCCESS = '/checkout/afterpay/merchant/{{merchant}}/success';
5
- const REDIRECT_URI_ERROR = '/checkout/afterpay/merchant/{{merchant}}/error';
6
- const CHECKOUT_URL = '/checkout/afterpay/init';
7
- export class AfterpayRunner extends PopupRunner {
8
- getSuccessRedirectUri() {
9
- return (this.widgetEnv.getConf().url +
10
- REDIRECT_URI_SUCCESS.replace('{{merchant}}', encodeURIComponent(window.btoa(window.location.href))));
11
- }
12
- getErrorRedirectUri() {
13
- return (this.widgetEnv.getConf().url + REDIRECT_URI_ERROR.replace('{{merchant}}', encodeURIComponent(window.btoa(window.location.href))));
14
- }
15
- next(checkoutData, params) {
16
- this.checkout = checkoutData;
17
- if (!Browser.isSupportPopUp())
18
- window.localStorage.setItem('paydock_checkout_token', JSON.stringify(this.checkout));
19
- this.popup.redirect(this.getRedirectUrl(this.checkout, params));
20
- }
21
- error(error, code, callback) {
22
- if (!code || (code && code !== 'invalid_amount'))
23
- return callback(true);
24
- this.popup.initError(error);
25
- return callback(false);
26
- }
27
- run() {
28
- if (this.isRunning())
29
- return;
30
- this.popup.setConfigs({
31
- width: 420,
32
- height: 715,
33
- });
34
- this.popup.init();
35
- this.background.initControl();
36
- }
37
- getRedirectUrl(checkout, params) {
38
- return (this.widgetEnv.getConf().url + CHECKOUT_URL + '?' + Url.serialize(Object.assign(Object.assign({}, params), { token: checkout.reference_id, env: checkout.mode === 'live' ? 'live' : 'test' })));
39
- }
40
- }
41
- //# sourceMappingURL=../../../src/lib/checkout-button/afterpay/afterpay.runner.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"afterpay.runner.js","sourceRoot":"","sources":["../../../checkout-button/afterpay/afterpay.runner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuC,WAAW,EAAE,MAAM,WAAW,CAAC;AAE7E,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAEvC,MAAM,oBAAoB,GAAG,kDAAkD,CAAC;AAChF,MAAM,kBAAkB,GAAG,gDAAgD,CAAC;AAC5E,MAAM,YAAY,GAAG,yBAAyB,CAAC;AAE/C,MAAM,OAAO,cAAe,SAAQ,WAAW;IACpC,qBAAqB;QACxB,OAAO,CACH,IAAI,CAAC,S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AAG;SACd,CAAC,CAAC;QAEH,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;QAClB,IAAI,CAAC,UAAU,CAAC,WAAW,EAAE,CAAC;IAClC,CAAC;IAES,cAAc,CAAC,QAAmB,EAAE,MAAyB;QACnE,OAAO,CACH,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC,GAAG,GAAG,YAAY,GAAG,GAAG,GAAG,GAAG,CAAC,SAAS,iCAC1D,MAAM,KACT,KAAK,EAAE,QAAQ,CAAC,YAAY,EAC5B,GAAG,EAAE,QAAQ,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,IACjD,CACL,CAAC;IACN,CAAC;CACJ"}
@@ -1,45 +0,0 @@
1
- /**
2
- * @type {object}
3
- * @param {string} CLICK=click
4
- * @param {string} POPUP_REDIRECT=popup_redirect
5
- * @param {string} ERROR=error
6
- * @param {string} ACCEPTED=accepted
7
- * @param {string} FINISH=finish
8
- * @param {string} CLOSE=close
9
- */
10
- export const CHECKOUT_BUTTON_EVENT = {
11
- CLICK: 'click',
12
- POPUP_REDIRECT: 'popupRedirect',
13
- REDIRECT: 'redirect',
14
- ERROR: 'error',
15
- REFERRED: 'referred',
16
- DECLINED: 'declined',
17
- CANCELLED: 'cancelled',
18
- ACCEPTED: 'accepted',
19
- FINISH: 'finish',
20
- CLOSE: 'close',
21
- };
22
- /**
23
- * @type {object}
24
- * @param {string} CONTEXTUAL=contextual
25
- * @param {string} REDIRECT=redirect
26
- */
27
- export var CHECKOUT_MODE;
28
- (function (CHECKOUT_MODE) {
29
- CHECKOUT_MODE["CONTEXTUAL"] = "contextual";
30
- CHECKOUT_MODE["REDIRECT"] = "redirect";
31
- })(CHECKOUT_MODE || (CHECKOUT_MODE = {}));
32
- /**
33
- * @type {object}
34
- * @param {string} ZIPMONEY=Zipmoney
35
- * @param {string} PAYPAL=PaypalClassic
36
- * @param {string} AFTERPAY=Afterpay
37
- */
38
- export var GATEWAY_TYPE;
39
- (function (GATEWAY_TYPE) {
40
- GATEWAY_TYPE["ZIPMONEY"] = "Zipmoney";
41
- GATEWAY_TYPE["PAYPAL"] = "PaypalClassic";
42
- GATEWAY_TYPE["AFTERPAY"] = "Afterpay";
43
- })(GATEWAY_TYPE || (GATEWAY_TYPE = {}));
44
- export const CHECKOUT_BTN_LOG_PREFIX = '[Paydock:CheckoutButton]';
45
- //# sourceMappingURL=../../src/lib/checkout-button/checkout-button.interface.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"checkout-button.interface.js","sourceRoot":"","sources":["../../checkout-button/checkout-button.interface.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACjC,KAAK,EAAE,OAAO;IACd,cAAc,EAAE,eAAe;IAC/B,QAAQ,EAAE,UAAU;IACpB,KAAK,EAAE,OAAO;IACd,QAAQ,EAAE,UAAU;IACpB,QAAQ,EAAE,UAAU;IACpB,SAAS,EAAE,WAAW;IACtB,QAAQ,EAAE,UAAU;IACpB,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,OAAO;CACjB,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAN,IAAY,aAGX;AAHD,WAAY,aAAa;IACrB,0CAAyB,CAAA;IACzB,sCAAqB,CAAA;AACzB,CAAC,EAHW,aAAa,KAAb,aAAa,QAGxB;AAED;;;;;GAKG;AACH,MAAM,CAAN,IAAY,YAIX;AAJD,WAAY,YAAY;IACpB,qCAAqB,CAAA;IACrB,wCAAwB,CAAA;IACxB,qCAAqB,CAAA;AACzB,CAAC,EAJW,YAAY,KAAZ,YAAY,QAIvB;AASD,MAAM,CAAC,MAAM,uBAAuB,GAAG,0BAA0B,CAAC"}
@@ -1,266 +0,0 @@
1
- import { Container } from '../components/container';
2
- import { ExternalCheckoutBuilder } from '../external-checkout/index';
3
- import { CHECKOUT_BUTTON_EVENT, CHECKOUT_MODE, GATEWAY_TYPE, CHECKOUT_BTN_LOG_PREFIX } from './checkout-button.interface';
4
- import { DEFAULT_ENV } from '../configs/env/env';
5
- import { Background } from '../components/background';
6
- import { Event } from '../helper/event';
7
- import { EventEmitter } from '../helper/event-emitter';
8
- import { isContextualRunner, isRedirectRunner } from './runner';
9
- import { ZipmoneyContextualRunner } from './zipmoney/zipmoney-contextual.runner';
10
- import { ZipmoneyRedirectRunner } from './zipmoney/zipmoney-redirect.runner';
11
- import { PaypalRunner } from './paypal/paypal.runner';
12
- import { AfterpayRunner } from './afterpay/afterpay.runner';
13
- import { CheckoutContextualHandler } from './checkout-contextual-handler';
14
- /**
15
- * Class CheckoutButton transform usual button into checkout
16
- *
17
- * @constructor
18
- *
19
- * @param {string} selector - Selector of html element.
20
- * @param {string} aceessToken - PayDock access token or users public key
21
- * @param {string} [gatewayId=default] - PayDock's gatewayId. By default or if put 'default', it will use the selected default gateway
22
- * @param {string} [type=PaypalClassic] - Type of gateway (PaypalClassic, Zipmoney)
23
- * @example
24
- * var widget = new CheckoutButton('#button', 'accessToken','gatewayId');
25
- */
26
- class CheckoutButton {
27
- /** @constructs */ // constructs added for correct parse classes jsdoc2md
28
- constructor(selector, accessToken, gatewayId = 'default', gatewayType = GATEWAY_TYPE.PAYPAL, mode = CHECKOUT_MODE.CONTEXTUAL) {
29
- this.accessToken = accessToken;
30
- this.gatewayId = gatewayId;
31
- this.gatewayType = gatewayType;
32
- this.mode = mode;
33
- this.window = window;
34
- this.meta = {};
35
- this.env = DEFAULT_ENV;
36
- this.eventEmitter = new EventEmitter();
37
- this.container = new Container(selector);
38
- this.initCheckout(this.container);
39
- this.chooseRunner(gatewayType, mode);
40
- }
41
- chooseRunner(gatewayType, mode) {
42
- const Runner = this.getRunnerByMode(gatewayType, mode);
43
- this.runner = new Runner(this.accessToken);
44
- if (isContextualRunner(this.runner)) {
45
- this.background = new Background();
46
- this.checkoutHandler = new CheckoutContextualHandler(this.background, this.runner, this.eventEmitter, { accessToken: this.accessToken, gatewayId: this.gatewayId });
47
- this.checkoutHandler.init(this.env);
48
- }
49
- else {
50
- this.background = undefined;
51
- this.checkoutHandler = undefined;
52
- }
53
- }
54
- buildAdditionalParams() {
55
- return {};
56
- }
57
- initCheckout(container) {
58
- container.on('click', (event) => {
59
- if (isContextualRunner(this.runner)) {
60
- if (this.runner.isRunning())
61
- return;
62
- else
63
- this.runner.run();
64
- }
65
- else if (isRedirectRunner(this.runner)) {
66
- if (!this.runner.getRedirectUrl())
67
- throw Error(`${CHECKOUT_BTN_LOG_PREFIX} The merchant redirect URL should is required in the '${this.mode}' mode.`);
68
- }
69
- this.eventEmitter.emit(CHECKOUT_BUTTON_EVENT.CLICK);
70
- let externalCheckout = new ExternalCheckoutBuilder(this.gatewayId, this.runner.getSuccessRedirectUri(), this.runner.getErrorRedirectUri());
71
- externalCheckout.setMeta(this.meta);
72
- externalCheckout.setEnv(this.env);
73
- externalCheckout.send(this.accessToken, (checkout) => {
74
- const buttonEvent = isContextualRunner(this.runner) ? CHECKOUT_BUTTON_EVENT.POPUP_REDIRECT : CHECKOUT_BUTTON_EVENT.REDIRECT;
75
- this.eventEmitter.emit(buttonEvent);
76
- this.runner.next(checkout, this.buildAdditionalParams());
77
- }, (error, code) => {
78
- console.error(`${CHECKOUT_BTN_LOG_PREFIX} ${error}`);
79
- this.eventEmitter.emit(CHECKOUT_BUTTON_EVENT.ERROR, { error, code });
80
- this.runner.error(error, code, (close) => {
81
- if (close)
82
- this.close();
83
- });
84
- });
85
- });
86
- }
87
- /**
88
- * This callback will be called for each event in payment source widget
89
- *
90
- * @callback listener
91
- */
92
- /**
93
- * Listen to events of widget
94
- *
95
- * @example
96
- *
97
- * widget.on('click', function () {
98
- *
99
- * });
100
- * @param {string} eventName - Available event names [CHECKOUT_BUTTON_EVENT]{@link CHECKOUT_BUTTON_EVENT}
101
- * @param {listener} cb
102
- */
103
- on(name, handler) {
104
- this.eventEmitter.subscribe(name, handler);
105
- }
106
- /**
107
- * Close popup window forcibly.
108
- * Only for 'contextual' mode.
109
- *
110
- */
111
- close() {
112
- if (this.assertMethodSupport(this.runner, CHECKOUT_MODE.CONTEXTUAL))
113
- this.runner.stop();
114
- }
115
- /**
116
- * After finish event of checkout button, data (dataType) will be insert to input (selector)
117
- *
118
- * @param {string} selector - css selector . [] #
119
- * @param {string} dataType - data type of IEventCheckoutFinishData [IEventCheckoutFinishData]{@link #IEventCheckoutFinishData}.
120
- */
121
- onFinishInsert(selector, dataType) {
122
- this.on(CHECKOUT_BUTTON_EVENT.FINISH, (event) => {
123
- Event.insertToInput(selector, dataType, event);
124
- });
125
- }
126
- /**
127
- * Method for setting meta information for checkout page
128
- *
129
- * @example
130
- * button.setMeta({
131
- brand_name: 'paydock',
132
- reference: '15',
133
- email: 'wault@paydock.com'
134
- });
135
- *
136
- * @param {(IPayPalMeta|IAfterpayMeta|IZipmoneyMeta)} meta - Data which can be shown on checkout page [IPayPalMeta]{@link IPayPalMeta} [IZipmoneyMeta]{@link IZipmoneyMeta} [IAfterpayMeta]{@link IAfterpayMeta}
137
- */
138
- setMeta(meta) {
139
- this.meta = Object.assign(this.meta, meta);
140
- }
141
- /**
142
- * Method for setting backdrop description.
143
- * Only for 'contextual' mode.
144
- *
145
- * @example
146
- * button.setBackdropDescription('Custom description');
147
- *
148
- * @param {string} text - description which can be shown in overlay of back side checkout page
149
- */
150
- setBackdropDescription(text) {
151
- if (this.assertMethodSupport(this.runner, CHECKOUT_MODE.CONTEXTUAL))
152
- this.runner.setBackgroundDescription(text);
153
- }
154
- /**
155
- * Method for setting backdrop title.
156
- * Only for 'contextual' mode.
157
- *
158
- * @example
159
- * button.setBackdropTitle('Custom title');
160
- *
161
- * @param {text} string - title which can be shown in overlay of back side checkout page
162
- */
163
- setBackdropTitle(text) {
164
- if (this.assertMethodSupport(this.runner, CHECKOUT_MODE.CONTEXTUAL))
165
- this.runner.setBackgroundTitle(text);
166
- }
167
- /**
168
- * Method for setting suspended redirect uri. Redirect after referred checkout.
169
- * Only for 'contextual' mode.
170
- *
171
- * @param {uri} string - uri for redirect (by default)
172
- */
173
- setSuspendedRedirectUri(uri) {
174
- if (this.assertMethodSupport(this.runner, CHECKOUT_MODE.CONTEXTUAL))
175
- this.runner.setSuspendedRedirectUri(uri);
176
- }
177
- /**
178
- * Method for setting the merchant redirect URL.
179
- * Merchant's customers redirect after successfull checkout.
180
- * Only for 'redirect' mode.
181
- *
182
- * @param {url} string - redirect url
183
- */
184
- setRedirectUrl(url) {
185
- if (this.assertMethodSupport(this.runner, CHECKOUT_MODE.REDIRECT))
186
- this.runner.setRedirectUrl(url);
187
- }
188
- getSuccessRedirectUri() {
189
- return this.runner.getSuccessRedirectUri();
190
- }
191
- /**
192
- * Method for disable backdrop on the page.
193
- * Only for 'contextual' mode.
194
- *
195
- * @example
196
- * button.turnOffBackdrop();
197
- *
198
- */
199
- turnOffBackdrop() {
200
- this.turnOffControlBackdrop();
201
- this.turnOffLoaderBackdrop();
202
- }
203
- turnOffControlBackdrop() {
204
- if (this.assertMethodSupport(this.runner, CHECKOUT_MODE.CONTEXTUAL))
205
- this.runner.turnOffBackdrop();
206
- }
207
- turnOffLoaderBackdrop() {
208
- var _a;
209
- (_a = this.background) === null || _a === void 0 ? void 0 : _a.turnOffLoader();
210
- }
211
- setEnv(env, alias) {
212
- var _a;
213
- this.env = env;
214
- this.alias = alias;
215
- (_a = this.checkoutHandler) === null || _a === void 0 ? void 0 : _a.setEnv(env);
216
- this.runner.setEnv(env, alias);
217
- }
218
- getEnv() {
219
- return this.env;
220
- }
221
- getRunnerByMode(gatewayType, mode) {
222
- if (gatewayType === GATEWAY_TYPE.PAYPAL) {
223
- if (mode === CHECKOUT_MODE.REDIRECT)
224
- throw Error(`${CHECKOUT_BTN_LOG_PREFIX} Gateway '${gatewayType}' do not support '${mode}' mode`);
225
- return PaypalRunner;
226
- }
227
- else if (gatewayType === GATEWAY_TYPE.AFTERPAY) {
228
- if (mode === CHECKOUT_MODE.REDIRECT)
229
- throw Error(`${CHECKOUT_BTN_LOG_PREFIX} Gateway '${gatewayType}' do not support '${mode}' mode`);
230
- return AfterpayRunner;
231
- }
232
- else if (gatewayType === GATEWAY_TYPE.ZIPMONEY) {
233
- return mode === CHECKOUT_MODE.CONTEXTUAL ? ZipmoneyContextualRunner : ZipmoneyRedirectRunner;
234
- }
235
- else {
236
- throw Error(`${CHECKOUT_BTN_LOG_PREFIX} Unsupported gateway.`);
237
- }
238
- }
239
- assertMethodSupport(runner, mode) {
240
- const warnMessage = `${CHECKOUT_BTN_LOG_PREFIX} The method is not supported in the '${mode}' mode.`;
241
- switch (mode) {
242
- case CHECKOUT_MODE.CONTEXTUAL:
243
- if (isContextualRunner(runner))
244
- return true;
245
- else
246
- console.warn(warnMessage);
247
- break;
248
- case CHECKOUT_MODE.REDIRECT:
249
- if (isRedirectRunner(runner))
250
- return true;
251
- else
252
- console.warn(warnMessage);
253
- break;
254
- default:
255
- break;
256
- }
257
- return false;
258
- }
259
- }
260
- /**
261
- * @interface IEventCheckoutFinishData
262
- *
263
- * @param {string} [payment_source_token]
264
- */
265
- export { CheckoutButton };
266
- //# sourceMappingURL=../../src/lib/checkout-button/checkout-button.js.map