@vegaci_shared/vsplit-payment-gateway
Version:
A B2B payment gateway integration package for Stripe with split payment capabilities
48 lines (47 loc) • 1.37 kB
TypeScript
/**
* Formatting utilities
*/
/**
* Format amount for display
*/
export declare function formatAmount(amount: number, currency?: string, locale?: string): string;
/**
* Get currency symbol
*/
export declare function getCurrencySymbol(currency: string): string;
/**
* Convert amount to smallest currency unit (cents)
*/
export declare function convertToSubcurrency(amount: number, currency?: string): number;
/**
* Convert from smallest currency unit to major unit
*/
export declare function convertFromSubcurrency(amount: number, currency?: string): number;
/**
* Format phone number
*/
export declare function formatPhoneNumber(phone: string, country?: string): string;
/**
* Format time remaining
*/
export declare function formatTimeRemaining(seconds: number): string;
/**
* Format date for display
*/
export declare function formatDate(date: Date | number | string, locale?: string): string;
/**
* Mask sensitive data (like card numbers)
*/
export declare function maskCardNumber(cardNumber: string): string;
/**
* Format error message for display
*/
export declare function formatErrorMessage(error: string | Error): string;
/**
* Format status for display
*/
export declare function formatPaymentStatus(status: string): string;
/**
* Truncate text with ellipsis
*/
export declare function truncateText(text: string, maxLength: number): string;