refactor(support): replace mock data with real costs and simplify stats

Updated support page to use real data instead of mock values, including monthly costs
This commit is contained in:
Evandro Fonseca Junior committed 2025-10-26 18:32:15 -03:00
1 parent 01e97eb078
commit 00501e6699
8 files changed
+235 -150

No files matched your search

+12 -10
View File
@@ -17,22 +17,24 @@ export async function POST(request: NextRequest) {
);
}
const billing = await abacatePay.createBilling({
const billing = await abacatePay.createDonationBilling({
amount: body.amount,
metadata: {
donorName: body.donorName,
donorEmail: body.donorEmail,
message: body.message,
},
returnUrl: `${process.env.NEXT_PUBLIC_BASE_URL}/apoiar/obrigado`,
completionUrl: `${process.env.NEXT_PUBLIC_BASE_URL}/api/donations/verify`,
donorEmail: body.donorEmail,
donorName: body.donorName,
message: body.message,
});
// AbacatePay pode retornar diferentes formatos
const pixCode = billing.pixCode || billing.qrCode;
const pixQrCode = billing.pixQrCode || billing.qrCode;
const paymentUrl = billing.url || billing.paymentUrl;
return NextResponse.json({
success: true,
billingId: billing.id,
pixCode: billing.pixCode,
pixQrCode: billing.pixQrCode,
paymentUrl, // URL para redirecionar
pixCode,
pixQrCode,
expiresAt: billing.expiresAt,
});
} catch (error) {