38 lines
754 B
TypeScript
38 lines
754 B
TypeScript
import { GatewayProvider } from "../../../common/enums/payment.enum";
|
|
|
|
export interface IPaymentGateway {
|
|
/**
|
|
*
|
|
* @param gatewayType
|
|
* @param data
|
|
*/
|
|
requestPayment(gatewayType: GatewayProvider, data: NewPaymentData): Promise<any>;
|
|
|
|
/**
|
|
*
|
|
* @param gatewayType
|
|
* @param data
|
|
*/
|
|
verifyPayment(gatewayType: GatewayProvider, data: VerifyPaymentData): Promise<any>;
|
|
|
|
/**
|
|
*
|
|
* @param gatewayType
|
|
* @param authority
|
|
*/
|
|
retryPayment(gatewayType: GatewayProvider, authority: string): Promise<any>;
|
|
}
|
|
|
|
export interface NewPaymentData {
|
|
amount: number;
|
|
description: string;
|
|
email: string;
|
|
mobile: string;
|
|
callbackPath: string;
|
|
}
|
|
|
|
export interface VerifyPaymentData {
|
|
authority: string;
|
|
amount: number;
|
|
}
|