@xsolla/payment-client-core 0.2.88 → 0.2.89

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.
@@ -1353,7 +1353,6 @@ var FieldNames;
1353
1353
  FieldNames["payViaCheckoutUrl"] = "payViaCheckoutUrl";
1354
1354
  FieldNames["googlePayInitData"] = "googlePayInitData";
1355
1355
  FieldNames["googlePayPaymentData"] = "googlePayPaymentData";
1356
- FieldNames["googlePay3dsRedirect"] = "googlePay3DSRedirect";
1357
1356
  FieldNames["externalCardIssuerCountry"] = "externalCardIssuerCountry";
1358
1357
  })(FieldNames || (FieldNames = {}));
1359
1358
 
@@ -1689,6 +1688,13 @@ class RedirectActionCreator {
1689
1688
  return (response.currentCommand === XpsCommand.checkout &&
1690
1689
  Boolean(response.parameters.checkout));
1691
1690
  }
1691
+ getRedirect(submitResponse) {
1692
+ return {
1693
+ redirectUrl: this.getRedirectUrl(submitResponse),
1694
+ isNewWindowRequired: this.getIsNewWindowRequired(submitResponse),
1695
+ data: submitResponse.parameters.checkout.data,
1696
+ };
1697
+ }
1692
1698
  getRedirectUrl(submitResponse) {
1693
1699
  const responseRedirectUrl = submitResponse.parameters.checkout.action;
1694
1700
  const pid = submitResponse?.fields?.find(({ name }) => name === 'fix_pid')?.value;
@@ -1701,13 +1707,6 @@ class RedirectActionCreator {
1701
1707
  }
1702
1708
  return this.preparePagesUrl(pagesPath);
1703
1709
  }
1704
- getRedirect(submitResponse) {
1705
- return {
1706
- redirectUrl: this.getRedirectUrl(submitResponse),
1707
- isNewWindowRequired: this.getIsNewWindowRequired(submitResponse),
1708
- data: submitResponse.parameters.checkout?.data ?? {},
1709
- };
1710
- }
1711
1710
  getIsNewWindowRequired(submitResponse) {
1712
1711
  if (!cardsWith3ds.has(submitResponse?.parameters?.pid)) {
1713
1712
  return false;
@@ -2123,26 +2122,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImpor
2123
2122
  type: Injectable
2124
2123
  }] });
2125
2124
 
2126
- class GoogleThreeDsRedirectActionCreator extends RedirectActionCreator {
2127
- isSuitable(response) {
2128
- return (response.currentCommand === XpsCommand.checkout &&
2129
- !response.parameters.checkout &&
2130
- Boolean(response.parameters.form?.googlePay3DSRedirect?.value));
2131
- }
2132
- getRedirectUrl(submitResponse) {
2133
- return (String(submitResponse.parameters.form?.googlePay3DSRedirect?.value) ?? '');
2134
- }
2135
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: GoogleThreeDsRedirectActionCreator, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
2136
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: GoogleThreeDsRedirectActionCreator }); }
2137
- }
2138
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: GoogleThreeDsRedirectActionCreator, decorators: [{
2139
- type: Injectable
2140
- }] });
2141
-
2142
2125
  const nextActionsToken = new InjectionToken('Action');
2143
- // The order of strategies is important
2144
2126
  const nextActions = [
2145
- GoogleThreeDsRedirectActionCreator,
2146
2127
  ShowFieldsActionCreator,
2147
2128
  CheckStatusActionCreator,
2148
2129
  SpecialButtonActionCreator,
@@ -7409,10 +7390,7 @@ class PaymentService {
7409
7390
  this.fields = this.getFields();
7410
7391
  this.form = this.formService.createForm(this.fields);
7411
7392
  this.syncService.setup(this.form, this.fields, this.config);
7412
- return {
7413
- response: submitResponse,
7414
- nextAction: this.nextActionService.getNextAction(submitResponse),
7415
- };
7393
+ return submitResponse;
7416
7394
  }
7417
7395
  setupInitialFieldValues() {
7418
7396
  const fieldsToOverride = this.config.overrideFormFields;