mirror of
https://github.com/xtr-dev/payload-billing.git
synced 2025-12-10 02:43:24 +00:00
chore: bump package version to 0.1.11
This commit is contained in:
@@ -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",
|
||||||
|
|||||||
@@ -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')
|
||||||
|
|||||||
Reference in New Issue
Block a user