@ribpay/react-payline
Version:
_This is an unofficial repository_
40 lines (39 loc) • 1.84 kB
TypeScript
import React from 'react';
declare type StateType = 'ACTIVE_WAITING' | 'BROWSER_NOT_SUPPORTED' | 'MANAGE_WEB_WALLET' | 'PAYMENT_CANCELED_WITH_RETRY' | 'PAYMENT_CANCELED' | 'PAYMENT_FAILURE_WITH_RETRY' | 'PAYMENT_FAILURE' | 'PAYMENT_METHOD_NEEDS_MORE_INFOS' | 'PAYMENT_METHODS_LIST_SHORTCUT' | 'PAYMENT_METHODS_LIST' | 'PAYMENT_ONHOLD_PARTNER' | 'PAYMENT_REDIRECT_NO_RESPONSE' | 'PAYMENT_SUCCESS_FORCE_TICKET_DISPLAY' | 'PAYMENT_SUCCESS' | 'PAYMENT_TRANSITIONAL_SHORTCUT' | 'TOKEN_EXPIRED';
export declare type WillInitHandler = () => void;
export declare type WillShowHandler = () => void;
export declare type FinalStateHasBeenReachedHandler = (data: {
state: StateType;
}) => false | void;
export declare type DidShowStateHandler = (data: {
state: StateType;
}) => void;
export declare type WillDisplayMessageHandler = (data: {
id: string;
type: 'success' | 'info' | 'error' | 'warn';
key: string;
message: string;
}) => boolean | void;
export declare type WillRemoveMessageHandler = (data: {
id: string;
}) => boolean | void;
export declare type BeforePaymentHandler = () => boolean | void;
declare type PropsType = {
token: string;
template?: string;
embeddedRedirectionAllowed?: boolean;
partnerReturnUrl?: string;
orderId?: string;
redirectUrl?: string;
instantPayment?: 'EXPECTED' | 'USER_CHOICE' | 'NO';
bic?: string;
onWillInit?: WillInitHandler;
onWillShow?: WillShowHandler;
onFinalStateHasBeenReached?: FinalStateHasBeenReachedHandler;
onDidShowState?: DidShowStateHandler;
onWillDisplayMessage?: WillDisplayMessageHandler;
onWillRemoveMessage?: WillRemoveMessageHandler;
onBeforePayment?: BeforePaymentHandler;
} & React.HTMLAttributes<HTMLDivElement>;
declare const PaylineWidget: React.ComponentType<PropsType>;
export default PaylineWidget;