UNPKG

np-payment-sdk

Version:

Unified Payment SDK for Nepal (eSewa, Khalti, ConnectIPS, IME Pay, Mobile Banking)

38 lines (37 loc) 1.13 kB
import { IPaymentGateway, PaymentParams, PaymentResult, VerifyParams, RefundParams } from '../types'; import { SubscriptionResult, InvoiceResult, WalletResult } from '../types/gateway'; /** * Razorpay payment gateway implementation (real) */ export declare class RazorpayGateway implements IPaymentGateway { private config; private razorpay; constructor(config: { keyId: string; keySecret: string; }); /** * Initiate a payment (create order) */ pay(params: PaymentParams): Promise<PaymentResult>; /** * Verify a payment (fetch payment) */ verify(params: VerifyParams): Promise<PaymentResult>; /** * Refund a payment */ refund(params: RefundParams): Promise<PaymentResult>; /** * Create a subscription */ subscribe(_params?: Record<string, unknown>): Promise<SubscriptionResult>; /** * Create an invoice */ createInvoice(_params?: Record<string, unknown>): Promise<InvoiceResult>; /** * Wallet operations (not supported) */ wallet(_params?: Record<string, unknown>): Promise<WalletResult>; }