toMap method

Map<String, dynamic> toMap()

Optional: Firebase conversion (recommended)

Implementation

Map<String, dynamic> toMap() {
  return {
    'customer': {
      'fullName': customer.fullName,
      'email': customer.email,
    },
    'amount': amount,
    'method': method.toLowerCase(),
    'transactionId': transactionId,
    'time': DateTime.now(),
    'status': status,
  };
}