UNPKG

@blocklet/payment-react

Version:

Reusable react components for payment kit v2

36 lines (35 loc) 1.1 kB
import type { AutoRechargeConfig } from '@blocklet/payment-types'; export interface AutoTopupFormData { enabled: boolean; threshold: string; quantity: number; payment_method_id: string; recharge_currency_id: string; price_id: string; change_payment_method?: boolean; customer_name?: string; customer_email?: string; daily_limits: { max_attempts: number; max_amount: number; }; billing_address?: { country?: string; state?: string; line1?: string; line2?: string; city?: string; postal_code?: string; }; } export interface AutoTopupModalProps { open: boolean; onClose: () => void; customerId?: string; currencyId: string; onSuccess?: (config: AutoRechargeConfig) => void; onError?: (error: any) => void; defaultEnabled?: boolean; } export declare const waitForAutoRechargeComplete: (configId: string) => Promise<any>; export default function AutoTopup({ open, onClose, currencyId, onSuccess, onError, defaultEnabled, }: AutoTopupModalProps): JSX.Element;