Files
buzz/app/(ui)/donate/api.ts
T
dmgnr 507e715642
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
chore: change to secret-based real promptpay identifier
2026-08-28 13:19:11 +07:00

19 lines
515 B
TypeScript

"use server";
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) {
return generatePromptPayPayload({
identifier: {
type: PROMPTPAY_TYPE! as "mobile" | "nationalId" | "ewallet",
value: PROMPTPAY_IDENTIFIER!,
},
amount,
});
}