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)

31 lines (30 loc) 1.34 kB
import { OrderIntent, OrderIntentCreateRequest, PaymentCaptureRequestSource, PaymentSource } from '../types/payments'; import { Error } from '../core/Error'; import { ApiReturn } from '../types/common'; declare function getOrderDetails(orderIntentId: string): ApiReturn<OrderIntent>; declare function getOrders(): ApiReturn<any>; declare function captureOrderPayment(options: { orderIntentId: string; source?: PaymentCaptureRequestSource; }): ApiReturn<OrderIntent>; declare function attachSourceToOrder(options: { orderIntentId: string; amount: string; reference: string; paymentMethodType: string; paymentConfig?: string; consumerOwningEntity?: string; }): Promise<[Error<any> | null, PaymentSource | null]>; declare function createOrder(request: OrderIntentCreateRequest): ApiReturn<any>; declare function voidOrder(orderIntentId: string): ApiReturn<any>; declare function getCardSourceFromOrder(order: OrderIntent): PaymentSource | undefined; export declare function useOrder(): { getOrders: typeof getOrders; getOrderDetails: typeof getOrderDetails; captureOrderPayment: typeof captureOrderPayment; getCardSourceFromOrder: typeof getCardSourceFromOrder; attachSourceToOrder: typeof attachSourceToOrder; createOrder: typeof createOrder; voidOrder: typeof voidOrder; }; export {};