payment abstract method

Future<Transaction?> payment({
  1. required double amount,
  2. required PaymentTypeEnum paymentType,
  3. required String callerId,
  4. int installments,
  5. String? creditType,
  6. bool? allowPrintCurrentTransaction,
})

Processes a payment with the provided parameters.

amount is the payment amount and must be greater than zero. paymentType specifies the type of payment (credit, debit, voucher or pix). callerId is the transaction identifier and cannot be empty. installments specifies the number of installments. creditType (optional) specifies the credit type for credit payments (creditMerchant or creditIssuer). allowPrintCurrentTransaction (optional) specifies whether to allow printing the current transaction. Returns a Transaction object containing transaction details, or null if the transaction fails.

This method must be implemented by a platform-specific class.

Implementation

Future<Transaction?> payment({
  required double amount,
  required PaymentTypeEnum paymentType,
  required String callerId,
  int installments,
  String? creditType,
  bool? allowPrintCurrentTransaction,
});