UNPKG

@eonx/payment-elements

Version:

- [Configuration](#configuration) - [Create payment card](#create-payment-card) - [Capture payment](#capture-payment) - [Pay now](#pay-now) - [Void payment](#void-payment) - [Types](#types) - [Error handling](#error-handling)

12 lines (11 loc) 416 B
import { PayloadHandler } from '../types/config'; import { Error } from '../core/Error'; import { OrderIntent } from '../types/payments'; export declare function useMethod(options: { apiKey?: string; onError?: PayloadHandler<Error>; onSuccess?: PayloadHandler<any>; }): { emitError: (e: Error | ConstructorParameters<typeof Error>[0]) => void; emitSuccess: (orderIntent: OrderIntent) => void; };