chore: change to secret-based real promptpay identifier
Build and Push Image / build-backend (push) Successful in 25s
Build and Push Image / build-frontend (push) Successful in 1m50s
Build and Push Image / push (push) Successful in 1m16s

This commit is contained in:
2026-08-28 13:19:11 +07:00 Unverified
parent 66755f33dc
commit 507e715642
+9 -1
View File
@@ -1,10 +1,18 @@
"use server"; "use server";
import { generatePromptPayPayload } from "@/lib/promptpay"; import { generatePromptPayPayload } from "@/lib/promptpay";
import { env } from "bun";
const { PROMPTPAY_IDENTIFIER, PROMPTPAY_TYPE } = env;
if (!PROMPTPAY_IDENTIFIER || !PROMPTPAY_TYPE)
console.error("Warning: Missing PromptPay configuration!");
export async function generateQrcode(amount: number | string) { export async function generateQrcode(amount: number | string) {
return generatePromptPayPayload({ return generatePromptPayPayload({
identifier: { type: "nationalId", value: "1729900808055" }, identifier: {
type: PROMPTPAY_TYPE! as "mobile" | "nationalId" | "ewallet",
value: PROMPTPAY_IDENTIFIER!,
},
amount, amount,
}); });
} }