import { Prisma } from '@prisma/client';
import { PrismaService } from '../../../prisma/prisma.service';
import { RecordPaymentDto } from '../dto/record-payment.dto';
import { StubPaymentProvider, YouCanPayProvider } from '../providers/payment-provider.interface';
import { PdfService } from '../../pdf/pdf.service';
import { AuthenticatedUser } from '../../../common/decorators/current-user.decorator';
export declare class PaymentsService {
    private readonly prisma;
    private readonly stub;
    private readonly youcan;
    private readonly pdf;
    private readonly logger;
    constructor(prisma: PrismaService, stub: StubPaymentProvider, youcan: YouCanPayProvider, pdf: PdfService);
    record(fundCallItemId: string, dto: RecordPaymentDto, user: AuthenticatedUser): Promise<{
        id: string;
        currency: string;
        createdAt: Date;
        status: import(".prisma/client").$Enums.PaymentStatus;
        method: import(".prisma/client").$Enums.PaymentMethod;
        amount: Prisma.Decimal;
        paidAt: Date | null;
        fundCallItemId: string;
        reference: string | null;
        providerPayload: Prisma.JsonValue | null;
        receiptPdfUrl: string | null;
    }>;
    initiateOnlinePayment(fundCallItemId: string, params: {
        amount: number;
        currency?: string;
        providerCode?: string;
        successUrl?: string;
        failureUrl?: string;
    }, user: AuthenticatedUser): Promise<{
        paymentId: string;
        provider: string;
        checkoutUrl: string;
    }>;
    handleWebhook(providerCode: string, rawBody: string, headers: Record<string, string>): Promise<{
        id: string;
        currency: string;
        createdAt: Date;
        status: import(".prisma/client").$Enums.PaymentStatus;
        method: import(".prisma/client").$Enums.PaymentMethod;
        amount: Prisma.Decimal;
        paidAt: Date | null;
        fundCallItemId: string;
        reference: string | null;
        providerPayload: Prisma.JsonValue | null;
        receiptPdfUrl: string | null;
    } | {
        ok: boolean;
        alreadyProcessed?: undefined;
        status?: undefined;
    } | {
        ok: boolean;
        alreadyProcessed: boolean;
        status?: undefined;
    } | {
        ok: boolean;
        status: string;
        alreadyProcessed?: undefined;
    }>;
    confirmCardPayment(paymentId: string, reference: string, user?: AuthenticatedUser): Promise<{
        id: string;
        currency: string;
        createdAt: Date;
        status: import(".prisma/client").$Enums.PaymentStatus;
        method: import(".prisma/client").$Enums.PaymentMethod;
        amount: Prisma.Decimal;
        paidAt: Date | null;
        fundCallItemId: string;
        reference: string | null;
        providerPayload: Prisma.JsonValue | null;
        receiptPdfUrl: string | null;
    }>;
    private applyPayment;
    listForItem(itemId: string, user: AuthenticatedUser): Promise<{
        id: string;
        currency: string;
        createdAt: Date;
        status: import(".prisma/client").$Enums.PaymentStatus;
        method: import(".prisma/client").$Enums.PaymentMethod;
        amount: Prisma.Decimal;
        paidAt: Date | null;
        fundCallItemId: string;
        reference: string | null;
        providerPayload: Prisma.JsonValue | null;
        receiptPdfUrl: string | null;
    }[]>;
    confirmStubCheckout(token: string): Promise<{
        paymentId: string;
    } | null>;
    generateReceiptPdf(paymentId: string, user: AuthenticatedUser): Promise<Buffer | null>;
    private assertPositiveAmount;
    private assertOfflineMethodEnabled;
    private assertPayableAmount;
    private assertPaymentAccess;
    private getAccessibleItem;
}
