UNPKG

rn-esewa

Version:

A library providing Esewa payment integration to react native applications

43 lines (42 loc) 1.18 kB
declare type ProofOfPayment = { message: { successMessage: string; technicalSuccessMessage: string; }; transactionDetails: { date: string; referenceId: string; status: string; }; code: string; productId: string; productName: string; totalAmount: string; merchantName: string; environment: 'live' | 'test' | 'local'; }; declare type eSewaPaymentSuccessResponse = { completed: boolean; proofOfPayment: ProofOfPayment; }; declare type eSewaPaymentErrorResponse = { hasError: boolean; errorMessage: string; }; export declare type eSewaPaymentResponse = { didCancel?: boolean; } & Partial<eSewaPaymentSuccessResponse> & Partial<eSewaPaymentErrorResponse>; export declare type eSewaOptions = { isDevelopment: boolean; clientId: string; clientSecret: string; productPrice: string; productName: string; productId: string; callbackUrl: string; }; declare type eSewaPaymentSDKType = { initiatePayment(options: eSewaOptions, callback: (response: eSewaPaymentResponse) => void): void; }; declare const _default: eSewaPaymentSDKType; export default _default;