callFraudApi method
dynamic
callFraudApi(
- BuildContext context,
- String? orderID,
- String? transactionType,
- String textValue,
Implementation
callFraudApi(BuildContext context, String? orderID, String? transactionType,
String textValue) async {
kglobal.getUserData().then((value) async {
Map<String, dynamic> requestBody = {
"ApplicationType": kglobal.shared.applcationType,
"Date":
'${now.year}-${_formatDateElement(now.month)}-${_formatDateElement(now.day)} ${_formatDateElement(now.hour)}:${_formatDateElement(now.minute)}:${_formatDateElement(now.second)}',
"Feedback": textValue,
"MachineID": kglobal.shared.deviceID,
"GeoLocation": kglobal.shared.geolocation,
"Mobilenumber": kglobal.shared.mobileNum,
"OrderID": orderID,
"Platform": kglobal.shared.kPlatform,
"ReqType": AppUrl.TA_Oneapp_Feedback,
"Statement": "Feedback",
"TransactionType": transactionType
};
String bodyJson = jsonEncode(requestBody);
auth.RupayReportIssue(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 ?? "");
}
});
});
}