mirror of
https://github.com/xtr-dev/payload-billing.git
synced 2025-12-10 02:43:24 +00:00
fix: respect customUiRoute configuration in test provider
The test provider's customUiRoute parameter was being ignored when generating checkout URLs. The checkout URL was always using the hardcoded API endpoint instead of the configured custom UI route. This fix ensures that when customUiRoute is configured, the generated checkoutUrl will use the custom route (e.g., /test-payment/:id) instead of the default API route. Fixes issue where test provider checkout URLs returned 404 errors because they pointed to /api/payload-billing/test/payment/:id instead of the configured custom UI route. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -492,7 +492,7 @@ export const testProvider = (testConfig: TestProviderConfig) => {
|
||||
|
||||
// Set provider ID and data
|
||||
payment.providerId = testPaymentId
|
||||
const paymentUrl = `${baseUrl}/api/payload-billing/test/payment/${testPaymentId}`
|
||||
const paymentUrl = `${baseUrl}${uiRoute}/${testPaymentId}`
|
||||
const providerData: ProviderData = {
|
||||
raw: {
|
||||
id: testPaymentId,
|
||||
|
||||
Reference in New Issue
Block a user