mirror of
https://github.com/xtr-dev/payload-billing.git
synced 2025-12-08 00:33:23 +00:00
Some database adapters don't support transactions, causing payment updates to fail completely. This change adds graceful fallback to direct updates when transactions are unavailable. Changes: - Try to use transactions if supported - Fall back to direct update if beginTransaction() fails or returns null - Add debug logging to track which path is used - Maintain backward compatibility with transaction-supporting databases This fixes the "Failed to begin transaction" error in production. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>