@xsolla/payment-client-core 0.2.13 → 0.2.14
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/payment/initialize/initialize-request-params.interface.mjs +1 -1
- package/esm2020/lib/core/payment/initialize/initialize.service.mjs +1 -4
- package/esm2020/lib/core/payment/xps-api/xps-api.service.mjs +2 -1
- package/esm2020/lib/core/settings/configuration.interface.mjs +1 -1
- package/esm2020/lib/core/settings/settings.service.mjs +5 -1
- package/fesm2015/xsolla-payment-client-core.mjs +5 -4
- package/fesm2015/xsolla-payment-client-core.mjs.map +1 -1
- package/fesm2020/xsolla-payment-client-core.mjs +5 -3
- package/fesm2020/xsolla-payment-client-core.mjs.map +1 -1
- package/lib/core/payment/initialize/initialize-request-params.interface.d.ts +0 -1
- package/lib/core/payment/initialize/initialize.service.d.ts +0 -1
- package/lib/core/settings/configuration.interface.d.ts +1 -0
- package/lib/core/settings/settings.service.d.ts +2 -0
- package/package.json +1 -1
- package/xsolla-payment-client-core-0.2.14.tgz +0 -0
- package/xsolla-payment-client-core-0.2.13.tgz +0 -0
|
@@ -144,12 +144,16 @@ class SettingsService {
|
|
|
144
144
|
}
|
|
145
145
|
this._token = configuration.token;
|
|
146
146
|
this.sandboxMode = !!configuration.sandbox;
|
|
147
|
+
this._refer = configuration.refer;
|
|
147
148
|
await this.sendRequest(this.token);
|
|
148
149
|
this.isInitialized = true;
|
|
149
150
|
}
|
|
150
151
|
isSandboxMode() {
|
|
151
152
|
return this.sandboxMode;
|
|
152
153
|
}
|
|
154
|
+
get refer() {
|
|
155
|
+
return this._refer;
|
|
156
|
+
}
|
|
153
157
|
async sendRequest(token) {
|
|
154
158
|
const params = new HttpParams().set('access_token', token);
|
|
155
159
|
this.secureApi.setSandboxMode(this.isSandboxMode());
|
|
@@ -1225,6 +1229,7 @@ class XpsApiService {
|
|
|
1225
1229
|
...this.collectAnalyticsParameters(pid, paymentWithSavedMethod),
|
|
1226
1230
|
...this.collectUserSessionId(),
|
|
1227
1231
|
country: this.countryService.getCountry(),
|
|
1232
|
+
refer: this.settingsService.refer,
|
|
1228
1233
|
...parameters,
|
|
1229
1234
|
};
|
|
1230
1235
|
if (this.userAgentService.isMobileDevice) {
|
|
@@ -2548,14 +2553,11 @@ class InitializeService {
|
|
|
2548
2553
|
this.encryptCreditCardService = encryptCreditCardService;
|
|
2549
2554
|
this.showErrorsActionCreator = showErrorsActionCreator;
|
|
2550
2555
|
this.userBehaviourAnalyticsService = userBehaviourAnalyticsService;
|
|
2551
|
-
// TODO PAYMENTS-15743: replace with new refer id for headless core
|
|
2552
|
-
this.ps4ReferId = '22';
|
|
2553
2556
|
}
|
|
2554
2557
|
async request(config) {
|
|
2555
2558
|
const requestParams = {
|
|
2556
2559
|
access_token: this.settingsService.token,
|
|
2557
2560
|
pid: String(config.paymentMethodId),
|
|
2558
|
-
refer: this.ps4ReferId,
|
|
2559
2561
|
country: this.countryService.getCountry(),
|
|
2560
2562
|
returnUrl: config.returnUrl,
|
|
2561
2563
|
paymentWithSavedMethod: config.paymentWithSavedMethod === true
|