@xsolla/payment-client-core 0.2.99 → 0.2.100

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 (27) hide show
  1. package/esm2022/lib/core/payment/actions/next-action.interface.mjs +1 -1
  2. package/esm2022/lib/core/payment/actions/next-actions.mjs +3 -1
  3. package/esm2022/lib/core/payment/actions/three-ds-redirect/three-ds-redirect.action.class.mjs +34 -0
  4. package/esm2022/lib/core/payment/actions/three-ds-redirect/three-ds-redirect.action.type.mjs +2 -0
  5. package/esm2022/lib/core/payment/three-ds/api/status-three-ds/response/status-three-ds-response.class.mjs +2 -1
  6. package/esm2022/lib/core/payment/three-ds/api/status-three-ds/status-three-ds-response.interface.mjs +1 -1
  7. package/esm2022/lib/core/payment/three-ds/api/status-three-ds/status-three-ds.service.mjs +2 -1
  8. package/esm2022/lib/core/payment/three-ds/api/status-three-ds/status-types.enum.mjs +2 -1
  9. package/esm2022/lib/core/payment/three-ds/three-ds-20/status-update.interface.mjs +1 -1
  10. package/esm2022/lib/core/payment/three-ds/three-ds-20/three-ds20.service.mjs +28 -7
  11. package/esm2022/lib/core/payment/three-ds/three-ds.service.mjs +13 -7
  12. package/esm2022/lib/core/user-behaviour-analytics/user-behaviour-event-name.enum.mjs +2 -1
  13. package/fesm2022/xsolla-payment-client-core.mjs +75 -12
  14. package/fesm2022/xsolla-payment-client-core.mjs.map +1 -1
  15. package/lib/core/payment/actions/next-action.interface.d.ts +2 -1
  16. package/lib/core/payment/actions/three-ds-redirect/three-ds-redirect.action.class.d.ts +11 -0
  17. package/lib/core/payment/actions/three-ds-redirect/three-ds-redirect.action.type.d.ts +5 -0
  18. package/lib/core/payment/three-ds/api/status-three-ds/response/status-three-ds-response.class.d.ts +2 -0
  19. package/lib/core/payment/three-ds/api/status-three-ds/status-three-ds-response.interface.d.ts +2 -0
  20. package/lib/core/payment/three-ds/api/status-three-ds/status-types.enum.d.ts +1 -0
  21. package/lib/core/payment/three-ds/three-ds-20/status-update.interface.d.ts +5 -1
  22. package/lib/core/payment/three-ds/three-ds-20/three-ds20.service.d.ts +3 -0
  23. package/lib/core/payment/three-ds/three-ds.service.d.ts +3 -1
  24. package/lib/core/user-behaviour-analytics/user-behaviour-event-name.enum.d.ts +1 -0
  25. package/package.json +1 -1
  26. package/xsolla-payment-client-core-0.2.100.tgz +0 -0
  27. package/xsolla-payment-client-core-0.2.99.tgz +0 -0
@@ -9,4 +9,5 @@ import { ShowQrCodeAction } from './show-qr-code/show-qr-code.action.type';
9
9
  import { ShowMobilePaymentScreenAction } from './show-mobile-payment-screen/show-mobile-payment-screen.action.type';
10
10
  import { ShowXsollaNumberAction } from './show-xsolla-number/show-xsolla-number.action.type';
11
11
  import { ShowCashPaymentInstructionAction } from './show-cash-payment-instruction/show-cash-payment-instruction.action.type';
12
- export type NextAction = CheckStatusAction | ShowFieldsAction | StatusUpdatedAction | ShowErrorsAction | RedirectAction | ThreeDsAction | SpecialButtonAction | ShowQrCodeAction | ShowMobilePaymentScreenAction | ShowXsollaNumberAction | ShowCashPaymentInstructionAction;
12
+ import { ThreeDsRedirectAction } from './three-ds-redirect/three-ds-redirect.action.type';
13
+ export type NextAction = CheckStatusAction | ShowFieldsAction | StatusUpdatedAction | ShowErrorsAction | RedirectAction | ThreeDsAction | ThreeDsRedirectAction | SpecialButtonAction | ShowQrCodeAction | ShowMobilePaymentScreenAction | ShowXsollaNumberAction | ShowCashPaymentInstructionAction;
@@ -0,0 +1,11 @@
1
+ import { ActionCreator } from '../action.interface';
2
+ import { ThreeDsRedirectAction, ThreeDsRedirectActionType } from './three-ds-redirect.action.type';
3
+ import { StatusCheckout } from '../../three-ds/three-ds-20/status-update.interface';
4
+ import * as i0 from "@angular/core";
5
+ export declare class ThreeDsRedirectActionCreator implements ActionCreator {
6
+ type: ThreeDsRedirectActionType;
7
+ getActionData(actionData: StatusCheckout): ThreeDsRedirectAction;
8
+ isSuitable(): boolean;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<ThreeDsRedirectActionCreator, never>;
10
+ static ɵprov: i0.ɵɵInjectableDeclaration<ThreeDsRedirectActionCreator>;
11
+ }
@@ -0,0 +1,5 @@
1
+ import { Action } from '../action.interface';
2
+ import { RedirectActionData } from '../redirect/redirect.action.type';
3
+ export type ThreeDsRedirectActionType = 'redirect';
4
+ export type ThreeDsRedirectActionData = RedirectActionData;
5
+ export type ThreeDsRedirectAction = Action<ThreeDsRedirectActionType, ThreeDsRedirectActionData>;
@@ -1,7 +1,9 @@
1
1
  import { ThreeDsCheckoutForm } from '../three-ds-checkout-form.interface';
