@xsolla/payment-client-core 0.1.3 → 0.1.5-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (228) hide show
  1. package/esm2020/lib/core/credit-card/credit-card-settings.interface.mjs +2 -0
  2. package/esm2020/lib/core/credit-card/credit-card-types.enum.mjs +20 -0
  3. package/esm2020/lib/core/credit-card/credit-card.interface.mjs +2 -0
  4. package/esm2020/lib/core/credit-card/credit-card.service.mjs +41 -0
  5. package/esm2020/lib/core/credit-card/credit-cards-map.const.mjs +36 -0
  6. package/esm2020/lib/core/credit-card/default-mask.const.mjs +2 -0
  7. package/esm2020/lib/core/credit-card/four-block-mask.const.mjs +2 -0
  8. package/esm2020/lib/core/credit-card/ordered-cards-settings.const.mjs +45 -0
  9. package/esm2020/lib/core/credit-card/types/american-express.mjs +13 -0
  10. package/esm2020/lib/core/credit-card/types/aura.mjs +15 -0
  11. package/esm2020/lib/core/credit-card/types/china-union-pay.mjs +12 -0
  12. package/esm2020/lib/core/credit-card/types/dankort.mjs +15 -0
  13. package/esm2020/lib/core/credit-card/types/default-card.mjs +13 -0
  14. package/esm2020/lib/core/credit-card/types/diners-clubs.mjs +13 -0
  15. package/esm2020/lib/core/credit-card/types/discover.mjs +13 -0
  16. package/esm2020/lib/core/credit-card/types/elo.mjs +13 -0
  17. package/esm2020/lib/core/credit-card/types/hipercard.mjs +13 -0
  18. package/esm2020/lib/core/credit-card/types/jcb.mjs +13 -0
  19. package/esm2020/lib/core/credit-card/types/maestro.mjs +14 -0
  20. package/esm2020/lib/core/credit-card/types/mastercard.mjs +16 -0
  21. package/esm2020/lib/core/credit-card/types/mir.mjs +15 -0
  22. package/esm2020/lib/core/credit-card/types/naranja.mjs +15 -0
  23. package/esm2020/lib/core/credit-card/types/postepay.mjs +13 -0
  24. package/esm2020/lib/core/credit-card/types/visa.mjs +13 -0
  25. package/esm2020/lib/core/device-finger-print/device-finger-print.service.mjs +26 -126
  26. package/esm2020/lib/core/device-finger-print/hash.type.mjs +1 -1
  27. package/esm2020/lib/core/encrypt-credit-card/encrypt-credit-card.service.mjs +72 -0
  28. package/esm2020/lib/core/encrypt-credit-card/encrypted-card.interface.mjs +2 -0
  29. package/esm2020/lib/core/encrypt-credit-card/open-card.interface.mjs +2 -0
  30. package/esm2020/lib/core/exceptions-handling/errors/encrypt-card-error.mjs +9 -0
  31. package/esm2020/lib/core/payment/actions/check-status/check-status.action.class.mjs +2 -3
  32. package/esm2020/lib/core/payment/actions/next-action.interface.mjs +1 -1
  33. package/esm2020/lib/core/payment/actions/next-actions.mjs +3 -1
  34. package/esm2020/lib/core/payment/actions/three-ds/three-ds.action.class.mjs +7 -0
  35. package/esm2020/lib/core/payment/actions/three-ds/three-ds.action.token.mjs +11 -0
  36. package/esm2020/lib/core/payment/actions/three-ds/three-ds.action.type.mjs +2 -0
  37. package/esm2020/lib/core/payment/credit-card-payment-methods-id.variable.mjs +15 -0
  38. package/esm2020/lib/core/payment/credit-card-state/credit-card-state.interface.mjs +2 -0
  39. package/esm2020/lib/core/payment/credit-card-state/credit-card-state.service.mjs +14 -0
  40. package/esm2020/lib/core/payment/form/controls/card-number-control.config.mjs +10 -0
  41. package/esm2020/lib/core/payment/form/controls/phone-control.config.mjs +8 -0
  42. package/esm2020/lib/core/payment/form/converters/birth-date.converter.mjs +38 -0
  43. package/esm2020/lib/core/payment/form/converters/card-expiration.converter.mjs +36 -0
  44. package/esm2020/lib/core/payment/form/converters/card-number.converter.mjs +45 -0
  45. package/esm2020/lib/core/payment/form/converters/cardholder-name.converter.mjs +25 -0
  46. package/esm2020/lib/core/payment/form/converters/converters-map.mjs +23 -1
  47. package/esm2020/lib/core/payment/form/converters/cpf-name-regex.variable.mjs +2 -0
  48. package/esm2020/lib/core/payment/form/converters/cpf-name.converter.mjs +34 -0
  49. package/esm2020/lib/core/payment/form/converters/cpf-number.converter.mjs +31 -0
  50. package/esm2020/lib/core/payment/form/converters/cvv.converter.mjs +50 -0
  51. package/esm2020/lib/core/payment/form/converters/phone.converter.mjs +37 -0
  52. package/esm2020/lib/core/payment/form/converters/street-number/street-number-from-state.interface.mjs +2 -0
  53. package/esm2020/lib/core/payment/form/converters/street-number/street-number.converter.mjs +28 -0
  54. package/esm2020/lib/core/payment/form/converters/text.converter.mjs +19 -0
  55. package/esm2020/lib/core/payment/form/form.module.mjs +32 -4
  56. package/esm2020/lib/core/payment/form/validators/birth-date.validator.mjs +37 -0
  57. package/esm2020/lib/core/payment/form/validators/credit-card-min-length.validator.mjs +32 -0
  58. package/esm2020/lib/core/payment/form/validators/is-empty-input-value.function.mjs +4 -0
  59. package/esm2020/lib/core/payment/form/validators/luhn-formula-validator/luhn-formula.validator.mjs +40 -0
  60. package/esm2020/lib/core/payment/form/validators/max-length-validator.mjs +6 -0
  61. package/esm2020/lib/core/payment/form/validators/min-length-validator.mjs +6 -0
  62. package/esm2020/lib/core/payment/form/validators/phone-validator.mjs +6 -0
  63. package/esm2020/lib/core/payment/form/validators/validators.module.mjs +18 -0
  64. package/esm2020/lib/core/payment/initialize/initialize-request-params.interface.mjs +1 -1
  65. package/esm2020/lib/core/payment/initialize/initialize.service.mjs +28 -19
  66. package/esm2020/lib/core/payment/initialize/response/initialize-response.class.mjs +43 -0
  67. package/esm2020/lib/core/payment/initialize/response/initialize-response.token.mjs +8 -0
  68. package/esm2020/lib/core/payment/payment.interface.mjs +1 -1
  69. package/esm2020/lib/core/payment/payment.service.mjs +38 -8
  70. package/esm2020/lib/core/payment/status/check-status/check-status.service.mjs +8 -13
  71. package/esm2020/lib/core/payment/status/check-status/response/check-status-response.class.mjs +1 -1
  72. package/esm2020/lib/core/payment/submit/submit.service.mjs +13 -16
  73. package/esm2020/lib/core/payment/sync/field-async-validation.interface.mjs +2 -0
  74. package/esm2020/lib/core/payment/sync/field-sync-state.interface.mjs +1 -1
  75. package/esm2020/lib/core/payment/sync/request/sync-request.class.mjs +31 -0
  76. package/esm2020/lib/core/payment/sync/request/sync-request.token.mjs +8 -0
  77. package/esm2020/lib/core/payment/sync/response/sync-response.class.mjs +17 -0
  78. package/esm2020/lib/core/payment/sync/response/sync-response.token.mjs +8 -0
  79. package/esm2020/lib/core/payment/sync/sync.service.mjs +24 -15
  80. package/esm2020/lib/core/payment/three-ds/api/notify-dfp-status/notify-dfp-status.service.mjs +49 -0
  81. package/esm2020/lib/core/payment/three-ds/api/notify-dfp-status/request/notify-dfp-status-request.class.mjs +8 -0
  82. package/esm2020/lib/core/payment/three-ds/api/notify-dfp-status/request/notify-dfp-status-request.token.mjs +8 -0
  83. package/esm2020/lib/core/payment/three-ds/api/status-three-ds/request/status-three-ds-request.class.mjs +7 -0
  84. package/esm2020/lib/core/payment/three-ds/api/status-three-ds/request/status-three-ds-request.token.mjs +8 -0
  85. package/esm2020/lib/core/payment/three-ds/api/status-three-ds/response/status-three-ds-response.class.mjs +7 -0
  86. package/esm2020/lib/core/payment/three-ds/api/status-three-ds/response/status-three-ds-response.token.mjs +8 -0
  87. package/esm2020/lib/core/payment/three-ds/api/status-three-ds/status-three-ds-response.interface.mjs +2 -0
  88. package/esm2020/lib/core/payment/three-ds/api/status-three-ds/status-three-ds.service.mjs +60 -0
  89. package/esm2020/lib/core/payment/three-ds/api/status-three-ds/status-types.enum.mjs +7 -0
  90. package/esm2020/lib/core/payment/three-ds/api/status-three-ds/three-ds-checkout-form.interface.mjs +2 -0
  91. package/esm2020/lib/core/payment/three-ds/dfp-collect/dfp-collect.service.mjs +105 -0
  92. package/esm2020/lib/core/payment/three-ds/reinsurance-check/reinsurance-check.service.mjs +41 -0
  93. package/esm2020/lib/core/payment/three-ds/reinsurance-check/timer.interface.mjs +2 -0
  94. package/esm2020/lib/core/payment/three-ds/three-ds-20/status-update.interface.mjs +2 -0
  95. package/esm2020/lib/core/payment/three-ds/three-ds-20/three-ds20.service.mjs +109 -0
  96. package/esm2020/lib/core/payment/three-ds/three-ds-form.interface.mjs +2 -0
  97. package/esm2020/lib/core/payment/three-ds/three-ds-status-websocket-types.enum.mjs +5 -0
  98. package/esm2020/lib/core/payment/three-ds/three-ds.service.mjs +40 -0
  99. package/esm2020/lib/core/payment/xps-api/xps-api.service.mjs +79 -0
  100. package/esm2020/lib/core/payment/xps-request-params.interface.mjs +2 -0
  101. package/esm2020/lib/core/payment/xps-request.interface.mjs +2 -0
  102. package/esm2020/lib/core/payment/xps-response.error.mjs +7 -0
  103. package/esm2020/lib/core/payment/xps-response.interface.mjs +1 -1
  104. package/esm2020/lib/core/type-guards/is-string.function.mjs +4 -0
  105. package/esm2020/lib/core-library.module.mjs +13 -4
  106. package/esm2020/lib/core-library.service.mjs +19 -5
  107. package/fesm2015/xsolla-payment-client-core.mjs +1585 -261
  108. package/fesm2015/xsolla-payment-client-core.mjs.map +1 -1
  109. package/fesm2020/xsolla-payment-client-core.mjs +1574 -258
  110. package/fesm2020/xsolla-payment-client-core.mjs.map +1 -1
  111. package/lib/core/credit-card/credit-card-settings.interface.d.ts +10 -0
  112. package/lib/core/credit-card/credit-card-types.enum.d.ts +18 -0
  113. package/lib/core/credit-card/credit-card.interface.d.ts +9 -0
  114. package/lib/core/credit-card/credit-card.service.d.ts +11 -0
  115. package/lib/core/credit-card/credit-cards-map.const.d.ts +5 -0
  116. package/lib/core/credit-card/default-mask.const.d.ts +1 -0
  117. package/lib/core/credit-card/four-block-mask.const.d.ts +1 -0
  118. package/lib/core/credit-card/ordered-cards-settings.const.d.ts +12 -0
  119. package/lib/core/credit-card/types/american-express.d.ts +2 -0
  120. package/lib/core/credit-card/types/aura.d.ts +2 -0
  121. package/lib/core/credit-card/types/china-union-pay.d.ts +2 -0
  122. package/lib/core/credit-card/types/dankort.d.ts +2 -0
  123. package/lib/core/credit-card/types/default-card.d.ts +2 -0
  124. package/lib/core/credit-card/types/diners-clubs.d.ts +2 -0
  125. package/lib/core/credit-card/types/discover.d.ts +2 -0
  126. package/lib/core/credit-card/types/elo.d.ts +2 -0
  127. package/lib/core/credit-card/types/hipercard.d.ts +2 -0
  128. package/lib/core/credit-card/types/jcb.d.ts +2 -0
  129. package/lib/core/credit-card/types/maestro.d.ts +2 -0
  130. package/lib/core/credit-card/types/mastercard.d.ts +2 -0
  131. package/lib/core/credit-card/types/mir.d.ts +2 -0
  132. package/lib/core/credit-card/types/naranja.d.ts +2 -0
  133. package/lib/core/credit-card/types/postepay.d.ts +2 -0
  134. package/lib/core/credit-card/types/visa.d.ts +2 -0
  135. package/lib/core/device-finger-print/device-finger-print.service.d.ts +3 -31
  136. package/lib/core/device-finger-print/hash.type.d.ts +1 -1
  137. package/lib/core/encrypt-credit-card/encrypt-credit-card.service.d.ts +16 -0
  138. package/lib/core/encrypt-credit-card/encrypted-card.interface.d.ts +6 -0
  139. package/lib/core/encrypt-credit-card/open-card.interface.d.ts +6 -0
  140. package/lib/core/exceptions-handling/errors/encrypt-card-error.d.ts +5 -0
  141. package/lib/core/payment/actions/next-action.interface.d.ts +2 -1
  142. package/lib/core/payment/actions/three-ds/three-ds.action.class.d.ts +8 -0
  143. package/lib/core/payment/actions/three-ds/three-ds.action.token.d.ts +4 -0
  144. package/lib/core/payment/actions/three-ds/three-ds.action.type.d.ts +5 -0
  145. package/lib/core/payment/credit-card-payment-methods-id.variable.d.ts +6 -0
  146. package/lib/core/payment/credit-card-state/credit-card-state.interface.d.ts +3 -0
  147. package/lib/core/payment/credit-card-state/credit-card-state.service.d.ts +7 -0
  148. package/lib/core/payment/form/controls/card-number-control.config.d.ts +11 -0
  149. package/lib/core/payment/form/controls/phone-control.config.d.ts +6 -0
  150. package/lib/core/payment/form/converters/birth-date.converter.d.ts +13 -0
  151. package/lib/core/payment/form/converters/card-expiration.converter.d.ts +16 -0
  152. package/lib/core/payment/form/converters/card-number.converter.d.ts +19 -0
  153. package/lib/core/payment/form/converters/cardholder-name.converter.d.ts +13 -0
  154. package/lib/core/payment/form/converters/cpf-name-regex.variable.d.ts +1 -0
  155. package/lib/core/payment/form/converters/cpf-name.converter.d.ts +13 -0
  156. package/lib/core/payment/form/converters/cpf-number.converter.d.ts +11 -0
  157. package/lib/core/payment/form/converters/cvv.converter.d.ts +18 -0
  158. package/lib/core/payment/form/converters/phone.converter.d.ts +13 -0
  159. package/lib/core/payment/form/converters/street-number/street-number-from-state.interface.d.ts +3 -0
  160. package/lib/core/payment/form/converters/street-number/street-number.converter.d.ts +14 -0
  161. package/lib/core/payment/form/converters/text.converter.d.ts +11 -0
  162. package/lib/core/payment/form/form.module.d.ts +2 -1
  163. package/lib/core/payment/form/validators/birth-date.validator.d.ts +2 -0
  164. package/lib/core/payment/form/validators/credit-card-min-length.validator.d.ts +12 -0
  165. package/lib/core/payment/form/validators/is-empty-input-value.function.d.ts +1 -0
  166. package/lib/core/payment/form/validators/luhn-formula-validator/luhn-formula.validator.d.ts +6 -0
  167. package/lib/core/payment/form/validators/max-length-validator.d.ts +2 -0
  168. package/lib/core/payment/form/validators/min-length-validator.d.ts +2 -0
  169. package/lib/core/payment/form/validators/phone-validator.d.ts +2 -0
  170. package/lib/core/payment/form/validators/validators.module.d.ts +7 -0
  171. package/lib/core/payment/initialize/initialize-request-params.interface.d.ts +1 -0
  172. package/lib/core/payment/initialize/initialize.service.d.ts +8 -6
  173. package/lib/core/payment/initialize/{initialize-response.class.d.ts → response/initialize-response.class.d.ts} +2 -2
  174. package/lib/core/payment/payment.interface.d.ts +2 -2
  175. package/lib/core/payment/payment.service.d.ts +7 -2
  176. package/lib/core/payment/status/check-status/check-status.service.d.ts +3 -4
  177. package/lib/core/payment/submit/submit.service.d.ts +5 -4
  178. package/lib/core/payment/sync/field-async-validation.interface.d.ts +7 -0
  179. package/lib/core/payment/sync/field-sync-state.interface.d.ts +1 -1
  180. package/lib/core/payment/sync/{sync-request.class.d.ts → request/sync-request.class.d.ts} +3 -3
  181. package/lib/core/payment/sync/{sync-response.class.d.ts → response/sync-response.class.d.ts} +2 -2
  182. package/lib/core/payment/sync/sync.service.d.ts +12 -7
  183. package/lib/core/payment/three-ds/api/notify-dfp-status/notify-dfp-status.service.d.ts +14 -0
  184. package/lib/core/payment/three-ds/api/notify-dfp-status/request/notify-dfp-status-request.class.d.ts +10 -0
  185. package/lib/core/payment/three-ds/api/notify-dfp-status/request/notify-dfp-status-request.token.d.ts +6 -0
  186. package/lib/core/payment/three-ds/api/status-three-ds/request/status-three-ds-request.class.d.ts +5 -0
  187. package/lib/core/payment/three-ds/api/status-three-ds/request/status-three-ds-request.token.d.ts +6 -0
  188. package/lib/core/payment/three-ds/api/status-three-ds/response/status-three-ds-response.class.d.ts +7 -0
  189. package/lib/core/payment/three-ds/api/status-three-ds/response/status-three-ds-response.token.d.ts +6 -0
  190. package/lib/core/payment/three-ds/api/status-three-ds/status-three-ds-response.interface.d.ts +7 -0
  191. package/lib/core/payment/three-ds/api/status-three-ds/status-three-ds.service.d.ts +21 -0
  192. package/lib/core/payment/three-ds/api/status-three-ds/status-types.enum.d.ts +5 -0
  193. package/lib/core/payment/three-ds/api/status-three-ds/three-ds-checkout-form.interface.d.ts +7 -0
  194. package/lib/core/payment/three-ds/dfp-collect/dfp-collect.service.d.ts +20 -0
  195. package/lib/core/payment/three-ds/reinsurance-check/reinsurance-check.service.d.ts +12 -0
  196. package/lib/core/payment/three-ds/reinsurance-check/timer.interface.d.ts +9 -0
  197. package/lib/core/payment/three-ds/three-ds-20/status-update.interface.d.ts +12 -0
  198. package/lib/core/payment/three-ds/three-ds-20/three-ds20.service.d.ts +32 -0
  199. package/lib/core/payment/three-ds/three-ds-form.interface.d.ts +11 -0
  200. package/lib/core/payment/three-ds/three-ds-status-websocket-types.enum.d.ts +3 -0
  201. package/lib/core/payment/three-ds/three-ds.service.d.ts +14 -0
  202. package/lib/core/payment/xps-api/xps-api.service.d.ts +20 -0
  203. package/lib/core/payment/xps-request-params.interface.d.ts +3 -0
  204. package/lib/core/payment/xps-request.interface.d.ts +10 -0
  205. package/lib/core/payment/xps-response.error.d.ts +4 -0
  206. package/lib/core/payment/xps-response.interface.d.ts +3 -10
  207. package/lib/core/type-guards/is-string.function.d.ts +1 -0
  208. package/lib/core-library.service.d.ts +10 -1
  209. package/package.json +2 -3
  210. package/xsolla-payment-client-core-0.1.5-1.tgz +0 -0
  211. package/esm2020/lib/core/device-finger-print/device-finger-print-components.interface.mjs +0 -2
  212. package/esm2020/lib/core/device-finger-print/fingerprint-js.interface.mjs +0 -2
  213. package/esm2020/lib/core/exceptions-handling/errors/default-terminal-error.class.mjs +0 -8
  214. package/esm2020/lib/core/payment/initialize/initialize-response.class.mjs +0 -43
  215. package/esm2020/lib/core/payment/initialize/initialize-response.token.mjs +0 -8
  216. package/esm2020/lib/core/payment/sync/sync-request.class.mjs +0 -31
  217. package/esm2020/lib/core/payment/sync/sync-request.token.mjs +0 -8
  218. package/esm2020/lib/core/payment/sync/sync-response.class.mjs +0 -17
  219. package/esm2020/lib/core/payment/sync/sync-response.token.mjs +0 -8
  220. package/esm2020/lib/core/payment/xps-request.abstract.mjs +0 -8
  221. package/lib/core/device-finger-print/device-finger-print-components.interface.d.ts +0 -4
  222. package/lib/core/device-finger-print/fingerprint-js.interface.d.ts +0 -6
  223. package/lib/core/exceptions-handling/errors/default-terminal-error.class.d.ts +0 -4
  224. package/lib/core/payment/xps-request.abstract.d.ts +0 -6
  225. package/xsolla-payment-client-core-0.1.3.tgz +0 -0
  226. /package/lib/core/payment/initialize/{initialize-response.token.d.ts → response/initialize-response.token.d.ts} +0 -0
  227. /package/lib/core/payment/sync/{sync-request.token.d.ts → request/sync-request.token.d.ts} +0 -0
  228. /package/lib/core/payment/sync/{sync-response.token.d.ts → response/sync-response.token.d.ts} +0 -0
