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:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@xtr-dev/payload-billing",
|
"name": "@xtr-dev/payload-billing",
|
||||||
"version": "0.1.18",
|
"version": "0.1.19",
|
||||||
"description": "PayloadCMS plugin for billing and payment provider integrations with tracking and local testing",
|
"description": "PayloadCMS plugin for billing and payment provider integrations with tracking and local testing",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
|||||||
@@ -492,7 +492,7 @@ export const testProvider = (testConfig: TestProviderConfig) => {
|
|||||||
|
|
||||||
// Set provider ID and data
|
// Set provider ID and data
|
||||||
payment.providerId = testPaymentId
|
payment.providerId = testPaymentId
|
||||||
const paymentUrl = `${baseUrl}/api/payload-billing/test/payment/${testPaymentId}`
|
const paymentUrl = `${baseUrl}${uiRoute}/${testPaymentId}`
|
||||||
const providerData: ProviderData = {
|
const providerData: ProviderData = {
|
||||||
raw: {
|
raw: {
|
||||||
id: testPaymentId,
|
id: testPaymentId,
|
||||||
|
|||||||
Reference in New Issue
Block a user