types-magic-api 0.1.28 → 0.1.33
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.
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ProviderAuthToken } from "../../common/model/index.model.js";
|
|
1
2
|
import { OrderItem, OrderPayment, SaaSOrderPayment } from "../../index.model.js";
|
|
2
3
|
export declare enum PaymentStatus {
|
|
3
4
|
New = 1,
|
|
@@ -66,11 +67,14 @@ export interface PaymentSessionRes {
|
|
|
66
67
|
}
|
|
67
68
|
export interface BuyPlanRes extends PaymentSessionRes {
|
|
68
69
|
appLaunchUrl: string;
|
|
70
|
+
providerToken: ProviderAuthToken;
|
|
69
71
|
}
|
|
70
72
|
export interface getPaymentSessionReq {
|
|
71
73
|
sessionid: string;
|
|
72
74
|
providerid: string;
|
|
73
75
|
orderpaymentid: string;
|
|
76
|
+
providerToken?: ProviderAuthToken;
|
|
77
|
+
appUrl?: string;
|
|
74
78
|
}
|
|
75
79
|
export interface PaymentSessionPriceRes {
|
|
76
80
|
order: SaaSOrderPayment;
|
|
@@ -120,7 +124,7 @@ export interface WebhookReq {
|
|
|
120
124
|
req?: unknown;
|
|
121
125
|
}
|
|
122
126
|
export declare abstract class PaymentHandler {
|
|
123
|
-
getSession: (order: OrderPayment, supportedCurrencies: string[], req: PaymentSessionRes) => Promise<object>;
|
|
127
|
+
getSession: (order: OrderPayment, supportedCurrencies: string[], req: PaymentSessionRes, token?: string) => Promise<object>;
|
|
124
128
|
handleWebHook: (paymentResponse: object) => Promise<WebhookReq>;
|
|
125
129
|
saveSubscription: (id: string, req: PaymentSessionRes) => Promise<void>;
|
|
126
130
|
}
|
|
@@ -151,3 +155,15 @@ export interface GetPaymentStatusRes {
|
|
|
151
155
|
status: number;
|
|
152
156
|
transactionCode: string | null;
|
|
153
157
|
}
|
|
158
|
+
export interface getOrderPaymentReq {
|
|
159
|
+
orderId: string;
|
|
160
|
+
orderPaymentId: string;
|
|
161
|
+
provToken: string;
|
|
162
|
+
appUrl: string;
|
|
163
|
+
}
|
|
164
|
+
export interface PaymentRes {
|
|
165
|
+
orderId: string;
|
|
166
|
+
orderPaymentId: string;
|
|
167
|
+
paymentProviderId: string;
|
|
168
|
+
providerToken: ProviderAuthToken;
|
|
169
|
+
}
|