@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)
27 lines (26 loc) • 922 B
TypeScript
import { Container, Handler, PayloadHandler, ThemeSource } from '../types/config';
import { PaymentSource, PayNowResult } from '../types/payments';
import { CardDetails } from '../types/card';
import { ApiError, FrameError, PayNowError } from '../types/errors';
import { Error } from '../core/Error';
declare type EmitError = Error<ApiError | PayNowError | FrameError>;
export declare function payNow(options: {
container: Container;
apiKey: string;
orderIntentId: string;
card?: CardDetails;
onError?: PayloadHandler<EmitError>;
onSuccess?: PayloadHandler<PayNowResult>;
isVerificationCodeRequired?: boolean;
isActionsVisible?: boolean;
sourceConfig?: Partial<PaymentSource>;
theme?: ThemeSource;
onProcess?: Handler;
onReady?: Handler;
onMounted?: Handler;
}): {
changeTheme: (theme: string) => void;
submit: () => void;
dispose: () => void;
};
export {};