@xsolla/payment-client-core 0.3.9 → 0.3.13
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.
- package/esm2022/lib/core/http/secure-api/secure-api.service.mjs +20 -6
- package/esm2022/lib/core/http/secure-api/token-prefix.const.mjs +3 -0
- package/esm2022/lib/core/payment/payment.service.mjs +5 -1
- package/esm2022/lib/core/payment/status/listen-status/listen-status.service.mjs +3 -1
- package/esm2022/lib/core/payment/status/status.service.mjs +24 -8
- package/esm2022/lib/core/sdk-payment-systems/apple-pay/apple-pay.errors.enum.mjs +2 -1
- package/esm2022/lib/core/sdk-payment-systems/apple-pay/apple-pay.service.mjs +5 -1
- package/esm2022/lib/core/sdk-payment-systems/apple-pay/session-handlers/braintree.handler.mjs +14 -2
- package/esm2022/lib/core/sdk-payment-systems/apple-pay/session-handlers/checkout.handler.mjs +23 -7
- package/esm2022/lib/core/sdk-payment-systems/google-pay/google-pay.service.mjs +12 -4
- package/esm2022/lib/core/settings/settings.service.mjs +2 -1
- package/esm2022/lib/core/user-behaviour-analytics/user-behaviour-event-name.enum.mjs +3 -1
- package/esm2022/lib/core-library.module.mjs +2 -2
- package/esm2022/lib/version.mjs +2 -2
- package/fesm2022/xsolla-payment-client-core.mjs +94 -21
- package/fesm2022/xsolla-payment-client-core.mjs.map +1 -1
- package/lib/core/http/secure-api/secure-api.service.d.ts +3 -0
- package/lib/core/http/secure-api/token-prefix.const.d.ts +2 -0
- package/lib/core/payment/status/status.service.d.ts +1 -0
- package/lib/core/sdk-payment-systems/apple-pay/apple-pay.errors.enum.d.ts +2 -1
- package/lib/core/sdk-payment-systems/apple-pay/session-handlers/checkout.handler.d.ts +3 -1
- package/lib/core/sdk-payment-systems/google-pay/google-pay.service.d.ts +3 -1
- package/lib/core/user-behaviour-analytics/user-behaviour-event-name.enum.d.ts +2 -1
- package/lib/version.d.ts +1 -1
- package/package.json +1 -1
- package/xsolla-payment-client-core-0.3.9.tgz +0 -0
|
@@ -7,8 +7,10 @@ export declare class SecureApiClient {
|
|
|
7
7
|
private readonly httpClient;
|
|
8
8
|
private readonly window;
|
|
9
9
|
private isSandboxMode;
|
|
10
|
+
private token;
|
|
10
11
|
constructor(httpClient: HttpClient, window: ExtendedWindow);
|
|
11
12
|
setSandboxMode(isSandboxMode: boolean): void;
|
|
13
|
+
setToken(token: string): void;
|
|
12
14
|
get<T>(url: string, options?: RequestOptions): Observable<T>;
|
|
13
15
|
post<T, P = URLSearchParams>(url: string, body: P | URLSearchParams | {
|
|
14
16
|
[key: string]: string;
|
|
@@ -16,6 +18,7 @@ export declare class SecureApiClient {
|
|
|
16
18
|
patch<T>(url: string, body: unknown | null, options?: RequestOptions): Observable<T>;
|
|
17
19
|
put<T>(url: string, body: unknown | null, options?: RequestOptions): Observable<T>;
|
|
18
20
|
delete<T>(url: string, options?: RequestOptions): Observable<T>;
|
|
21
|
+
private buildUrl;
|
|
19
22
|
get baseUrl(): string;
|
|
20
23
|
static ɵfac: i0.ɵɵFactoryDeclaration<SecureApiClient, never>;
|
|
21
24
|
static ɵprov: i0.ɵɵInjectableDeclaration<SecureApiClient>;
|
|
@@ -23,6 +23,7 @@ export declare class StatusService {
|
|
|
23
23
|
getStatus(params: StatusRequestParams): Promise<Status>;
|
|
24
24
|
getStatusWithUrlSearchParams(url?: string): Promise<Status>;
|
|
25
25
|
listenFinalStatus(invoice: number): Observable<StatusSettings>;
|
|
26
|
+
stopWaitingStatusUpdates(): void;
|
|
26
27
|
private getRequestParamsFromUrl;
|
|
27
28
|
private startWaitingStatusUpdates;
|
|
28
29
|
static ɵfac: i0.ɵɵFactoryDeclaration<StatusService, never>;
|
|
@@ -3,5 +3,6 @@ export declare enum ApplePayErrors {
|
|
|
3
3
|
deviceIsNotCapableError = "Apple Pay: device is not capable",
|
|
4
4
|
cancelled = "Apple Pay: payment cancelled",
|
|
5
5
|
merchantValidationError = "Apple Pay: merchant validation error",
|
|
6
|
-
braintreeInitializeError = "Apple Pay: Braintree library is not initialized"
|
|
6
|
+
braintreeInitializeError = "Apple Pay: Braintree library is not initialized",
|
|
7
|
+
createPaySessionError = "Apple Pay: Could not create pay session"
|
|
7
8
|
}
|
|
@@ -5,13 +5,15 @@ import { ApplePaySessionHandlerAbstract } from './session-handler.abstract';
|
|
|
5
5
|
import { StartSessionParams } from './start-session-params.interface';
|
|
6
6
|
import { ApplePayCartService } from '../apple-pay-cart/apple-pay-cart.service';
|
|
7
7
|
import { UserBehaviourAnalyticsService } from '../../../user-behaviour-analytics/user-behaviour-analytics.service';
|
|
8
|
+
import { LoggerService } from '../../../exceptions-handling/logger/logger.service';
|
|
8
9
|
import * as i0 from "@angular/core";
|
|
9
10
|
export declare class CheckoutHandler extends ApplePaySessionHandlerAbstract {
|
|
10
11
|
private readonly window;
|
|
11
12
|
private readonly http;
|
|
13
|
+
private readonly loggerService;
|
|
12
14
|
private readonly applePayCartService;
|
|
13
15
|
private readonly userBehaviourAnalyticsService;
|
|
14
|
-
constructor(window: ExtendedWindow, http: HttpClient, applePayCartService: ApplePayCartService, userBehaviourAnalyticsService: UserBehaviourAnalyticsService);
|
|
16
|
+
constructor(window: ExtendedWindow, http: HttpClient, loggerService: LoggerService, applePayCartService: ApplePayCartService, userBehaviourAnalyticsService: UserBehaviourAnalyticsService);
|
|
15
17
|
startSession(params: ApplePayParams, additionalParams: StartSessionParams, applePayFinallyCallback: () => void): void;
|
|
16
18
|
static ɵfac: i0.ɵɵFactoryDeclaration<CheckoutHandler, never>;
|
|
17
19
|
static ɵprov: i0.ɵɵInjectableDeclaration<CheckoutHandler>;
|
|
@@ -9,6 +9,7 @@ import { GooglePayCheckoutPaymentService } from './payment/google-pay-checkout-p
|
|
|
9
9
|
import { GooglePayInstantPaymentService } from './payment/google-pay-instant-payment.service';
|
|
10
10
|
import { LoggerService } from '../../exceptions-handling/logger/logger.service';
|
|
11
11
|
import { GooglePayButtonConfiguration } from './google-pay-button-configuration.interface';
|
|
12
|
+
import { UserBehaviourAnalyticsService } from '../../user-behaviour-analytics/user-behaviour-analytics.service';
|
|
12
13
|
import * as i0 from "@angular/core";
|
|
13
14
|
export declare class GooglePayService {
|
|
14
15
|
private readonly window;
|
|
@@ -17,6 +18,7 @@ export declare class GooglePayService {
|
|
|
17
18
|
private readonly googlePayCheckoutPaymentService;
|
|
18
19
|
private readonly googlePayInstantPaymentService;
|
|
19
20
|
private readonly injector;
|
|
21
|
+
private readonly userBehaviourAnalyticsService;
|
|
20
22
|
private readonly googlePayScriptUrl;
|
|
21
23
|
private readonly readyToPay;
|
|
22
24
|
private readonly paymentWindowIsReady;
|
|
@@ -30,7 +32,7 @@ export declare class GooglePayService {
|
|
|
30
32
|
private onPaymentAuthorized;
|
|
31
33
|
private get libraryWasInitialized();
|
|
32
34
|
private get googlePaymentClientWasInitialized();
|
|
33
|
-
constructor(window: ExtendedWindow, loggerService: LoggerService, paymentSystemProcessingService: PaymentSystemProcessingService, googlePayCheckoutPaymentService: GooglePayCheckoutPaymentService, googlePayInstantPaymentService: GooglePayInstantPaymentService, injector: Injector);
|
|
35
|
+
constructor(window: ExtendedWindow, loggerService: LoggerService, paymentSystemProcessingService: PaymentSystemProcessingService, googlePayCheckoutPaymentService: GooglePayCheckoutPaymentService, googlePayInstantPaymentService: GooglePayInstantPaymentService, injector: Injector, userBehaviourAnalyticsService: UserBehaviourAnalyticsService);
|
|
34
36
|
get readyToPay$(): Observable<boolean | null>;
|
|
35
37
|
get paymentWindowIsReady$(): Observable<void>;
|
|
36
38
|
get paymentWindowIsClose$(): Observable<void>;
|
|
@@ -42,5 +42,6 @@ export declare enum UserBehaviourEventName {
|
|
|
42
42
|
applePayCheckoutPaymentCancel = "apple-pay-checkout-payment-cancel",
|
|
43
43
|
applePayAcquirer = "apple-pay-acquirer",
|
|
44
44
|
googlePayHandleFailedPayment = "google-pay-handle-failed-payment",
|
|
45
|
-
googlePayHandleSuccessfulPayment = "google-pay-handle-successful-payment"
|
|
45
|
+
googlePayHandleSuccessfulPayment = "google-pay-handle-successful-payment",
|
|
46
|
+
sysInstantFlowOpen = "sys-instant_flow-open"
|
|
46
47
|
}
|
package/lib/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const PAYMENT_CLIENT_CORE_VERSION = "0.3.
|
|
1
|
+
export declare const PAYMENT_CLIENT_CORE_VERSION = "0.3.13";
|
package/package.json
CHANGED
|
Binary file
|