central-gateway
Version:
Simplify payments in Bangladesh with one unified library for AamarPay, SSLCommerz, and bKash. Skip the hassle of multiple gateway documentations—our consistent API does it all for you!
20 lines (19 loc) • 738 B
TypeScript
import { GatewayInstances, GatewayNames, PaymentGatewayConfig } from './types/interfaces';
export declare class PaymentService {
private gateways;
constructor(config: PaymentGatewayConfig);
/**
* Dynamically import and initialize payment gateways.
* @param config The payment gateway configuration.
*/
private initializeGateways;
/**
* Get a specific payment gateway instance.
* @param gatewayName The name of the payment gateway.
* @returns The gateway instance.
* @throws PaymentError if the gateway is not configured.
*/
getGateway<K extends GatewayNames>(gatewayName: K): GatewayInstances[K];
}
export * from './errors/PaymentError';
export * from './types/interfaces';