chore: bump package version to 0.1.11

This commit is contained in:
2025-09-30 20:59:53 +02:00
parent b27b5806b1
commit f7d6066d9a
2 changed files with 4 additions and 4 deletions

View File

@@ -1,6 +1,6 @@
{ {
"name": "@xtr-dev/payload-billing", "name": "@xtr-dev/payload-billing",
"version": "0.1.10", "version": "0.1.11",
"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",

View File

@@ -224,7 +224,7 @@ const testPaymentSessions = new Map<string, TestPaymentSession>()
export const testProvider = (testConfig: TestProviderConfig) => { export const testProvider = (testConfig: TestProviderConfig) => {
if (!testConfig.enabled) { if (!testConfig.enabled) {
throw new Error('Test provider is disabled') return
} }
const scenarios = testConfig.scenarios || DEFAULT_SCENARIOS const scenarios = testConfig.scenarios || DEFAULT_SCENARIOS
@@ -242,7 +242,7 @@ export const testProvider = (testConfig: TestProviderConfig) => {
{ {
path: '/payload-billing/test/payment/:id', path: '/payload-billing/test/payment/:id',
method: 'get', method: 'get',
handler: async (req) => { handler: (req) => {
// Extract payment ID from URL path // Extract payment ID from URL path
const urlParts = req.url?.split('/') || [] const urlParts = req.url?.split('/') || []
const paymentId = urlParts[urlParts.length - 1] const paymentId = urlParts[urlParts.length - 1]
@@ -458,7 +458,7 @@ export const testProvider = (testConfig: TestProviderConfig) => {
}) })
}, 10 * 60 * 1000) // Clean every 10 minutes }, 10 * 60 * 1000) // Clean every 10 minutes
}, },
initPayment: async (payload, payment) => { initPayment: (payload, payment) => {
// Validate required fields // Validate required fields
if (!payment.amount) { if (!payment.amount) {
throw new Error('Amount is required') throw new Error('Amount is required')