preAuth method

Future<TransactionResponse> preAuth({
  1. required num amount,
  2. String? reference,
  3. String? transactionId,
  4. String? currency,
  5. String? language,
})

Triggers a pre-authorization (blocks an amount on the card). Must be activated by hobex.

Implementation

Future<TransactionResponse> preAuth({
  required num amount,
  String? reference,
  String? transactionId,
  String? currency,
  String? language,
}) {
  final body = _txBody(
    amount: amount,
    reference: reference,
    transactionId: transactionId ?? _newTransactionId(),
    currency: currency,
    language: language,
  );
  return _sendTransaction('POST', 'api/transaction/preauth', body);
}