@xsolla/payment-client-core 0.2.4 → 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 +11 -15
- package/esm2020/lib/core/sdk-payment-systems/sdk-payment-systems.interface.mjs +1 -1
- package/esm2020/lib/core-library.service.mjs +1 -2
- package/fesm2015/xsolla-payment-client-core.mjs +18 -22
- package/fesm2015/xsolla-payment-client-core.mjs.map +1 -1
- package/fesm2020/xsolla-payment-client-core.mjs +18 -22
- 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/lib/core/sdk-payment-systems/sdk-payment-systems.interface.d.ts +0 -1
- package/package.json +1 -1
- package/xsolla-payment-client-core-0.2.6.tgz +0 -0
- package/xsolla-payment-client-core-0.2.4.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(decodeURI(path), { responseType: 'text' }).subscribe();
|
|
5854
|
-
}
|
|
5855
5848
|
initGooglePayLibrary(data) {
|
|
5856
5849
|
this.isSandbox = data.isSandbox;
|
|
5857
5850
|
this.country = data.country;
|
|
@@ -5922,10 +5915,14 @@ class GooglePayService {
|
|
|
5922
5915
|
if (!this.checkout) {
|
|
5923
5916
|
throw new AppError('Google Pay: no checkout data in then');
|
|
5924
5917
|
}
|
|
5925
|
-
|
|
5918
|
+
const returnUrl = new URL(this.checkout.request.form.fields.returnSuccessUrl);
|
|
5926
5919
|
const data = this.checkout.request.form.fields;
|
|
5927
|
-
|
|
5928
|
-
|
|
5920
|
+
if (data.cpf_number) {
|
|
5921
|
+
returnUrl.searchParams.append('cpf_number', data.cpf_number.toString());
|
|
5922
|
+
}
|
|
5923
|
+
returnUrl.searchParams.append('descriptor', data.descriptor);
|
|
5924
|
+
returnUrl.searchParams.append('paymentData', JSON.stringify(paymentData));
|
|
5925
|
+
this.commonPayProcessingService.emitPayment(returnUrl.toString());
|
|
5929
5926
|
return checkStatusAction;
|
|
5930
5927
|
}
|
|
5931
5928
|
catch (error) {
|
|
@@ -5988,7 +5985,7 @@ class GooglePayService {
|
|
|
5988
5985
|
return statusCode.toLowerCase() === 'canceled';
|
|
5989
5986
|
}
|
|
5990
5987
|
}
|
|
5991
|
-
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 });
|
|
5992
5989
|
GooglePayService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: GooglePayService, providedIn: 'root' });
|
|
5993
5990
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: GooglePayService, decorators: [{
|
|
5994
5991
|
type: Injectable,
|
|
@@ -5998,7 +5995,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
|
|
|
5998
5995
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
5999
5996
|
type: Inject,
|
|
6000
5997
|
args: [windowToken]
|
|
6001
|
-
}] }, { type: PaymentSystemProcessingService }, { type:
|
|
5998
|
+
}] }, { type: PaymentSystemProcessingService }, { type: i0.Injector }]; } });
|
|
6002
5999
|
|
|
6003
6000
|
class CoreLibraryService {
|
|
6004
6001
|
constructor(settingsService, countryService, paymentMethodsService, savedMethodsService, userBalanceService, paymentConfigService, paymentService, deviceFingerPrintService, financeDetailsService, legalService, statusService, nextActionService, creditCardService, creditCardStateService, formMessagesService, editSavedMethodsService, googlePayService, commonPayProcessingService) {
|
|
@@ -6040,7 +6037,6 @@ class CoreLibraryService {
|
|
|
6040
6037
|
checkPaymentDevice: (base64checkoutData) => this.googlePayService.checkPaymentDevice(base64checkoutData),
|
|
6041
6038
|
proceedCheckout: async () => this.googlePayService.proceedCheckout(),
|
|
6042
6039
|
createButton: (onClickHandler) => this.googlePayService.createButton(onClickHandler),
|
|
6043
|
-
sendUserBack: (path) => this.googlePayService.sendUserBack(path),
|
|
6044
6040
|
},
|
|
6045
6041
|
getInitialData: () => this.paymentService.getInitialDataForSdkPaymentSystems(),
|
|
6046
6042
|
};
|
|
@@ -6166,11 +6162,11 @@ class HttpExceptionsInterceptor {
|
|
|
6166
6162
|
}));
|
|
6167
6163
|
}
|
|
6168
6164
|
}
|
|
6169
|
-
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 });
|
|
6170
6166
|
HttpExceptionsInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: HttpExceptionsInterceptor });
|
|
6171
6167
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: HttpExceptionsInterceptor, decorators: [{
|
|
6172
6168
|
type: Injectable
|
|
6173
|
-
}], ctorParameters: function () { return [{ type: i1.Router }]; } });
|
|
6169
|
+
}], ctorParameters: function () { return [{ type: i1$1.Router }]; } });
|
|
6174
6170
|
|
|
6175
6171
|
class ValidatorsModule {
|
|
6176
6172
|
}
|