chore: change to secret-based real promptpay identifier
This commit is contained in:
@@ -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,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user