Complete Implemenation of tenancy

This commit is contained in:
IGNY8 VPS (Salman)
2025-12-09 00:11:35 +00:00
parent c54db6c2d9
commit bfbade7624
25 changed files with 4959 additions and 35 deletions

View File

@@ -701,6 +701,35 @@ export async function getPaymentMethodConfigs(): Promise<{
return fetchAPI('/v1/billing/payment-methods/available/');
}
// Get payment methods for a specific country
export async function getPaymentMethodsByCountry(countryCode?: string): Promise<{
success: boolean;
results: PaymentMethodConfig[];
count: number;
}> {
const params = countryCode ? `?country=${countryCode}` : '';
return fetchAPI(`/v1/billing/admin/payment-methods/${params}`);
}
// Confirm manual payment (submit proof of payment)
export async function confirmPayment(data: {
invoice_id: number;
payment_method: string;
amount: string;
manual_reference: string;
manual_notes?: string;
proof_url?: string;
}): Promise<{
success: boolean;
message: string;
payment: Payment;
}> {
return fetchAPI('/v1/billing/admin/payments/confirm/', {
method: 'POST',
body: JSON.stringify(data),
});
}
export async function createManualPayment(data: {
invoice_id?: number;
amount: string;