mirror of
https://github.com/xtr-dev/payload-billing.git
synced 2025-12-11 11:23:23 +00:00
feat: implement advanced test provider with interactive UI and multiple scenarios
- Add comprehensive test provider with configurable payment outcomes (paid, failed, cancelled, expired, pending) - Support multiple payment methods (iDEAL, Credit Card, PayPal, Apple Pay, Bank Transfer) - Interactive test payment UI with responsive design and real-time processing simulation - Test mode indicators including warning banners, badges, and console warnings - React components for admin UI integration (TestModeWarningBanner, TestModeBadge, TestPaymentControls) - API endpoints for test payment processing and status polling - Configurable scenarios with custom delays and outcomes - Production safety mechanisms and clear test mode indicators - Complete documentation and usage examples Implements GitHub issue #20 for advanced test provider functionality. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -19,6 +19,26 @@ export interface TestProviderConfig {
|
||||
simulateFailures?: boolean
|
||||
}
|
||||
|
||||
export interface AdvancedTestProviderConfig {
|
||||
enabled: boolean
|
||||
scenarios?: Array<{
|
||||
id: string
|
||||
name: string
|
||||
description: string
|
||||
outcome: 'paid' | 'failed' | 'cancelled' | 'expired' | 'pending'
|
||||
delay?: number
|
||||
method?: 'ideal' | 'creditcard' | 'paypal' | 'applepay' | 'banktransfer'
|
||||
}>
|
||||
customUiRoute?: string
|
||||
testModeIndicators?: {
|
||||
showWarningBanners?: boolean
|
||||
showTestBadges?: boolean
|
||||
consoleWarnings?: boolean
|
||||
}
|
||||
defaultDelay?: number
|
||||
baseUrl?: string
|
||||
}
|
||||
|
||||
// Customer info extractor callback type
|
||||
export interface CustomerInfoExtractor {
|
||||
(customer: any): {
|
||||
|
||||
Reference in New Issue
Block a user