createProcessingTransaction static method

Future<void> createProcessingTransaction({
  1. required num amount,
  2. required String apiKey,
  3. required String merchantId,
  4. required String salt,
  5. required String appName,
  6. required String description,
  7. required OmniwareUserProfile userProfile,
  8. required String transaction,
  9. required String orderId,
})

Implementation

static Future<void> createProcessingTransaction({
  required num amount,
  required String apiKey,
  required String merchantId,
  required String salt,
  required String appName,
  required String description,
  required OmniwareUserProfile userProfile,
  required String transaction,
  required String orderId,
}) async {
  _firestore.collection(collectionName).doc(transaction).set(
    {
      'status': 'processing',
      'gateway': gateway,
      'platform': Platform.isAndroid ? 'android' : 'ios',
      'amount': amount,
      'apiKey': apiKey,
      'merchantId': merchantId,
      'salt': salt,
      'appName': appName,
      'description': description,
      'user': userProfile.toMap(),
      'id': transaction,
      'createdAt': FieldValue.serverTimestamp(),
      'orderId': orderId,
    },
  );
}