@spot-flow/checkout-inline-js
Version:
This project is an inline library that enables users to make payments seamlessly. It integrates smoothly into your application, providing a streamlined checkout experience.
26 lines (25 loc) • 1.39 kB
TypeScript
export declare const generatePaymentReference: () => string;
export declare const clearNumber: (value?: string) => string;
export declare const formatCreditCardNumber: (value: string) => string;
export declare const clearNumberModified: (value: string) => string;
export declare const formatCreditCardModified: (value: string) => string;
export declare const formatCVC: (value: string) => string;
export declare const formatExpirationDate: (value: string) => string;
export declare const unFormatCreditCardNumber: (value: string) => string;
export declare const formatTime: (seconds: number) => string;
export declare const getCardType: (cardNumber: string) => string;
export declare const cardTypeLength: {
Visa: number[];
MasterCard: number[];
"American Express": number[];
Discover: number[];
UnionPay: number[];
Verve: number[];
};
export declare const showToast: (message: string, theme: "success" | "error" | "info" | "warning", duration?: number) => void;
export declare class Toast {
static createToast: (message: string, theme: "success" | "error" | "info" | "warning") => HTMLDivElement;
static showToast: (message: string, theme: "success" | "error" | "info" | "warning", duration?: number) => void;
static removeToast: (toast: HTMLDivElement) => void;
}
export declare function getKeyEnvironment(apiKey: string): "test" | "live" | null;