mirror of
https://github.com/xtr-dev/payload-billing.git
synced 2025-12-11 11:23:23 +00:00
fix: resolve critical template literal and error handling issues
Critical fixes: - Fix template literal bug in paymentId that prevented payment processing - Enhance error handling to update both session and database on failures - Consolidate duplicate type definitions to single source of truth Technical details: - Template literal interpolation now properly provides actual session IDs - Promise rejections in setTimeout now update payment records in database - Removed duplicate AdvancedTestProviderConfig, now re-exports TestProviderConfig - Enhanced error handling with comprehensive database state consistency Prevents payment processing failures and data inconsistency issues. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -19,25 +19,8 @@ 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
|
||||
}
|
||||
// Re-export the actual test provider config instead of duplicating
|
||||
export type { TestProviderConfig as AdvancedTestProviderConfig } from '../providers/test.js'
|
||||
|
||||
// Customer info extractor callback type
|
||||
export interface CustomerInfoExtractor {
|
||||
|
||||
Reference in New Issue
Block a user