feat: enhance AbacatePay donation system with updated docs and form fields

Updated ABACATEPAY_SETUP.md with comprehensive setup guide, including environment variables, API key instructions, webhook configuration, donation flow, and field details for better integration clarity. Added required fields (phone, CPF/CNPJ) to the donation form in app/[locale]/apoiar/page.tsx to collect essential donor information and improve compliance. This ensures smoother setup and more robust donation processing.
This commit is contained in:
Evandro Fonseca Junior committed 2025-10-26 21:16:59 -03:00
1 parent 00501e6699
commit ef521876eb
9 files changed
+922 -168

No files matched your search

+33 -4
View File
@@ -15,12 +15,41 @@ export interface DonationData {
message?: string;
}
export const DONATION_PRODUCTS = {
coffee: {
id: "prod_6ryJmhfZGNJGjNaYaA1YqhDn",
name: "Doação Café",
amount: 5,
price: 500, // centavos
},
snack: {
id: "prod_FpLxKWgmHXbj2Ghwxa0BsFph",
name: "Doação Lanche",
amount: 10,
price: 1000,
},
lunch: {
id: "prod_czgg0YjKBp3GpsFYpSp3M1TZ",
name: "Doação Almoço",
amount: 25,
price: 2500,
},
} as const;
export type DonationTierId = keyof typeof DONATION_PRODUCTS;
export interface DonorData {
name: string;
phone: string;
email?: string;
message?: string;
}
export interface DonationResponse {
success: boolean;
billingId?: string;
paymentUrl?: string;
pixCode?: string;
pixQrCode?: string;
pixId?: string;
brCode?: string;
brCodeBase64?: string;
expiresAt?: string;
error?: string;
}