UNPKG

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!

23 lines (22 loc) • 809 B
import { BkashExecutePaymentResponse, BkashQueryPaymentResponse, PaymentData } from '../types/interfaces'; import { BaseGateway } from './base.gateway'; export declare class BkashGateway extends BaseGateway { private readonly username; private readonly password; private readonly appKey; private readonly appSecret; private readonly baseUrl; private authToken; constructor(config: { username: string; password: string; appKey: string; appSecret: string; isSandbox?: boolean; }); private getAuthToken; processPayment(data: PaymentData): Promise<string>; private mapToBkash; executePayment(paymentId: string): Promise<BkashExecutePaymentResponse>; queryPayment(paymentId: string): Promise<BkashQueryPaymentResponse>; }