UNPKG

react-native-plugpag-lib

Version:

Integre facilmente as principais formas de pagamento da PagSeguro em seus aplicativos React Native através deste módulo nativo.

95 lines 2.92 kB
export declare enum PaymentTypes { CREDIT = 1, DEBIT = 2, VOUCHER = 3, PIX_QR_CODE = 5 } export declare enum InstallmentTypes { NO_INSTALLMENT = 1, SELLER_INSTALLMENT = 2, BUYER_INSTALLMENT = 3 } export type InitializeAndActivatePinPadResponse = { result: number; errorCode?: string; errorMessage?: string; }; export type PlugPagPaymentDataProps = { amount: number; type: PaymentTypes; installmentType: InstallmentTypes; installments: number; printReceipt: boolean; userReference?: string; }; export type PaymentTransactionResponseProps = { result: number; errorCode?: string; message?: string; transactionCode?: string; transactionId?: string; hostNsu?: string; date?: string; time?: string; cardBrand?: string; bin?: string; holder?: string; userReference?: string; terminalSerialNumber?: string; amount?: string; availableBalance?: string; cardApplication?: string; label?: string; holderName?: string; extendedHolderName?: string; }; export type PlugPagRefundPaymentDataProps = { transactionCode: string; transactionId: string; printReceipt: boolean; }; export type RefundPaymentTransactionResponseProps = { result: number; errorCode?: string; message?: string; transactionCode?: string; transactionId?: string; hostNsu?: string; date?: string; time?: string; cardBrand?: string; bin?: string; holder?: string; userReference?: string; terminalSerialNumber?: string; amount?: string; availableBalance?: string; cardApplication?: string; label?: string; holderName?: string; extendedHolderName?: string; }; export type TransactionPaymentEventProps = { code: number; message: string; }; export type AbortResponseProps = { result: boolean; }; export type ReadNFCCardResponseProps = { uid: string; }; export declare const plugPag: { installmentTypes: typeof InstallmentTypes; paymentTypes: typeof PaymentTypes; }; export declare function initializeAndActivatePinPad(activationCode: String): Promise<InitializeAndActivatePinPadResponse>; export declare function doPayment({ amount, installmentType, installments, printReceipt, type, userReference, }: PlugPagPaymentDataProps): Promise<PaymentTransactionResponseProps>; export declare function refundPayment(refundPaymentData: PlugPagRefundPaymentDataProps): Promise<RefundPaymentTransactionResponseProps>; export declare function print(filePath: string): Promise<void>; export declare function reprintCustomerReceipt(): Promise<void>; export declare function useTransactionPaymentEvent(): TransactionPaymentEventProps; export declare function doAbort(): Promise<AbortResponseProps>; export declare function readNFCCard(): Promise<ReadNFCCardResponseProps>; export default plugPag; //# sourceMappingURL=index.d.ts.map