neppayments
Version:
A simple and easy-to-use package for integrating Nepali payment gateways (Khalti and eSewa) into your applications
38 lines (37 loc) • 1.18 kB
TypeScript
import { KhaltiGateway } from './gateways/khalti';
import { EsewaGateway } from './gateways/esewa';
import { KhaltiConfig, EsewaConfig } from './types/payment.types';
/**
* Main class for handling Nepali payment gateways
*/
export declare class NepPayments {
readonly khalti?: KhaltiGateway;
readonly esewa?: EsewaGateway;
/**
* Create a new NepPayments instance
* @param config Configuration for payment gateways
*/
constructor(config: {
khalti?: KhaltiConfig;
esewa?: EsewaConfig;
});
/**
* Get the configured Khalti gateway
* @throws {PaymentError} If Khalti is not configured
*/
get khaltiGateway(): KhaltiGateway;
/**
* Get the configured eSewa gateway
* @throws {PaymentError} If eSewa is not configured
*/
get esewaGateway(): EsewaGateway;
/**
* Get list of configured gateways
*/
get configuredGateways(): string[];
}
export * from './types/payment.types';
export * from './types/payment.enums';
export { PaymentError } from './types/payment.enums';
export { KhaltiGateway } from './gateways/khalti';
export { EsewaGateway } from './gateways/esewa';