eservices-core 1.0.563 → 1.0.564
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.
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { UtcDate } from "./main";
|
|
2
|
+
export interface IOnlinePayment {
|
|
3
|
+
onlinePayment: {
|
|
4
|
+
amount: number;
|
|
5
|
+
bankName: string;
|
|
6
|
+
currencyCode: string;
|
|
7
|
+
id: number;
|
|
8
|
+
number: string;
|
|
9
|
+
payerId: number;
|
|
10
|
+
paymentId: number;
|
|
11
|
+
statusCode: string;
|
|
12
|
+
token: string;
|
|
13
|
+
utcCreated: UtcDate | null;
|
|
14
|
+
utcDeleted: UtcDate | null;
|
|
15
|
+
utcModified: UtcDate | null;
|
|
16
|
+
utcRestored: UtcDate | null;
|
|
17
|
+
version: number;
|
|
18
|
+
};
|
|
19
|
+
redirectUrl: string;
|
|
20
|
+
}
|
|
21
|
+
export interface IApplyResultOnlinePayment {
|
|
22
|
+
a: 1;
|
|
23
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IOnlinePayment, IApplyResultOnlinePayment } from "./../../../backend/src/types/billing";
|
|
1
2
|
export default class billingService {
|
|
2
3
|
private static url;
|
|
3
4
|
static getBillingMetadata(entityName: string): Promise<Response>;
|
|
@@ -11,7 +12,12 @@ export default class billingService {
|
|
|
11
12
|
/**
|
|
12
13
|
* @description Метод для создания онлайн платежа.
|
|
13
14
|
* */
|
|
14
|
-
static createOnlinePayment(paymentId: number): Promise<
|
|
15
|
+
static createOnlinePayment(paymentId: number): Promise<IOnlinePayment>;
|
|
16
|
+
/**
|
|
17
|
+
* @description Подтверждение online платежа. После получение ответа от банка(в момент редирект), мы должны отправить
|
|
18
|
+
* все полученные данные(в нашем случае весь URL) на аппсервер.
|
|
19
|
+
* */
|
|
20
|
+
static applyOnlinePayment(response: any): Promise<IApplyResultOnlinePayment>;
|
|
15
21
|
}
|
|
16
22
|
interface IBillingField {
|
|
17
23
|
"name": string;
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* eservices-core v1.0.
|
|
2
|
+
* eservices-core v1.0.564
|
|
3
3
|
* (c) 2023 ESERVICES
|
|
4
4
|
*/
|
|
5
5
|
'use strict';
|
|
@@ -5751,6 +5751,21 @@ class billingService {
|
|
|
5751
5751
|
})
|
|
5752
5752
|
});
|
|
5753
5753
|
}
|
|
5754
|
+
/**
|
|
5755
|
+
* @description Подтверждение online платежа. После получение ответа от банка(в момент редирект), мы должны отправить
|
|
5756
|
+
* все полученные данные(в нашем случае весь URL) на аппсервер.
|
|
5757
|
+
* */
|
|
5758
|
+
static applyOnlinePayment(response) {
|
|
5759
|
+
return Request(`/${billingService.url()}/online-payment`, {
|
|
5760
|
+
method: "PUT",
|
|
5761
|
+
headers: {
|
|
5762
|
+
'Content-Type': 'application/json'
|
|
5763
|
+
},
|
|
5764
|
+
body: JSON.stringify({
|
|
5765
|
+
response
|
|
5766
|
+
})
|
|
5767
|
+
});
|
|
5768
|
+
}
|
|
5754
5769
|
}
|
|
5755
5770
|
|
|
5756
5771
|
class configurationService {
|