nestjs-esewa
Version:
This is simple wrapper for Esewa Payment extended from @dallotech/nestjs-esewa. It supports Epay-V2 and transaction verification for Esewa SDK, but later more will be added. Just ping us or open pull request and contribute :)
57 lines • 1.97 kB
TypeScript
import { FactoryProvider, ModuleMetadata } from "@nestjs/common";
export declare const ESEWA_CONFIG_OPTIONS = "ESEWA_CONFIG_OPTIONS";
export declare const ESEWA_PAYMENT_TEST_URL = "https://rc-epay.esewa.com.np/api/epay/main/v2/form";
export declare const ESEWA_PAYMENT_URL = "https://epay.esewa.com.np/api/epay/main/v2/form";
export declare const ESEWA_VALIDATE_TEST_URL = "https://rc.esewa.com.np/api/epay/transaction/status/";
export declare const ESEWA_VALIDATE_URL = "https://epay.esewa.com.np/api/epay/transaction/status/";
export declare const ESEWA_VALIDATE_MOBILE_URL = "https://esewa.com.np/mobile/transaction";
export declare enum PaymentMode {
TEST = "TEST",
LIVE = "LIVE"
}
export interface EsewaRequestDto {
amount: number;
productServiceCharge: number;
productDeliveryCharge: number;
taxAmount: number;
totalAmount: number;
transactionUuid: string;
successUrl: string;
failureUrl: string;
}
export interface EsewaDto {
amount: string;
product_service_charge: string;
product_delivery_charge: string;
tax_amount: string;
total_amount: string;
transaction_uuid: string;
product_code: string;
success_url: string;
failure_url: string;
signed_field_names: string;
signature: string;
payment_url: string;
}
export interface EsewaOptions {
productCode: string;
secretKey: string;
paymentUrlTest?: string;
paymentUrl?: string;
validateUrlTest?: string;
validateUrl?: string;
validateUrlMobile?: string;
paymentMode: PaymentMode;
merchantId?: string;
merchantSecret?: string;
}
export interface EsewaResponseDto {
productCode: string;
transactionUuid: string;
totalAmount: number;
status: string;
refId: string;
}
type EsewaAsyncOptions = Pick<ModuleMetadata, 'imports'> & Pick<FactoryProvider<EsewaOptions>, 'useFactory' | 'inject'>;
export default EsewaAsyncOptions;
//# sourceMappingURL=esewa.interface.d.ts.map