@xsolla/payment-client-core 0.2.76 → 0.2.77
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/esm2022/lib/core/payment/payment.service.mjs +8 -1
- package/esm2022/lib/core/payment/requests/submit/response/submit-response.class.mjs +15 -3
- package/esm2022/lib/core/payment/update-submit-response/update-after-error-rules.const.mjs +34 -0
- package/esm2022/lib/core/payment/xps-response.interface.mjs +1 -1
- package/fesm2022/xsolla-payment-client-core.mjs +53 -2
- package/fesm2022/xsolla-payment-client-core.mjs.map +1 -1
- package/lib/core/payment/payment.service.d.ts +1 -0
- package/lib/core/payment/requests/submit/response/submit-response.class.d.ts +3 -0
- package/lib/core/payment/update-submit-response/update-after-error-rules.const.d.ts +8 -0
- package/lib/core/payment/xps-response.interface.d.ts +6 -9
- package/package.json +1 -1
- package/xsolla-payment-client-core-0.2.77.tgz +0 -0
- package/xsolla-payment-client-core-0.2.76.tgz +0 -0
|
@@ -112,6 +112,7 @@ export declare class PaymentService {
|
|
|
112
112
|
private initializeBehaviourStrategies;
|
|
113
113
|
private destroyBehaviourStrategies;
|
|
114
114
|
private autoSubmitBehaviourStrategies;
|
|
115
|
+
private handleSubmitWithErrors;
|
|
115
116
|
static ɵfac: i0.ɵɵFactoryDeclaration<PaymentService, never>;
|
|
116
117
|
static ɵprov: i0.ɵɵInjectableDeclaration<PaymentService>;
|
|
117
118
|
}
|
|
@@ -2,6 +2,7 @@ import { XpsResponse } from '../../../xps-response.interface';
|
|
|
2
2
|
import { Field } from '../../../field.interface';
|
|
3
3
|
import { Invoice } from '../../../invoice.interface';
|
|
4
4
|
import { XpsCommand } from '../../../xps-comand.enum';
|
|
5
|
+
import { FieldNames } from '../../../field-names.enum';
|
|
5
6
|
import { XsollaNumber } from './xsolla-number.interface';
|
|
6
7
|
export declare class SubmitResponse {
|
|
7
8
|
readonly responseNumber: number;
|
|
@@ -25,4 +26,6 @@ export declare class SubmitResponse {
|
|
|
25
26
|
messages: XpsResponse['messages'];
|
|
26
27
|
xsollaNumber: XsollaNumber;
|
|
27
28
|
constructor(parameters: XpsResponse, responseNumber?: number);
|
|
29
|
+
setFieldValue(fieldName: FieldNames, value: string): void;
|
|
30
|
+
getFieldValue(fieldName: string): string | undefined;
|
|
28
31
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { UntypedFormGroup } from '@angular/forms';
|
|
2
|
+
import { SubmitResponse } from '../requests/submit/response/submit-response.class';
|
|
3
|
+
interface UpdateAfterErrorRule {
|
|
4
|
+
description: string;
|
|
5
|
+
apply(submitResponse: SubmitResponse, form: UntypedFormGroup | null): void;
|
|
6
|
+
}
|
|
7
|
+
export declare const updateAfterErrorRules: UpdateAfterErrorRule[];
|
|
8
|
+
export {};
|
|
@@ -10,13 +10,14 @@ import { XpsError } from './xps-error.interface';
|
|
|
10
10
|
import { XpsMessage } from './xps-message.interface';
|
|
11
11
|
import { XpsSummary } from './xps-summary.interface';
|
|
12
12
|
import { ThreeDsForm } from './three-ds/three-ds-form.interface';
|
|
13
|
+
export interface KeyValue<T> {
|
|
14
|
+
[key: string]: T;
|
|
15
|
+
}
|
|
13
16
|
export interface XpsResponse {
|
|
14
17
|
checkout: {
|
|
15
18
|
action: string;
|
|
16
19
|
method: string;
|
|
17
|
-
data:
|
|
18
|
-
[key: string]: string;
|
|
19
|
-
};
|
|
20
|
+
data: KeyValue<string>;
|
|
20
21
|
};
|
|
21
22
|
cardBinCountry?: string;
|
|
22
23
|
idCardType: string;
|
|
@@ -42,9 +43,7 @@ export interface XpsResponse {
|
|
|
42
43
|
};
|
|
43
44
|
accountXsolla: string;
|
|
44
45
|
public_id: string;
|
|
45
|
-
form:
|
|
46
|
-
[key: string]: Field;
|
|
47
|
-
};
|
|
46
|
+
form: KeyValue<Field>;
|
|
48
47
|
taxDisclaimer: string | null;
|
|
49
48
|
number: number;
|
|
50
49
|
barcode: unknown;
|
|
@@ -61,9 +60,7 @@ export interface XpsResponse {
|
|
|
61
60
|
name: string;
|
|
62
61
|
};
|
|
63
62
|
error?: {
|
|
64
|
-
fields:
|
|
65
|
-
[key: string]: string;
|
|
66
|
-
};
|
|
63
|
+
fields: KeyValue<string>;
|
|
67
64
|
};
|
|
68
65
|
invoiceCreated: XpsBoolean;
|
|
69
66
|
messages?: XpsMessage[];
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|