callFraudApi method

dynamic callFraudApi(
  1. BuildContext context,
  2. String? orderID,
  3. String? natureOfFraud,
  4. String textValue,
  5. String date,
)

Implementation

callFraudApi(BuildContext context, String? orderID, String? natureOfFraud,
    String textValue, String date) async {
  kglobal.getUserData().then((value) async {
    Map<String, dynamic> requestBody = {
      "ReqType": AppUrl.TA_Oneapp_GrevienceCPFIRDatainsert,
      "MachineID": kglobal.shared.deviceID,
      "Platform": kglobal.shared.kPlatform,
      "FraudReportedBy": "Wallet Holder",
      "NatureofFraud": natureOfFraud,
      "OrderID": orderID,
      "Customer_FraudOccurrencebyDate": date,
      "ApplicationType": kglobal.shared.applcationType,
      "Customer_Mobile_No": kglobal.shared.mobileNum,
      "Remarks": textValue,
      "Customer_FraudDetectedbyDate": date,
      "GeoLocation": kglobal.shared.geolocation,
      "Mobilenumber": kglobal.shared.mobileNum,
    };

    String bodyJson = jsonEncode(requestBody);

    auth.RupayReportFraud(context, bodyJson).then((value) {

      if (value.responseCode?.length == 4) {
        kglobal.shared.showSnack(context,false, value.message ?? "");
        Navigator.of(context).pop();
        // List<Info> statementList = Info.fromJsonArray(miniStatementData.value.info!);
      } else if (value.responseCode == "99723") {
        kglobal.shared.showSnack(context,true, value.message ?? "");
      } else {
        kglobal.shared.showSnack(context,true, value.message ?? "");
      }
    });
  });
}