Simplify payment updates by removing race condition logic

- Remove complex optimistic locking and version-based updates
- Simplify payment status updates assuming providers don't send duplicates
- Remove version field from Payment type and collection schema
- Clean up webhook detection logic in payment hooks
- Streamline updatePaymentStatus function for better maintainability

Payment providers typically don't send duplicate webhook requests, so the
complex race condition handling was unnecessary overhead.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-09-17 20:17:18 +02:00
parent 479f1bbd0e
commit b6c27ff3a3
3 changed files with 7 additions and 57 deletions

View File

@@ -48,7 +48,6 @@ export interface Payment {
| boolean
| null;
refunds?: (number | Refund)[] | null;
version: number;
updatedAt: string;
createdAt: string;
}