@xsolla/payment-client-core 0.2.5 → 0.2.6
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/esm2020/lib/core/sdk-payment-systems/google-pay/google-pay.service.mjs +4 -15
- package/fesm2015/xsolla-payment-client-core.mjs +11 -21
- package/fesm2015/xsolla-payment-client-core.mjs.map +1 -1
- package/fesm2020/xsolla-payment-client-core.mjs +11 -21
- package/fesm2020/xsolla-payment-client-core.mjs.map +1 -1
- package/lib/core/sdk-payment-systems/google-pay/google-pay.service.d.ts +1 -4
- package/package.json +1 -1
- package/xsolla-payment-client-core-0.2.6.tgz +0 -0
- package/xsolla-payment-client-core-0.2.5.tgz +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { InjectionToken, Injectable, Inject, Pipe, isDevMode, NgModule } from '@angular/core';
|
|
3
3
|
import { firstValueFrom, lastValueFrom, map, Subject, BehaviorSubject, filter as filter$1, takeUntil, skip, take, throwError } from 'rxjs';
|
|
4
|
-
import * as
|
|
4
|
+
import * as i1 from '@angular/common/http';
|
|
5
5
|
import { HttpParams, HttpHeaders, HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
|
|
6
6
|
import JSEncrypt from 'jsencrypt';
|
|
7
7
|
import { UntypedFormGroup, Validators, UntypedFormControl, ReactiveFormsModule } from '@angular/forms';
|
|
8
8
|
import { filter, map as map$1, tap, catchError } from 'rxjs/operators';
|
|
9
|
-
import * as i1 from '@angular/router';
|
|
9
|
+
import * as i1$1 from '@angular/router';
|
|
10
10
|
import { CommonModule } from '@angular/common';
|
|
11
11
|
|
|
12
12
|
const masksFunctionsMap = {
|
|
@@ -71,14 +71,14 @@ class SecureApiClient {
|
|
|
71
71
|
return this.isSandboxMode ? sandboxApiUrl : defaultApiUrl;
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
SecureApiClient.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: SecureApiClient, deps: [{ token:
|
|
74
|
+
SecureApiClient.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: SecureApiClient, deps: [{ token: i1.HttpClient }, { token: windowToken }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
75
75
|
SecureApiClient.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: SecureApiClient, providedIn: 'root' });
|
|
76
76
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: SecureApiClient, decorators: [{
|
|
77
77
|
type: Injectable,
|
|
78
78
|
args: [{
|
|
79
79
|
providedIn: 'root',
|
|
80
80
|
}]
|
|
81
|
-
}], ctorParameters: function () { return [{ type:
|
|
81
|
+
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: undefined, decorators: [{
|
|
82
82
|
type: Inject,
|
|
83
83
|
args: [windowToken]
|
|
84
84
|
}] }]; } });
|
|
@@ -4294,7 +4294,7 @@ class ElkLoggerService {
|
|
|
4294
4294
|
})).catch((err) => console.error('Elk Logger: request error', err));
|
|
4295
4295
|
}
|
|
4296
4296
|
}
|
|
4297
|
-
ElkLoggerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: ElkLoggerService, deps: [{ token: windowToken }, { token: SettingsService }, { token:
|
|
4297
|
+
ElkLoggerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: ElkLoggerService, deps: [{ token: windowToken }, { token: SettingsService }, { token: i1.HttpClient }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4298
4298
|
ElkLoggerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: ElkLoggerService, providedIn: 'root' });
|
|
4299
4299
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: ElkLoggerService, decorators: [{
|
|
4300
4300
|
type: Injectable,
|
|
@@ -4304,7 +4304,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
|
|
|
4304
4304
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
4305
4305
|
type: Inject,
|
|
4306
4306
|
args: [windowToken]
|
|
4307
|
-
}] }, { type: SettingsService }, { type:
|
|
4307
|
+
}] }, { type: SettingsService }, { type: i1.HttpClient }, { type: i0.NgZone }]; } });
|
|
4308
4308
|
|
|
4309
4309
|
class CentrifugoWebSocketService {
|
|
4310
4310
|
constructor(elkLoggerService) {
|
|
@@ -5830,18 +5830,14 @@ class GooglePayService {
|
|
|
5830
5830
|
get googlePaymentClientWasInitialized() {
|
|
5831
5831
|
return !!this.googlePaymentClient;
|
|
5832
5832
|
}
|
|
5833
|
-
constructor(window, commonPayProcessingService,
|
|
5833
|
+
constructor(window, commonPayProcessingService, injector) {
|
|
5834
5834
|
this.window = window;
|
|
5835
5835
|
this.commonPayProcessingService = commonPayProcessingService;
|
|
5836
|
-
this.httpClient = httpClient;
|
|
5837
5836
|
this.injector = injector;
|
|
5838
5837
|
this.googlePayScriptUrl = 'https://pay.google.com/gp/p/js/pay.js';
|
|
5839
5838
|
this.readyToPay = new BehaviorSubject(null);
|
|
5840
5839
|
this.checkout = null;
|
|
5841
5840
|
this.googlePaymentClient = null;
|
|
5842
|
-
this.commonPayProcessingService.status$.subscribe((path) => {
|
|
5843
|
-
this.sendUserBack(path);
|
|
5844
|
-
});
|
|
5845
5841
|
}
|
|
5846
5842
|
get readyToPay$() {
|
|
5847
5843
|
return this.readyToPay.asObservable();
|
|
@@ -5849,9 +5845,6 @@ class GooglePayService {
|
|
|
5849
5845
|
isReadyToPay() {
|
|
5850
5846
|
return this.readyToPay.getValue();
|
|
5851
5847
|
}
|
|
5852
|
-
sendUserBack(path) {
|
|
5853
|
-
this.httpClient.get(path, { responseType: 'text' }).subscribe();
|
|
5854
|
-
}
|
|
5855
5848
|
initGooglePayLibrary(data) {
|
|
5856
5849
|
this.isSandbox = data.isSandbox;
|
|
5857
5850
|
this.country = data.country;
|
|
@@ -5930,8 +5923,6 @@ class GooglePayService {
|
|
|
5930
5923
|
returnUrl.searchParams.append('descriptor', data.descriptor);
|
|
5931
5924
|
returnUrl.searchParams.append('paymentData', JSON.stringify(paymentData));
|
|
5932
5925
|
this.commonPayProcessingService.emitPayment(returnUrl.toString());
|
|
5933
|
-
console.log('return url success', returnUrl.toString());
|
|
5934
|
-
console.log('return url success obj', returnUrl);
|
|
5935
5926
|
return checkStatusAction;
|
|
5936
5927
|
}
|
|
5937
5928
|
catch (error) {
|
|
@@ -5945,7 +5936,6 @@ class GooglePayService {
|
|
|
5945
5936
|
return null;
|
|
5946
5937
|
}
|
|
5947
5938
|
const returnUrl = this.checkout.request.form.fields.returnFailUrl;
|
|
5948
|
-
console.log('fail return url', returnUrl);
|
|
5949
5939
|
this.commonPayProcessingService.emitPayment(returnUrl);
|
|
5950
5940
|
return checkStatusAction;
|
|
5951
5941
|
}
|
|
@@ -5995,7 +5985,7 @@ class GooglePayService {
|
|
|
5995
5985
|
return statusCode.toLowerCase() === 'canceled';
|
|
5996
5986
|
}
|
|
5997
5987
|
}
|
|
5998
|
-
GooglePayService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: GooglePayService, deps: [{ token: windowToken }, { token: PaymentSystemProcessingService }, { token:
|
|
5988
|
+
GooglePayService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: GooglePayService, deps: [{ token: windowToken }, { token: PaymentSystemProcessingService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5999
5989
|
GooglePayService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: GooglePayService, providedIn: 'root' });
|
|
6000
5990
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: GooglePayService, decorators: [{
|
|
6001
5991
|
type: Injectable,
|
|
@@ -6005,7 +5995,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
|
|
|
6005
5995
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
6006
5996
|
type: Inject,
|
|
6007
5997
|
args: [windowToken]
|
|
6008
|
-
}] }, { type: PaymentSystemProcessingService }, { type:
|
|
5998
|
+
}] }, { type: PaymentSystemProcessingService }, { type: i0.Injector }]; } });
|
|
6009
5999
|
|
|
6010
6000
|
class CoreLibraryService {
|
|
6011
6001
|
constructor(settingsService, countryService, paymentMethodsService, savedMethodsService, userBalanceService, paymentConfigService, paymentService, deviceFingerPrintService, financeDetailsService, legalService, statusService, nextActionService, creditCardService, creditCardStateService, formMessagesService, editSavedMethodsService, googlePayService, commonPayProcessingService) {
|
|
@@ -6172,11 +6162,11 @@ class HttpExceptionsInterceptor {
|
|
|
6172
6162
|
}));
|
|
6173
6163
|
}
|
|
6174
6164
|
}
|
|
6175
|
-
HttpExceptionsInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: HttpExceptionsInterceptor, deps: [{ token: i1.Router }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
6165
|
+
HttpExceptionsInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: HttpExceptionsInterceptor, deps: [{ token: i1$1.Router }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
6176
6166
|
HttpExceptionsInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: HttpExceptionsInterceptor });
|
|
6177
6167
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: HttpExceptionsInterceptor, decorators: [{
|
|
6178
6168
|
type: Injectable
|
|
6179
|
-
}], ctorParameters: function () { return [{ type: i1.Router }]; } });
|
|
6169
|
+
}], ctorParameters: function () { return [{ type: i1$1.Router }]; } });
|
|
6180
6170
|
|
|
6181
6171
|
class ValidatorsModule {
|
|
6182
6172
|
}
|