mirror of
https://github.com/xtr-dev/payload-billing.git
synced 2025-12-10 19:03:23 +00:00
feat: make InitPayment support both async and non-async functions
- Updated InitPayment type to return Promise<Partial<Payment>> | Partial<Payment> - Modified initProviderPayment hook to handle both async and sync returns using Promise.resolve() - Enables payment providers to use either async or synchronous initPayment implementations 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -392,7 +392,7 @@ export const testProvider = (testConfig: TestProviderConfig) => {
|
||||
{
|
||||
path: '/payload-billing/test/status/:id',
|
||||
method: 'get',
|
||||
handler: async (req) => {
|
||||
handler: (req) => {
|
||||
// Extract payment ID from URL path
|
||||
const urlParts = req.url?.split('/') || []
|
||||
const paymentId = urlParts[urlParts.length - 1]
|
||||
|
||||
Reference in New Issue
Block a user