UNPKG

cil-dropin-components

Version:

CIL Dropin Components

81 lines (74 loc) 1.92 kB
/* * @Author: malson * @Date: 2025-06-03 11:06:47 * @Description: */ interface DefaultFont { fontFamily?: string; fontSize?: string; fontWeight?: number; letterSpacing?: string; lineHeight?: string; } interface Appearance { colorAction?: string; colorBackground?: string; colorBoxStroke?: string; colorBoxFillingOutline?: string; colorFormBackground?: string; colorPlaceholder?: string; colorDisabled?: string; colorInverse?: string; colorError?: string; colorFormBorder?: string; colorPrimary?: string; colorSecondary?: string; button?: DefaultFont; heading?: DefaultFont; label?: DefaultFont; inputField?: DefaultFont; paragraph?: DefaultFont; placeholder?: DefaultFont; borderRadius?: [string, string, string]; logoPosition?: 'left' | 'middle' | 'right'; } interface CardOptions { showCardHolderName?: boolean; } interface TnCOptions { showTnC?: boolean; mode?: 'checkbox' | 'click2accept'; url?: string; } interface UIOption { card?: CardOptions; TnC?: TnCOptions; appearance?: Appearance; } interface ResultParams { type?: 'payment'; sessionID?: string; merchantTransID?: string; code?: string; message?: string; econtext?: any; } interface DropInOptions { type?: 'payment'; sessionID?: string; locale?: 'en-US' | 'zh-CN' | 'zh-TW' | 'ja-JP' | 'ko-KR' | 'th-TH' | 'vi-VN' | 'id-ID'; environment?: string; uiOption?: UIOption; payment_completed?: (ret: ResultParams) => void; payment_failed?: (ret: ResultParams) => void; payment_not_preformed?: (ret: ResultParams) => void; payment_cancelled?: (ret: ResultParams) => void; id?: string; } declare class DropInSDK { constructor(options?: DropInOptions); private initialize(): DropInSDK; private destroy(): void; } export default DropInSDK; export { DropInOptions, UIOption, TnCOptions, CardOptions, Appearance, DefaultFont, ResultParams, DropInSDK };