np-payment-sdk
Version:
Unified Payment SDK for Nepal (eSewa, Khalti, ConnectIPS, IME Pay, Mobile Banking)
38 lines (37 loc) • 1.2 kB
TypeScript
import { IPaymentGateway, PaymentParams, PaymentResult, VerifyParams, RefundParams, SubscriptionResult, InvoiceResult, WalletResult } from '../types/gateway';
/**
* PayPal payment gateway implementation (real)
*/
export declare class PayPalGateway implements IPaymentGateway {
private config;
private client;
constructor(config: {
clientId: string;
clientSecret: string;
environment?: 'sandbox' | 'production';
});
/**
* Initiate a payment (create order)
*/
pay(params: PaymentParams): Promise<PaymentResult>;
/**
* Verify a payment (get order)
*/
verify(params: VerifyParams): Promise<PaymentResult>;
/**
* Refund a payment (capture refund)
*/
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>;
}