diff --git a/package.json b/package.json index aa1854e..d840489 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@xtr-dev/payload-billing", - "version": "0.1.19", + "version": "0.1.20", "description": "PayloadCMS plugin for billing and payment provider integrations with tracking and local testing", "license": "MIT", "type": "module", diff --git a/src/providers/test.ts b/src/providers/test.ts index c9d6d0d..1341beb 100644 --- a/src/providers/test.ts +++ b/src/providers/test.ts @@ -492,7 +492,10 @@ export const testProvider = (testConfig: TestProviderConfig) => { // Set provider ID and data payment.providerId = testPaymentId - const paymentUrl = `${baseUrl}${uiRoute}/${testPaymentId}` + // Use custom UI route if specified, otherwise use built-in UI endpoint + const paymentUrl = testConfig.customUiRoute + ? `${baseUrl}${testConfig.customUiRoute}/${testPaymentId}` + : `${baseUrl}/api/payload-billing/test/payment/${testPaymentId}` const providerData: ProviderData = { raw: { id: testPaymentId,