np-payment-sdk
Version:
Unified Payment SDK for Nepal (eSewa, Khalti, ConnectIPS, IME Pay, Mobile Banking)
39 lines (38 loc) • 1.25 kB
TypeScript
import { IPaymentGateway, PaymentParams, PaymentResult, VerifyParams, RefundParams, SubscriptionResult, InvoiceResult, WalletResult } from '../types/gateway';
import { CFEnvironment } from 'cashfree-pg/dist/configuration';
/**
* Cashfree payment gateway implementation (real)
*/
export declare class CashfreeGateway implements IPaymentGateway {
private config;
private cashfree;
constructor(config: {
clientId: string;
clientSecret: string;
environment?: CFEnvironment;
});
/**
* Initiate a payment (create order)
*/
pay(params: PaymentParams): Promise<PaymentResult>;
/**
* Verify a payment (fetch order)
*/
verify(params: VerifyParams): Promise<PaymentResult>;
/**
* Refund a payment
*/
refund(params: RefundParams): Promise<PaymentResult>;
/**
* Create a subscription (not implemented)
*/
subscribe(_params?: Record<string, unknown>): Promise<SubscriptionResult>;
/**
* Create an invoice (not implemented)
*/
createInvoice(_params?: Record<string, unknown>): Promise<InvoiceResult>;
/**
* Wallet operations (not supported)
*/
wallet(_params?: Record<string, unknown>): Promise<WalletResult>;
}