@xsolla/payment-client-core 0.2.8 → 0.2.9

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.
Files changed (25) hide show
  1. package/esm2020/lib/core/payment/actions/next-action.interface.mjs +1 -1
  2. package/esm2020/lib/core/payment/actions/next-actions.mjs +3 -1
  3. package/esm2020/lib/core/payment/actions/show-qr-code/show-qr-code.action.class.mjs +22 -0
  4. package/esm2020/lib/core/payment/actions/show-qr-code/show-qr-code.action.type.mjs +2 -0
  5. package/esm2020/lib/core/payment/initialize/initialize-request-params.interface.mjs +1 -1
  6. package/esm2020/lib/core/payment/payment.service.mjs +7 -1
  7. package/esm2020/lib/core/payment/xps-api/xps-api.service.mjs +4 -1
  8. package/esm2020/lib/core/settings/configuration.interface.mjs +1 -1
  9. package/esm2020/lib/core/settings/settings.service.mjs +6 -1
  10. package/esm2020/lib/core-library.service.mjs +7 -1
  11. package/fesm2015/xsolla-payment-client-core.mjs +42 -0
  12. package/fesm2015/xsolla-payment-client-core.mjs.map +1 -1
  13. package/fesm2020/xsolla-payment-client-core.mjs +41 -0
  14. package/fesm2020/xsolla-payment-client-core.mjs.map +1 -1
  15. package/lib/core/payment/actions/next-action.interface.d.ts +2 -1
  16. package/lib/core/payment/actions/show-qr-code/show-qr-code.action.class.d.ts +11 -0
  17. package/lib/core/payment/actions/show-qr-code/show-qr-code.action.type.d.ts +3 -0
  18. package/lib/core/payment/initialize/initialize-request-params.interface.d.ts +1 -0
  19. package/lib/core/payment/payment.service.d.ts +1 -0
  20. package/lib/core/settings/configuration.interface.d.ts +1 -0
  21. package/lib/core/settings/settings.service.d.ts +2 -0
  22. package/lib/core-library.service.d.ts +4 -0
  23. package/package.json +1 -1
  24. package/xsolla-payment-client-core-0.2.9.tgz +0 -0
  25. package/xsolla-payment-client-core-0.2.8.tgz +0 -0
@@ -5,4 +5,5 @@ import { RedirectAction } from './redirect/redirect.action.type';
5
5
  import { ShowErrorsAction } from './show-errors/show-errors.action.type';
6
6
  import { ThreeDsAction } from './three-ds/three-ds.action.type';
7
7
  import { SpecialButtonAction } from './special-button/special-button.action.type';
8
- export type NextAction = CheckStatusAction | ShowFieldsAction | StatusUpdatedAction | ShowErrorsAction | RedirectAction | ThreeDsAction | SpecialButtonAction;
8
+ import { ShowQrCodeAction } from './show-qr-code/show-qr-code.action.type';
9
+ export type NextAction = CheckStatusAction | ShowFieldsAction | StatusUpdatedAction | ShowErrorsAction | RedirectAction | ThreeDsAction | SpecialButtonAction | ShowQrCodeAction;
@@ -0,0 +1,11 @@
1
+ import { SubmitResponse } from '../../submit/response/submit-response.class';
2
+ import { ActionCreator } from '../action.interface';
3
+ import { ShowQrCodeAction, ShowQrCodeActionType } from './show-qr-code.action.type';
4
+ import * as i0 from "@angular/core";
5
+ export declare class ShowQrCodeActionCreator implements ActionCreator {
6
+ readonly type: ShowQrCodeActionType;
7
+ getActionData(): ShowQrCodeAction;
8
+ isSuitable(response: SubmitResponse): boolean;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<ShowQrCodeActionCreator, never>;
10
+ static ɵprov: i0.ɵɵInjectableDeclaration<ShowQrCodeActionCreator>;
11
+ }
@@ -0,0 +1,3 @@
1
+ import { Action } from '../action.interface';
2
+ export type ShowQrCodeActionType = 'show_qr_code';
3
+ export type ShowQrCodeAction = Action<ShowQrCodeActionType, null>;
@@ -9,4 +9,5 @@ export interface InitializeRequestParams {
9
9
  paymentWithSavedMethod: XpsBoolean;
10
10
  saved_method_id?: number;
11
11
  save_payment_account_only: XpsBoolean;
12
+ mobile?: XpsBoolean;
12
13
  }
@@ -61,6 +61,7 @@ export declare class PaymentService {
61
61
  submit(): Promise<NextAction | null | void>;
62
62
  getFields(): Field[];
63
63
  getInitialDataForSdkPaymentSystems(): SdkPaymentSystemsInitialData;
64
+ getQrCode(): string;
64
65
  getPid(): number | null;
65
66
  validate(field: Field): Promise<ValidationErrors | null>;
66
67
  runThreeDs(): void;
@@ -1,5 +1,6 @@
1
1
  export interface InitConfiguration {
2
2
  token: string;
3
+ isMobile: boolean;
3
4
  isWebview?: boolean;
4
5
  sandbox?: boolean;
5
6
  }
@@ -16,11 +16,13 @@ export declare class SettingsService {
16
16
  get utilsResponse(): DeepReadonly<UtilsResponse>;
17
17
  get isEmpty(): boolean;
18
18
  get token(): string;
19
+ get isMobile(): boolean;
19
20
  get hasResponse(): boolean;
20
21
  isInitialized: boolean;
21
22
  private response;
22
23
  private _token;
23
24
  private sandboxMode;
25
+ private _isMobile;
24
26
  constructor(secureApi: SecureApiClient);
25
27
  init(configuration: InitConfiguration): Promise<void>;
26
28
  isSandboxMode(): boolean;
@@ -65,6 +65,10 @@ export declare class CoreLibraryService {
65
65
  constructor(settingsService: SettingsService, countryService: CountryService, paymentMethodsService: PaymentMethodsService, savedMethodsService: SavedMethodsService, userBalanceService: UserBalanceService, paymentConfigService: PaymentConfigService, paymentService: PaymentService, deviceFingerPrintService: DeviceFingerPrintService, financeDetailsService: FinanceDetailsService, legalService: LegalService, statusService: StatusService, nextActionService: NextActionService, creditCardService: CreditCardService, creditCardStateService: CreditCardStateService, formMessagesService: FormMessagesService, editSavedMethodsService: EditSavedMethodsService, googlePayService: GooglePayService, commonPayProcessingService: PaymentSystemProcessingService);
66
66
  init(configuration: InitConfiguration): Promise<void>;
67
67
  getStatus(url?: string): Promise<Status>;
68
+ getQrCodeInitialData(): {
69
+ qrCode: string;
70
+ pid: number | null;
71
+ };
68
72
  setCountry(country: string): void;
69
73
  getCountry(): string;
70
74
  createPayment(config: PaymentConfig): Payment;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xsolla/payment-client-core",
3
- "version": "0.2.8",
3
+ "version": "0.2.9",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^15.2.0",
6
6
  "@angular/core": "^15.2.0",