@xsolla/payment-client-core 0.4.0 → 0.5.0

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.
@@ -16,6 +16,13 @@ export declare class CheckStatusService extends XpsApiPart<CheckStatusResponse>
16
16
  constructor(xpsApiService: XpsApiService, settingsService: SettingsService, xpsResponseErrorsMappingService: XpsResponseErrorsMappingService, requestFactory: CheckStatusRequestFactory, responseFactory: CheckStatusResponseFactory);
17
17
  setRequestParams(invoice: number): void;
18
18
  request(): void;
19
+ /**
20
+ * Performs a one-shot getstatus poll and returns the mapped response without
21
+ * emitting it to the shared `response$` stream. Used by StatusService to
22
+ * consult the authoritative terminal signal without interfering with the
23
+ * listen-status polling loop. See PAYMENTS-29021.
24
+ */
25
+ requestStatus(invoice: number): Promise<CheckStatusResponse>;
19
26
  static ɵfac: i0.ɵɵFactoryDeclaration<CheckStatusService, never>;
20
27
  static ɵprov: i0.ɵɵInjectableDeclaration<CheckStatusService>;
21
28
  }
@@ -18,6 +18,7 @@ export declare class ListenStatusService {
18
18
  private destroy$;
19
19
  private listenInvoice;
20
20
  private websocketInvoice;
21
+ private pendingTerminalStatus;
21
22
  get websocketOpened$(): Observable<StatusSettings>;
22
23
  get statusUpdated$(): Observable<StatusUpdated>;
23
24
  constructor(statusService: StatusRequestService, checkStatusService: CheckStatusService, websocketStatusService: WebsocketStatusService, userBehaviourAnalyticsService: UserBehaviourAnalyticsService);
@@ -8,6 +8,7 @@ import { StatusUpdatedActionCreator } from '../actions/status-updated/status-upd
8
8
  import { UrlService } from '../../url/url.service';
9
9
  import { FinanceDetailsService } from '../finance-details/finance-details.service';
10
10
  import { SavePaymentMethodStatusService } from './save-payment-method-status/save-payment-method-status.service';
11
+ import { CheckStatusService } from './check-status/check-status.service';
11
12
  import { StatusSettings } from './status-settings.interface';
12
13
  import * as i0 from "@angular/core";
13
14
  export declare class StatusService {
@@ -17,13 +18,24 @@ export declare class StatusService {
17
18
  private readonly listenStatusService;
18
19
  private readonly nextActionService;
19
20
  private readonly savePaymentMethodStatusService;
21
+ private readonly checkStatusService;
20
22
  private readonly statusUpdatedActionCreator;
21
23
  private listenStatusSubscription;
22
- constructor(urlService: UrlService, statusRequestService: StatusRequestService, financeDetailsService: FinanceDetailsService, listenStatusService: ListenStatusService, nextActionService: NextActionService, savePaymentMethodStatusService: SavePaymentMethodStatusService, statusUpdatedActionCreator: StatusUpdatedActionCreator);
24
+ constructor(urlService: UrlService, statusRequestService: StatusRequestService, financeDetailsService: FinanceDetailsService, listenStatusService: ListenStatusService, nextActionService: NextActionService, savePaymentMethodStatusService: SavePaymentMethodStatusService, checkStatusService: CheckStatusService, statusUpdatedActionCreator: StatusUpdatedActionCreator);
23
25
  getStatus(params: StatusRequestParams): Promise<Status>;
24
26
  getStatusWithUrlSearchParams(url?: string): Promise<Status>;
25
27
  listenFinalStatus(invoice: number): Observable<StatusSettings>;
26
28
  stopWaitingStatusUpdates(): void;
29
+ /**
30
+ * The full-status endpoint can report a non-terminal state (e.g.
31
+ * `processing` with group `delivering`) for a transaction that has actually
32
+ * been terminated — most notably a card payment declined by AFS and then
33
+ * auto-refunded. In that scenario the lightweight getstatus poll is the only
34
+ * authoritative terminal signal (`status: canceled`, `final: true`), so we
35
+ * consult it and surface the terminal verdict to the partner instead of
36
+ * leaving `statusState` stuck on `processing`.
37
+ */
38
+ private applyPollTerminalStatus;
27
39
  private getRequestParamsFromUrl;
28
40
  private startWaitingStatusUpdates;
29
41
  static ɵfac: i0.ɵɵFactoryDeclaration<StatusService, never>;
package/lib/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const PAYMENT_CLIENT_CORE_VERSION = "0.4.0";
1
+ export declare const PAYMENT_CLIENT_CORE_VERSION = "0.5.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xsolla/payment-client-core",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "engines": {
5
5
  "node": ">=16.10.0",
6
6
  "npm": ">=8.11.0"