sendTransaction method

  1. @override
Future<String?> sendTransaction(
  1. String transactionID,
  2. String userID,
  3. Map<String, Object> extraData
)
override

Sends a transaction for fraud detection.

  • transactionID: The unique identifier for the transaction.
  • userID: The unique identifier for the user initiating the transaction.
  • extraData: A map containing additional data associated with the transaction.

Returns a String indicating the result of the transaction submission.

Implementation

@override
Future<String?> sendTransaction(String transactionID, String userID,
    Map<String, Object> extraData) async {
  try {
    String value = await methodChannel.invokeMethod('send-transaction', {
      "transactionID": transactionID,
      "userID": userID,
      "extraData": extraData
    });
    return Future.value(value);
  } catch (e) {
    return Future.error(e);
  }
}