2
2
  import { Properties } from '../../../../../properties.type';
3
+ import { ThreeDsForm } from '../../../three-ds-form.interface';
3
4
  export declare class StatusThreeDsResponse {
4
5
  readonly status: string;
5
6
  readonly checkoutForm?: ThreeDsCheckoutForm;
7
+ readonly collectDfpParameters?: ThreeDsForm;
6
8
  constructor(params: Properties<StatusThreeDsResponse>);
7
9
  }
@@ -1,7 +1,9 @@
1
+ import { ThreeDsForm } from '../../three-ds-form.interface';
1
2
  import { ThreeDsCheckoutForm } from './three-ds-checkout-form.interface';
2
3
  export interface StatusThreeDsResponseApi {
3
4
  secure3d: {
4
5
  status: string;
5
6
  checkout_form?: ThreeDsCheckoutForm;
7
+ collect_dfp_parameters?: ThreeDsForm;
6
8
  };
7
9
  }
@@ -1,5 +1,6 @@
1
1
  export declare enum ThreeDsStatusTypes {
2
2
  completed = "completed",
3
3
  challenge = "challenge",
4
+ checkout = "checkout",
4
5
  collectDfp = "collect_dfp"
5
6
  }
@@ -9,4 +9,8 @@ export interface StatusChallenge {
9
9
  type: 'challenge';
10
10
  data: ThreeDsCheckoutForm;
11
11
  }
12
- export type StatusUpdate = StatusComplete | StatusChallenge;
12
+ export interface StatusCheckout {
13
+ type: 'checkout';
14
+ data: ThreeDsCheckoutForm;
15
+ }
16
+ export type StatusUpdate = StatusComplete | StatusChallenge | StatusCheckout;
@@ -21,14 +21,17 @@ export declare class ThreeDs20Service {
21
21
  private webSocketClient;
22
22
  private readonly statusUpdates;
23
23
  private statusRequestSubscription;
24
+ private latestDfpParameters;
24
25
  private readonly notifyDfpTimerId;
25
26
  private readonly notifyDfpTimeoutMs;
26
27
  private readonly statusThreeDsTimerId;
27
28
  private readonly statusThreeDsTimeoutMs;
28
29
  constructor(statusThreeDsService: StatusThreeDsService, notifyDfpStatusService: NotifyDfpStatusService, webSocketFactory: WebSocketFactory, dfpCollectService: DfpCollectService, reinsuranceCheckService: ReinsuranceCheckService, userBehaviourAnalyticsService: UserBehaviourAnalyticsService);
29
30
  checkThreeDs20(threeDsForm: ThreeDsForm | null): Promise<void>;
31
+ private requestThreeDsStatus;
30
32
  private handleThreeDsUpdates;
31
33
  private stopReinsuranceMethods;
34
+ private clearLatestDfpParameters;
32
35
  static ɵfac: i0.ɵɵFactoryDeclaration<ThreeDs20Service, never>;
33
36
  static ɵprov: i0.ɵɵInjectableDeclaration<ThreeDs20Service>;
34
37
  }
@@ -2,6 +2,7 @@ import { NextActionService } from '../actions/next-action.service';
2
2
  import { ThreeDs20Service } from './three-ds-20/three-ds20.service';
3
3
  import { ThreeDsActionCreator } from '../actions/three-ds/three-ds.action.class';
4
4
  import { CheckStatusActionCreator } from '../actions/check-status/check-status.action.class';
5
+ import { ThreeDsRedirectActionCreator } from '../actions/three-ds-redirect/three-ds-redirect.action.class';
5
6
  import { SubmitResponse } from '../requests/submit/response/submit-response.class';
6
7
  import * as i0 from "@angular/core";
7
8
  export declare class ThreeDsService {
@@ -9,8 +10,9 @@ export declare class ThreeDsService {
9
10
  private readonly nextActionService;
10
11
  private readonly checkStatusActionCreator;
11
12
  private readonly threeDsActionCreator;
13
+ private readonly threeDsRedirectActionCreator;
12
14
  private statusSubscription;
13
- constructor(threeDs20Service: ThreeDs20Service, nextActionService: NextActionService, checkStatusActionCreator: CheckStatusActionCreator, threeDsActionCreator: ThreeDsActionCreator);
15
+ constructor(threeDs20Service: ThreeDs20Service, nextActionService: NextActionService, checkStatusActionCreator: CheckStatusActionCreator, threeDsActionCreator: ThreeDsActionCreator, threeDsRedirectActionCreator: ThreeDsRedirectActionCreator);
14
16
  checkThreeDs(params: SubmitResponse): void;
15
17
  stopChecking(): void;
16
18
  static ɵfac: i0.ɵɵFactoryDeclaration<ThreeDsService, never>;
@@ -18,6 +18,7 @@ export declare enum UserBehaviourEventName {
18
18
  syncRequest = "sync-request",
19
19
  threeDs2complete = "3DS-2.0-complete",
20
20
  threeDs2challenge = "3DS-2.0-challenge",
21
+ threeDs2checkout = "3DS-2.0-checkout",
21
22
  threeDs2collectDfp = "3DS-2.0-collect-dfp",
22
23
  applePayRecalculateCartTaxes = "apple-pay-recalculate-cart-taxes",
23
24
  applePayRecalculateCartError = "apple-pay-recalculate-cart-error",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xsolla/payment-client-core",
3
- "version": "0.2.99",
3
+ "version": "0.2.100",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^17.3.3",
6
6
  "@angular/core": "^17.3.3",