mirror of
https://github.com/xtr-dev/payload-billing.git
synced 2025-12-11 11:23:23 +00:00
feat: Add support for provider-level configuration in billing plugin
- Introduce `onConfig` callback for payment providers - Add dynamic endpoint registration for Mollie webhook handling - Remove unused provider-specific configurations from plugin types - Update initialization to include provider-level configurations
This commit is contained in:
@@ -10,18 +10,6 @@ export const defaults = {
|
||||
}
|
||||
|
||||
// Provider configurations
|
||||
export interface StripeConfig {
|
||||
apiVersion?: string
|
||||
publishableKey: string
|
||||
secretKey: string
|
||||
webhookEndpointSecret: string
|
||||
}
|
||||
|
||||
export interface MollieConfig {
|
||||
apiKey: string
|
||||
testMode?: boolean
|
||||
webhookUrl: string
|
||||
}
|
||||
|
||||
export interface TestProviderConfig {
|
||||
autoComplete?: boolean
|
||||
@@ -65,13 +53,5 @@ export interface BillingPluginConfig {
|
||||
customerRelationSlug?: string // Customer collection slug for relationship
|
||||
disabled?: boolean
|
||||
providers?: PaymentProvider[]
|
||||
webhooks?: {
|
||||
basePath?: string
|
||||
cors?: boolean
|
||||
}
|
||||
}
|
||||
|
||||
// Plugin type
|
||||
export interface BillingPluginOptions extends BillingPluginConfig {
|
||||
disabled?: boolean
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user