fix: retrieve PromptPay QR code URL from scannable_code.image.download_uri

This commit is contained in:
Your Name committed 2026-06-07 18:40:44 +07:00
1 parent 0e5ef799a8
commit bae945b9d4
1 file changed
+2 -2
+2 -2
View File
@@ -124,8 +124,8 @@ export const paymentsRoute = new Elysia({ prefix: "/payments" })
return { error: charge.message || "Failed to create PromptPay charge" }; return { error: charge.message || "Failed to create PromptPay charge" };
} }
// Get QR Code Image URL from the charge's source references // Get QR Code Image URL from scannable_code or references
const qrCodeUrl = charge.source?.references?.barcode || null; const qrCodeUrl = charge.source?.scannable_code?.image?.download_uri || charge.source?.references?.barcode || null;
return { return {
success: true, success: true,