UNPKG

@fenil265/fundly-payment-sdk

Version:

Fundly Payment SDK for seamless integration with Fundly Pay systems.

81 lines 2.94 kB
import type { ReactNode } from "react"; interface PaymentInvoice { invoiceId: string; paidAmount: number; } interface PartnerCredentials { username: string; password: string; } interface TenureMapping { tenureValue: number; tenureUnit: string; } interface PaymentContextType { partnerCredentials: PartnerCredentials | null; setPartnerCredentials: (credentials: PartnerCredentials) => void; distributorName: string | null; setDistributorName: (name: string) => void; chemistName: string | null; setChemistName: (name: string) => void; tenureMappings: TenureMapping[]; setTenureMappings: (mappings: TenureMapping[]) => void; payableValue: string | null; setPayableValue: (value: string) => void; typeOfApp: string | null; setTypeOfApp: (type: string) => void; distributorIdnum: string | null; setDistributorIdnum: (id: string) => void; payerMobileNumber: string | null; setPayerMobileNumber: (mobile: string) => void; chemistId: string | null; setChemistId: (id: string) => void; invoices: number[]; setInvoices: (ids: number[]) => void; paymentInvoice: PaymentInvoice[]; setPaymentInvoice: (invoices: PaymentInvoice[]) => void; paymentType: string | null; setPaymentType: (type: string) => void; fiCode: string | null; setFiCode: (code: string) => void; salesmanPhoneNumber: string | null; setSalesmanPhoneNumber: (phone: string) => void; salesmanId: number | null; setSalesmanId: (id: number) => void; redirectionUrl: string | null; setRedirectionUrl: (url: string) => void; transactionId: string | null; setTransactionId: (id: string) => void; showResultOnly: boolean; setShowResultOnly: (show: boolean) => void; successButtonText: string; setSuccessButtonText: (text: string) => void; failureButtonText: string; setFailureButtonText: (text: string) => void; } interface PaymentProviderProps { children: ReactNode; initialValues?: { sandbox?: boolean; partnerCredentials?: PartnerCredentials; distributorIdnum?: string; chemistId?: string; typeOfApp?: string; paymentInvoice?: PaymentInvoice[]; payableValue?: string; paymentType?: string; salesmanId?: number; payerMobileNumber?: string; redirectionUrl?: string; transactionId?: string; showResultOnly?: boolean; successButtonText?: string; failureButtonText?: string; }; } export { PaymentContext }; declare const PaymentContext: import("react").Context<PaymentContextType | undefined>; declare function PaymentProvider({ children, initialValues }: PaymentProviderProps): import("react/jsx-runtime").JSX.Element; export { PaymentProvider }; export type { PartnerCredentials, PaymentInvoice, TenureMapping, PaymentContextType }; //# sourceMappingURL=PaymentContext.d.ts.map