feat: add test provider config endpoint

Add GET /api/payload-billing/test/config endpoint to retrieve test provider configuration including scenarios, payment methods, and test mode indicators.

This allows custom UIs to dynamically sync with plugin configuration instead of hardcoding values.

- Add TestProviderConfigResponse interface
- Export new type in provider index and main index
- Endpoint returns enabled status, scenarios, methods, test mode indicators, default delay, and custom UI route

Resolves #22

Co-authored-by: Bas <bvdaakster@users.noreply.github.com>
This commit is contained in:
claude[bot]
2025-09-19 11:10:18 +00:00
parent f89ffb2c7e
commit eaf54ae893
3 changed files with 44 additions and 1 deletions

View File

@@ -7,4 +7,4 @@ export * from './currency'
// Re-export provider configurations and types
export type { StripeProviderConfig } from './stripe'
export type { MollieProviderConfig } from './mollie'
export type { TestProviderConfig, PaymentOutcome, PaymentMethod, PaymentScenario } from './test'
export type { TestProviderConfig, TestProviderConfigResponse, PaymentOutcome, PaymentMethod, PaymentScenario } from './test'