@@ -17,6 +17,8 @@ import { PaymentConfig } from './payment-config.interface';
17
17
  import { ValidationErrors } from './form/validators/validation-errors.interface';
18
18
  import { InputEventName } from './form/input-event.enum';
19
19
  import { FormFieldsStatus } from './form/form-fields-status.interface';
20
+ import { ThreeDsService } from './three-ds/three-ds.service';
21
+ import { CreditCardStateService } from './credit-card-state/credit-card-state.service';
20
22
  import * as i0 from "@angular/core";
21
23
  export declare class PaymentService {
22
24
  private readonly initializeService;
@@ -25,8 +27,10 @@ export declare class PaymentService {
25
27
  private readonly formService;
26
28
  private readonly statusService;
27
29
  private readonly financeDetailsService;
30
+ private readonly creditCardStateService;
28
31
  private readonly nextActionService;
29
32
  private readonly controlConfigService;
33
+ private readonly threeDsService;
30
34
  form: UntypedFormGroup | null;
31
35
  get formFieldsStatus$(): Observable<FormFieldsStatus>;
32
36
  private data;
@@ -37,12 +41,12 @@ export declare class PaymentService {
37
41
  private destroy$;
38
42
  private formDestroy$;
39
43
  private readonly formFieldsStatusSubject;
40
- constructor(initializeService: InitializeService, submitService: SubmitService, syncService: SyncService, formService: FormService, statusService: StatusService, financeDetailsService: FinanceDetailsService, nextActionService: NextActionService, controlConfigService: ControlConfigService);
44
+ constructor(initializeService: InitializeService, submitService: SubmitService, syncService: SyncService, formService: FormService, statusService: StatusService, financeDetailsService: FinanceDetailsService, creditCardStateService: CreditCardStateService, nextActionService: NextActionService, controlConfigService: ControlConfigService, threeDsService: ThreeDsService);
41
45
  initialize(config: PaymentConfig): Promise<Field[]>;
42
46
  submit(): Promise<NextAction | null | void>;
43
47
  getFields(): Field[];
44
48
  validate(field: Field): Promise<ValidationErrors | null>;
45
- runThreeDs(): NextAction;
49
+ runThreeDs(): void;
46
50
  getFinanceDetails(): FinanceDetails | null;
47
51
  getStatus(): Promise<Status>;
48
52
  getFieldConfig(field: Field): ControlConfig | null;
@@ -50,6 +54,7 @@ export declare class PaymentService {
50
54
  changeFieldState(name: string, state: InputEventName): void;
51
55
  destroy(): void;
52
56
  private emitFinanceDetails;
57
+ private emitCreditCardState;
53
58
  private emitFormFieldsStatus;
54
59
  private setupSyncService;
55
60
  private listenFinanceDetails;
@@ -1,18 +1,17 @@
1
- import { SecureApiClient } from '../../../http/secure-api/secure-api.service';
2
1
  import { SettingsService } from '../../../settings/settings.service';
3
2
  import { CheckStatusRequestFactory } from './request/check-status-request.token';
4
3
  import { CheckStatusResponseFactory } from './response/check-status-response.token';
5
4
  import { XpsApiPart } from '../../xps-api-part.abstract';
5
+ import { XpsApiService } from '../../xps-api/xps-api.service';
6
6
  import { CheckStatusResponse } from './response/check-status-response.class';
7
7
  import * as i0 from "@angular/core";
8
8
  export declare class CheckStatusService extends XpsApiPart<CheckStatusResponse> {
9
- private readonly secureApiClient;
9
+ private readonly xpsApiService;
10
10
  private readonly settingsService;
11
11
  private readonly requestFactory;
12
12
  private readonly responseFactory;
13
- private readonly apiRoute;
14
13
  private invoice;
15
- constructor(secureApiClient: SecureApiClient, settingsService: SettingsService, requestFactory: CheckStatusRequestFactory, responseFactory: CheckStatusResponseFactory);
14
+ constructor(xpsApiService: XpsApiService, settingsService: SettingsService, requestFactory: CheckStatusRequestFactory, responseFactory: CheckStatusResponseFactory);
16
15
  setRequestParams(invoice: number): void;
17
16
  request(): void;
18
17
  static ɵfac: i0.ɵɵFactoryDeclaration<CheckStatusService, never>;
@@ -5,16 +5,17 @@ import { SettingsService } from '../../settings/settings.service';
5
5
  import { SubmitResponse } from './response/submit-response.class';
6
6
  import { UntypedFormGroup } from '@angular/forms';
7
7
  import { DeviceFingerPrintService } from '../../device-finger-print/device-finger-print.service';
8
- import { SecureApiClient } from '../../http/secure-api/secure-api.service';
8
+ import { XpsApiService } from '../xps-api/xps-api.service';
9
+ import { EncryptCreditCardService } from '../../encrypt-credit-card/encrypt-credit-card.service';
9
10
  import * as i0 from "@angular/core";
10
11
  export declare class SubmitService {
11
12
  private readonly requestFactory;
12
13
  private readonly responseFactory;
13
14
  private readonly settingsService;
14
15
  private readonly deviceFingerPrintService;
15
- private readonly secureApi;
16
- private readonly directPaymentApiRoute;
17
- constructor(requestFactory: SubmitRequestFactory, responseFactory: SubmitResponseFactory, settingsService: SettingsService, deviceFingerPrintService: DeviceFingerPrintService, secureApi: SecureApiClient);
16
+ private readonly xpsApiService;
17
+ private readonly encryptCreditCardService;
18
+ constructor(requestFactory: SubmitRequestFactory, responseFactory: SubmitResponseFactory, settingsService: SettingsService, deviceFingerPrintService: DeviceFingerPrintService, xpsApiService: XpsApiService, encryptCreditCardService: EncryptCreditCardService);
18
19
  request(fields: Field[], form: UntypedFormGroup): Promise<SubmitResponse>;
19
20
  static ɵfac: i0.ɵɵFactoryDeclaration<SubmitService, never>;
20
21
  static ɵprov: i0.ɵɵInjectableDeclaration<SubmitService>;
@@ -0,0 +1,7 @@
1
+ import { Field } from '../field.interface';
2
+ import { SyncResponse } from './response/sync-response.class';
3
+ export interface FieldAsyncValidation {
4
+ value: unknown;
5
+ field: Field;
6
+ response: SyncResponse;
7
+ }
@@ -1,4 +1,4 @@
1
- import { SyncResponse } from './sync-response.class';
1
+ import { SyncResponse } from './response/sync-response.class';
2
2
  export interface FieldSyncState {
3
3
  value: unknown;
4
4
  result: Promise<SyncResponse | null>;
@@ -1,7 +1,7 @@
1
1
  import { UntypedFormGroup } from '@angular/forms';
2
- import { Field } from '../field.interface';
3
- import { XpsRequest } from '../xps-request.abstract';
4
- export declare class SyncRequest extends XpsRequest {
2
+ import { Field } from '../../field.interface';
3
+ import { XpsApiPartRequest } from '../../xps-api-part-request.abstract';
4
+ export declare class SyncRequest extends XpsApiPartRequest {
5
5
  readonly access_token: string;
6
6
  readonly xps_fix_command = "calculate";
7
7
  constructor(parameters: {
@@ -1,6 +1,6 @@
1
1
  import { ValidationErrors } from '@angular/forms';
2
- import { Field } from '../field.interface';
3
- import { XpsResponse } from '../xps-response.interface';
2
+ import { Field } from '../../field.interface';
3
+ import { XpsResponse } from '../../xps-response.interface';
4
4
  export declare class SyncResponse {
5
5
  readonly error: ValidationErrors | null;
6
6
  readonly fields: Field[];
@@ -1,25 +1,30 @@
1
1
  import { UntypedFormGroup, ValidationErrors } from '@angular/forms';
2
- import { SecureApiClient } from '../../http/secure-api/secure-api.service';
2
+ import { Observable } from 'rxjs';
3
3
  import { SettingsService } from '../../settings/settings.service';
4
4
  import { EmitDataService } from '../emit-data.service.abstract';
5
5
  import { Field } from '../field.interface';
6
6
  import { XpsResponse } from '../xps-response.interface';
7
- import { SyncRequestFactory } from './sync-request.token';
8
- import { SyncResponse } from './sync-response.class';
9
- import { SyncResponseFactory } from './sync-response.token';
7
+ import { SyncRequestFactory } from './request/sync-request.token';
8
+ import { SyncResponse } from './response/sync-response.class';
9
+ import { SyncResponseFactory } from './response/sync-response.token';
10
10
  import { NextActionService } from '../actions/next-action.service';
11
+ import { XpsApiService } from '../xps-api/xps-api.service';
12
+ import { FieldAsyncValidation } from './field-async-validation.interface';
13
+ import { EncryptCreditCardService } from '../../encrypt-credit-card/encrypt-credit-card.service';
11
14
  import * as i0 from "@angular/core";
12
15
  export declare class SyncService extends EmitDataService<XpsResponse> {
13
16
  private readonly requestFactory;
14
17
  private readonly responseFactory;
15
- private readonly secureApi;
18
+ private readonly xpsApiService;
16
19
  private readonly nextActionService;
17
20
  private readonly settingsService;
18
- private readonly apiRoute;
21
+ private readonly encryptCreditCardService;
19
22
  private prevFieldSyncStates;
20
23
  private form;
21
24
  private fields;
22
- constructor(requestFactory: SyncRequestFactory, responseFactory: SyncResponseFactory, secureApi: SecureApiClient, nextActionService: NextActionService, settingsService: SettingsService);
25
+ private readonly fieldAsyncValidation;
26
+ constructor(requestFactory: SyncRequestFactory, responseFactory: SyncResponseFactory, xpsApiService: XpsApiService, nextActionService: NextActionService, settingsService: SettingsService, encryptCreditCardService: EncryptCreditCardService);
27
+ get fieldAsyncValidation$(): Observable<FieldAsyncValidation>;
23
28
  setup(form: UntypedFormGroup, fields: Field[]): void;
24
29
  reset(): void;
25
30
  validate(field: Field): Promise<ValidationErrors | null>;
@@ -0,0 +1,14 @@
1
+ import { SecureApiClient } from '../../../../http/secure-api/secure-api.service';
2
+ import { SettingsService } from '../../../../settings/settings.service';
3
+ import { NotifyDfpStatusRequestFactory } from './request/notify-dfp-status-request.token';
4
+ import * as i0 from "@angular/core";
5
+ export declare class NotifyDfpStatusService {
6
+ private readonly secureApi;
7
+ private readonly settingsService;
8
+ private readonly requestFactory;
9
+ private readonly apiRouteComplete;
10
+ constructor(secureApi: SecureApiClient, settingsService: SettingsService, requestFactory: NotifyDfpStatusRequestFactory);
11
+ request(threeDsId: string, isCompind: boolean): void;
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<NotifyDfpStatusService, never>;
13
+ static ɵprov: i0.ɵɵInjectableDeclaration<NotifyDfpStatusService>;
14
+ }
@@ -0,0 +1,10 @@
1
+ export declare class NotifyDfpStatusRequest {
2
+ readonly access_token: string;
3
+ readonly threeDSTrXid: string;
4
+ readonly secure3dCompind: 'Y' | 'N';
5
+ constructor(params: {
6
+ token: string;
7
+ threeDsTrXid: string;
8
+ isCompind: boolean;
9
+ });
10
+ }
@@ -0,0 +1,6 @@
1
+ import { InjectionToken, ValueProvider } from '@angular/core';
2
+ import { NotifyDfpStatusRequest } from './notify-dfp-status-request.class';
3
+ export type NotifyDfpStatusRequestParameters = ConstructorParameters<typeof NotifyDfpStatusRequest>;
4
+ export type NotifyDfpStatusRequestFactory = (...args: NotifyDfpStatusRequestParameters) => NotifyDfpStatusRequest;
5
+ export declare const notifyDfpStatusRequestFactoryToken: InjectionToken<NotifyDfpStatusRequestFactory>;
6
+ export declare const notifyDfpStatusRequestFactoryProvider: ValueProvider;
@@ -0,0 +1,5 @@
1
+ export declare class StatusThreeDsRequest {
2
+ readonly access_token: string;
3
+ readonly threeDSTrXid: string;
4
+ constructor(token: string, threeDsId: string);
5
+ }
@@ -0,0 +1,6 @@
1
+ import { InjectionToken, ValueProvider } from '@angular/core';
2
+ import { StatusThreeDsRequest } from './status-three-ds-request.class';
3
+ export type StatusThreeDsRequestParameters = ConstructorParameters<typeof StatusThreeDsRequest>;
4
+ export type StatusThreeDsRequestFactory = (...args: StatusThreeDsRequestParameters) => StatusThreeDsRequest;
5
+ export declare const statusThreeDsRequestFactoryToken: InjectionToken<StatusThreeDsRequestFactory>;
6
+ export declare const statusThreeDsRequestFactoryProvider: ValueProvider;
@@ -0,0 +1,7 @@
1
+ import { ThreeDsCheckoutForm } from '../three-ds-checkout-form.interface';
2
+ import { Properties } from '../../../../../properties.type';
3
+ export declare class StatusThreeDsResponse {
4
+ readonly status: string;
5
+ readonly checkoutForm?: ThreeDsCheckoutForm;
6
+ constructor(params: Properties<StatusThreeDsResponse>);
7
+ }
@@ -0,0 +1,6 @@
1
+ import { InjectionToken, ValueProvider } from '@angular/core';
2
+ import { StatusThreeDsResponse } from './status-three-ds-response.class';
3
+ export type StatusThreeDsResponseParameters = ConstructorParameters<typeof StatusThreeDsResponse>;
4
+ export type StatusThreeDsResponseFactory = (...args: StatusThreeDsResponseParameters) => StatusThreeDsResponse;
5
+ export declare const statusThreeDsResponseFactoryToken: InjectionToken<StatusThreeDsResponseFactory>;
6
+ export declare const statusThreeDsResponseFactoryProvider: ValueProvider;
@@ -0,0 +1,7 @@
1
+ import { ThreeDsCheckoutForm } from './three-ds-checkout-form.interface';
2
+ export interface StatusThreeDsResponseApi {
3
+ secure3d: {
4
+ status: string;
5
+ checkout_form?: ThreeDsCheckoutForm;
6
+ };
7
+ }
@@ -0,0 +1,21 @@
1
+ import { Observable } from 'rxjs';
2
+ import { SecureApiClient } from '../../../../http/secure-api/secure-api.service';
3
+ import { SettingsService } from '../../../../settings/settings.service';
4
+ import { ThreeDsForm } from '../../three-ds-form.interface';
5
+ import { StatusThreeDsRequestFactory } from './request/status-three-ds-request.token';
6
+ import { StatusThreeDsResponseFactory } from './response/status-three-ds-response.token';
7
+ import { StatusThreeDsResponse } from './response/status-three-ds-response.class';
8
+ import * as i0 from "@angular/core";
9
+ export declare class StatusThreeDsService {
10
+ private readonly secureApi;
11
+ private readonly settingsService;
12
+ private readonly requestFactory;
13
+ private readonly responseFactory;
14
+ get response$(): Observable<StatusThreeDsResponse | null>;
15
+ private readonly apiRoute;
16
+ private readonly response;
17
+ constructor(secureApi: SecureApiClient, settingsService: SettingsService, requestFactory: StatusThreeDsRequestFactory, responseFactory: StatusThreeDsResponseFactory);
18
+ request(data: ThreeDsForm): void;
19
+ static ɵfac: i0.ɵɵFactoryDeclaration<StatusThreeDsService, never>;
20
+ static ɵprov: i0.ɵɵInjectableDeclaration<StatusThreeDsService>;
21
+ }
@@ -0,0 +1,5 @@
1
+ export declare enum ThreeDsStatusTypes {
2
+ completed = "completed",
3
+ challenge = "challenge",
4
+ collectDfp = "collect_dfp"
5
+ }
@@ -0,0 +1,7 @@
1
+ export interface ThreeDsCheckoutForm {
2
+ method: string;
3
+ action: string;
4
+ params?: {
5
+ [key: string]: string;
6
+ };
7
+ }
@@ -0,0 +1,20 @@
1
+ import { ExtendedWindow } from '../../../extended-window.interface';
2
+ import { NotifyDfpStatusService } from '../api/notify-dfp-status/notify-dfp-status.service';
3
+ import { ThreeDsForm } from '../three-ds-form.interface';
4
+ import * as i0 from "@angular/core";
5
+ export declare class DfpCollectService {
6
+ private readonly window;
7
+ private readonly notifyDfpStatusService;
8
+ private readonly iframeName;
9
+ private readonly formName;
10
+ constructor(window: ExtendedWindow, notifyDfpStatusService: NotifyDfpStatusService);
11
+ collectDfpStatus(threeDsForm: ThreeDsForm): void;
12
+ private openIframeWithPostRequest;
13
+ private createIframe;
14
+ private postFormToIframe;
15
+ private createForm;
16
+ private createInput;
17
+ private setAttributes;
18
+ static ɵfac: i0.ɵɵFactoryDeclaration<DfpCollectService, never>;
19
+ static ɵprov: i0.ɵɵInjectableDeclaration<DfpCollectService>;
20
+ }
@@ -0,0 +1,12 @@
1
+ import { Timer } from './timer.interface';
2
+ import { ExtendedWindow } from '../../../extended-window.interface';
3
+ import * as i0 from "@angular/core";
4
+ export declare class ReinsuranceCheckService {
5
+ private readonly window;
6
+ private timers;
7
+ constructor(window: ExtendedWindow);
8
+ addTimer(timer: Timer): void;
9
+ removeTimer(id: string): void;
10
+ static ɵfac: i0.ɵɵFactoryDeclaration<ReinsuranceCheckService, never>;
11
+ static ɵprov: i0.ɵɵInjectableDeclaration<ReinsuranceCheckService>;
12
+ }
@@ -0,0 +1,9 @@
1
+ export interface Timer {
2
+ id: string;
3
+ timeoutMs: number;
4
+ callback(): void;
5
+ timeoutRef?: ReturnType<typeof setTimeout>;
6
+ }
7
+ export interface Timers {
8
+ [key: string]: Timer | null;
9
+ }
@@ -0,0 +1,12 @@
1
+ import { ThreeDsCheckoutForm } from '../api/status-three-ds/three-ds-checkout-form.interface';
2
+ export interface StatusComplete {
3
+ type: 'complete';
4
+ data: {
5
+ statusUrl: string;
6
+ };
7
+ }
8
+ export interface StatusChallenge {
9
+ type: 'challenge';
10
+ data: ThreeDsCheckoutForm;
11
+ }
12
+ export type StatusUpdate = StatusComplete | StatusChallenge;
@@ -0,0 +1,32 @@
1
+ import { Observable } from 'rxjs';
2
+ import { WebSocketFactory } from '../../../web-socket/web-socket.factory';
3
+ import { StatusThreeDsService } from '../api/status-three-ds/status-three-ds.service';
4
+ import { NotifyDfpStatusService } from '../api/notify-dfp-status/notify-dfp-status.service';
5
+ import { ThreeDsForm } from '../three-ds-form.interface';
6
+ import { DfpCollectService } from '../dfp-collect/dfp-collect.service';
7
+ import { ReinsuranceCheckService } from '../reinsurance-check/reinsurance-check.service';
8
+ import { StatusUpdate } from './status-update.interface';
9
+ import * as i0 from "@angular/core";
10
+ export declare class ThreeDs20Service {
11
+ private readonly statusThreeDsService;
12
+ private readonly notifyDfpStatusService;
13
+ private readonly webSocketFactory;
14
+ private readonly dfpCollectService;
15
+ private readonly reinsuranceCheckService;
16
+ get statusUpdates$(): Observable<StatusUpdate>;
17
+ private webSocketSubscription;
18
+ private webSocketReconnectionSubscription;
19
+ private webSocketClient;
20
+ private readonly statusUpdates;
21
+ private statusRequestSubscription;
22
+ private readonly notifyDfpTimerId;
23
+ private readonly notifyDfpTimeoutMs;
24
+ private readonly statusThreeDsTimerId;
25
+ private readonly statusThreeDsTimeoutMs;
26
+ constructor(statusThreeDsService: StatusThreeDsService, notifyDfpStatusService: NotifyDfpStatusService, webSocketFactory: WebSocketFactory, dfpCollectService: DfpCollectService, reinsuranceCheckService: ReinsuranceCheckService);
27
+ checkThreeDs20(threeDsForm: ThreeDsForm | null): Promise<void>;
28
+ private handleThreeDsUpdates;
29
+ private stopReinsuranceMethods;
30
+ static ɵfac: i0.ɵɵFactoryDeclaration<ThreeDs20Service, never>;
31
+ static ɵprov: i0.ɵɵInjectableDeclaration<ThreeDs20Service>;
32
+ }
@@ -0,0 +1,11 @@
1
+ import { WebSocketClientType } from '../../web-socket/web-socket-client-type.enum';
2
+ export interface ThreeDsForm {
3
+ threeDSTrXid: string;
4
+ threeDSMethod: string;
5
+ threeDSMethodData: string;
6
+ webSocketChannelUrl: string;
7
+ webSocketChannelName: string;
8
+ webSocketClientType: WebSocketClientType;
9
+ statusUrl: string;
10
+ waitCallback?: boolean;
11
+ }
@@ -0,0 +1,3 @@
1
+ export declare enum ThreeDsStatusWebSocketTypes {
2
+ status3DS_changed = "status3DS_changed"
3
+ }
@@ -0,0 +1,14 @@
1
+ import { NextActionService } from '../actions/next-action.service';
2
+ import { ThreeDs20Service } from './three-ds-20/three-ds20.service';
3
+ import { SubmitResponse } from '../submit/response/submit-response.class';
4
+ import * as i0 from "@angular/core";
5
+ export declare class ThreeDsService {
6
+ private readonly threeDs20Service;
7
+ private readonly nextActionService;
8
+ private statusSubscription;
9
+ constructor(threeDs20Service: ThreeDs20Service, nextActionService: NextActionService);
10
+ checkThreeDs(params: SubmitResponse): void;
11
+ stopChecking(): void;
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<ThreeDsService, never>;
13
+ static ɵprov: i0.ɵɵInjectableDeclaration<ThreeDsService>;
14
+ }
@@ -0,0 +1,20 @@
1
+ import { SecureApiClient } from '../../http/secure-api/secure-api.service';
2
+ import { ExtendedWindow } from '../../extended-window.interface';
3
+ import { SettingsService } from '../../settings/settings.service';
4
+ import { XpsRequest } from '../xps-request.interface';
5
+ import { XpsResponse } from '../xps-response.interface';
6
+ import { CountryService } from '../../country/country.service';
7
+ import * as i0 from "@angular/core";
8
+ export declare class XpsApiService {
9
+ private readonly window;
10
+ private readonly secureApiClient;
11
+ private readonly settingsService;
12
+ private readonly countryService;
13
+ private readonly directPaymentApiRoute;
14
+ constructor(window: ExtendedWindow, secureApiClient: SecureApiClient, settingsService: SettingsService, countryService: CountryService);
15
+ directPaymentRequest(parameters: XpsRequest): Promise<XpsResponse>;
16
+ private collectAnalyticsParameters;
17
+ private collectUserSessionId;
18
+ static ɵfac: i0.ɵɵFactoryDeclaration<XpsApiService, never>;
19
+ static ɵprov: i0.ɵɵInjectableDeclaration<XpsApiService>;
20
+ }
@@ -0,0 +1,3 @@
1
+ export interface XpsRequestParams {
2
+ [key: string]: unknown;
3
+ }
@@ -0,0 +1,10 @@
1
+ import { XpsBoolean } from '../xps-boolean.enum';
2
+ export interface XpsRequest {
3
+ [fieldName: `xps_${string}`]: unknown;
4
+ access_token: string;
5
+ pid?: string;
6
+ user_session_id?: string;
7
+ returnUrl?: string;
8
+ paymentWithSavedMethod?: XpsBoolean;
9
+ saved_method_id?: number;
10
+ }
@@ -0,0 +1,4 @@
1
+ import { AppError } from '../exceptions-handling/errors/app-error.class';
2
+ export declare class XpsResponseError extends AppError {
3
+ constructor(message?: string);
4
+ }
@@ -9,6 +9,7 @@ import { XpsCommand } from './xps-comand.enum';
9
9
  import { XpsError } from './xps-error.interface';
10
10
  import { XpsMessage } from './xps-message.interface';
11
11
  import { XpsSummary } from './xps-summary.interface';
12
+ import { ThreeDsForm } from './three-ds/three-ds-form.interface';
12
13
  export interface XpsResponse {
13
14
  checkout: {
14
15
  action: string;
@@ -17,6 +18,7 @@ export interface XpsResponse {
17
18
  [key: string]: string;
18
19
  };
19
20
  };
21
+ idCardType: string;
20
22
  summary: XpsSummary;
21
23
  buyData: {
22
24
  currency: string;
@@ -79,16 +81,7 @@ export interface XpsResponse {
79
81
  onlineBanking?: {
80
82
  value: string;
81
83
  };
82
- threeDSForm: {
83
- threeDSTrXid: string;
84
- threeDSMethod: string;
85
- threeDSMethodData: string;
86
- webSocketChannelUrl: string;
87
- webSocketChannelName: string;
88
- webSocketClientType: WebSocketClientType;
89
- statusUrl: string;
90
- waitCallback: boolean;
91
- } | null;
84
+ threeDSForm: ThreeDsForm | null;
92
85
  skipForm: boolean;
93
86
  skipCheckout: boolean;
94
87
  isMap: boolean;
@@ -0,0 +1 @@
1
+ export declare function isString(value: unknown): value is string;
@@ -19,6 +19,11 @@ import { FinanceDetailsService } from './core/payment/finance-details/finance-de
19
19
  import { PaymentConfigService } from './core/payment/config/config.service';
20
20
  import { Status } from './core/payment/status/status.interface';
21
21
  import { StatusService } from './core/payment/status/status.service';
22
+ import { CreditCardService } from './core/credit-card/credit-card.service';
23
+ import { CreditCard } from './core/credit-card/credit-card.interface';
24
+ import { CreditCardStateService } from './core/payment/credit-card-state/credit-card-state.service';
25
+ import { Observable } from 'rxjs';
26
+ import { CreditCardState } from './core/payment/credit-card-state/credit-card-state.interface';
22
27
  import * as i0 from "@angular/core";
23
28
  export declare class CoreLibraryService {
24
29
  private readonly settingsService;
@@ -33,17 +38,21 @@ export declare class CoreLibraryService {
33
38
  private readonly legalService;
34
39
  private readonly statusService;
35
40
  private readonly nextActionService;
41
+ private readonly creditCardService;
42
+ private readonly creditCardStateService;
36
43
  paymentMethods: {
37
44
  getList: () => Promise<PaymentMethod[]>;
38
45
  getQuickMethods: () => Promise<PaymentMethod[]>;
39
46
  getSavedMethods: () => Promise<SavedMethod[]>;
40
47
  getUserBalance: () => Promise<UserBalanceResponse>;
41
48
  };
42
- constructor(settingsService: SettingsService, countryService: CountryService, paymentMethodsService: PaymentMethodsService, savedMethodsService: SavedMethodsService, userBalanceService: UserBalanceService, paymentConfigService: PaymentConfigService, paymentService: PaymentService, deviceFingerPrintService: DeviceFingerPrintService, financeDetailsService: FinanceDetailsService, legalService: LegalService, statusService: StatusService, nextActionService: NextActionService);
49
+ constructor(settingsService: SettingsService, countryService: CountryService, paymentMethodsService: PaymentMethodsService, savedMethodsService: SavedMethodsService, userBalanceService: UserBalanceService, paymentConfigService: PaymentConfigService, paymentService: PaymentService, deviceFingerPrintService: DeviceFingerPrintService, financeDetailsService: FinanceDetailsService, legalService: LegalService, statusService: StatusService, nextActionService: NextActionService, creditCardService: CreditCardService, creditCardStateService: CreditCardStateService);
43
50
  init(configuration: InitConfiguration): Promise<void>;
44
51
  getStatus(url?: string): Promise<Status>;
45
52
  setCountry(country: string): void;
46
53
  createPayment(config: PaymentConfig): Payment;
54
+ getCreditCardService(): CreditCard;
55
+ get cardTypeUpdates$(): Observable<CreditCardState>;
47
56
  getLegalComponentConfig(): LegalComponentConfig;
48
57
  getFieldMask(field: Field): undefined | (() => string);
49
58
  static ɵfac: i0.ɵɵFactoryDeclaration<CoreLibraryService, never>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xsolla/payment-client-core",
3
- "version": "0.1.3",
3
+ "version": "0.1.5-1",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^15.2.0",
6
6
  "@angular/core": "^15.2.0",
@@ -10,8 +10,7 @@
10
10
  "zone.js": "~0.12.0"
11
11
  },
12
12
  "dependencies": {
13
- "@fingerprintjs/fingerprintjs": "^3.4.2",
14
- "@xsolla/antifraud-fingerprint": "^0.0.1-alpha.5",
13
+ "@xsolla/antifraud-fingerprint": "^0.0.1-alpha.10",
15
14
  "centrifuge": "^4.0.1",
16
15
  "jsencrypt": "^3.3.2",
17
16
  "stacktrace-js": "^2.0.2",
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGV2aWNlLWZpbmdlci1wcmludC1jb21wb25lbnRzLmludGVyZmFjZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL3BheW1lbnQtY2xpZW50LWNvcmUvc3JjL2xpYi9jb3JlL2RldmljZS1maW5nZXItcHJpbnQvZGV2aWNlLWZpbmdlci1wcmludC1jb21wb25lbnRzLmludGVyZmFjZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGludGVyZmFjZSBEZXZpY2VGaW5nZXJQcmludENvbXBvbmVudHMge1xuICBoYXNoPzogc3RyaW5nO1xuICBba2V5OiBzdHJpbmddOiB1bmtub3duO1xufVxuIl19
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmluZ2VycHJpbnQtanMuaW50ZXJmYWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvcGF5bWVudC1jbGllbnQtY29yZS9zcmMvbGliL2NvcmUvZGV2aWNlLWZpbmdlci1wcmludC9maW5nZXJwcmludC1qcy5pbnRlcmZhY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB0eXBlIEZpbmdlcnByaW50SlMgZnJvbSAnQGZpbmdlcnByaW50anMvZmluZ2VycHJpbnRqcyc7XG5pbXBvcnQgdHlwZSB7IG11cm11clg2NEhhc2gxMjggfSBmcm9tICdAZmluZ2VycHJpbnRqcy9maW5nZXJwcmludGpzJztcblxuZXhwb3J0IGludGVyZmFjZSBGaW5nZXJwcmludEpzIHtcbiAgbGlicmFyeTogdHlwZW9mIEZpbmdlcnByaW50SlM7XG4gIGdldEhhc2g6IHR5cGVvZiBtdXJtdXJYNjRIYXNoMTI4O1xufVxuIl19
@@ -1,8 +0,0 @@
1
- import { TerminalError } from './terminal-error.class';
2
- export class DefaultTerminalError extends TerminalError {
3
- constructor() {
4
- const message = `It's not you, it's us, but we can help. Please contact our customer support.`;
5
- super(message, '1000-0002');
6
- }
7
- }
8
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVmYXVsdC10ZXJtaW5hbC1lcnJvci5jbGFzcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL3BheW1lbnQtY2xpZW50LWNvcmUvc3JjL2xpYi9jb3JlL2V4Y2VwdGlvbnMtaGFuZGxpbmcvZXJyb3JzL2RlZmF1bHQtdGVybWluYWwtZXJyb3IuY2xhc3MudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLGFBQWEsRUFBRSxNQUFNLHdCQUF3QixDQUFDO0FBRXZELE1BQU0sT0FBTyxvQkFBcUIsU0FBUSxhQUFhO0lBQ3JEO1FBQ0UsTUFBTSxPQUFPLEdBQUcsOEVBQThFLENBQUM7UUFDL0YsS0FBSyxDQUFDLE9BQU8sRUFBRSxXQUFXLENBQUMsQ0FBQztJQUM5QixDQUFDO0NBQ0YiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBUZXJtaW5hbEVycm9yIH0gZnJvbSAnLi90ZXJtaW5hbC1lcnJvci5jbGFzcyc7XG5cbmV4cG9ydCBjbGFzcyBEZWZhdWx0VGVybWluYWxFcnJvciBleHRlbmRzIFRlcm1pbmFsRXJyb3Ige1xuICBwdWJsaWMgY29uc3RydWN0b3IoKSB7XG4gICAgY29uc3QgbWVzc2FnZSA9IGBJdCdzIG5vdCB5b3UsIGl0J3MgdXMsIGJ1dCB3ZSBjYW4gaGVscC4gUGxlYXNlIGNvbnRhY3Qgb3VyIGN1c3RvbWVyIHN1cHBvcnQuYDtcbiAgICBzdXBlcihtZXNzYWdlLCAnMTAwMC0wMDAyJyk7XG4gIH1cbn1cbiJdfQ==
@@ -1,43 +0,0 @@
1
- export class InitializeResponse {
2
- constructor(response) {
3
- this.paymentForm = null;
4
- this.paymentForm = this.extractPaymentForm(response);
5
- }
6
- extractPaymentForm(response) {
7
- if (!response) {
8
- return null;
9
- }
10
- return {
11
- totalAmount: response.buyData.sum,
12
- currency: response.buyData.currency,
13
- fields: Object.keys(response.form).map((key) => response.form[key]),
14
- taxDisclaimer: response.taxDisclaimer,
15
- number: response.number,
16
- barcode: response.barcode,
17
- instruction: response.instruction,
18
- offers: response.offers,
19
- error: response.error,
20
- errors: response.errors,
21
- restrictions: response.restrictions,
22
- info: response.info,
23
- buyData: response.buyData,
24
- pid: response.pid,
25
- messages: response.messages ?? [],
26
- title: response.title,
27
- summary: response.summary,
28
- skipForm: response.skipForm,
29
- isSavedMethodPayment: !!response.form?.saved_method_id,
30
- couponCode: response.form?.couponCode?.value || '',
31
- publicId: response.public_id,
32
- skipCheckout: response.skipCheckout,
33
- koreaNotification: response.form.korea_limits_instruction,
34
- isCheckout: response.isCheckout,
35
- categories: response.categories,
36
- hasFatalErrors: response.textAll?.fatal,
37
- userSession: response.userSession,
38
- statusText: response.status?.statusData?.stateText ?? null,
39
- country: response.country ? response.country.iso : null,
40
- };
41
- }
42
- }
43
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5pdGlhbGl6ZS1yZXNwb25zZS5jbGFzcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL3BheW1lbnQtY2xpZW50LWNvcmUvc3JjL2xpYi9jb3JlL3BheW1lbnQvaW5pdGlhbGl6ZS9pbml0aWFsaXplLXJlc3BvbnNlLmNsYXNzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUlBLE1BQU0sT0FBTyxrQkFBa0I7SUFHN0IsWUFBbUIsUUFBcUI7UUFGeEIsZ0JBQVcsR0FBdUIsSUFBSSxDQUFDO1FBR3JELElBQUksQ0FBQyxXQUFXLEdBQUcsSUFBSSxDQUFDLGtCQUFrQixDQUFDLFFBQVEsQ0FBQyxDQUFDO0lBQ3ZELENBQUM7SUFFTyxrQkFBa0IsQ0FBQyxRQUFxQjtRQUM5QyxJQUFJLENBQUMsUUFBUSxFQUFFO1lBQ2IsT0FBTyxJQUFJLENBQUM7U0FD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