UNPKG

@vegaci_shared/vsplit-payment-gateway

Version:

A B2B payment gateway integration package for Stripe with split payment capabilities

49 lines (48 loc) 1.22 kB
/** * Validation utilities */ import { PaymentSessionConfig } from '../types'; /** * Validate email format */ export declare function isValidEmail(email: string): boolean; /** * Validate amount (positive number) */ export declare function isValidAmount(amount: number): boolean; /** * Validate currency code (ISO 4217) */ export declare function isValidCurrency(currency: string): boolean; /** * Validate phone number (basic validation) */ export declare function isValidPhoneNumber(phone: string): boolean; /** * Validate postal code (flexible format) */ export declare function isValidPostalCode(postalCode: string, country?: string): boolean; /** * Validate order ID format */ export declare function isValidOrderId(orderId: string): boolean; /** * Validate URL format */ export declare function isValidUrl(url: string): boolean; /** * Validate split payment configuration */ export declare function validateSplitPayments(splits: Array<{ amount: number; }>, totalAmount: number): { valid: boolean; error?: string; }; /** * Validate payment configuration */ export declare function validatePaymentConfig(config: PaymentSessionConfig): { valid: boolean; errors: string[]; };