boxy/app/lib/receipts.ts
2025-06-25 01:26:54 +05:30

12 lines
449 B
TypeScript

// In-memory storage for demo purposes - in production, use a database
const paymentReceipts = new Map<string, string>();
// Store receipt ID for a session
export function storeReceiptId(sessionId: string, receiptId: string): void {
paymentReceipts.set(sessionId, receiptId);
}
// Helper function to get receipt ID for a session
export function getReceiptId(sessionId: string): string | null {
return paymentReceipts.get(sessionId) || null;
}