callVerifyRupaySecurityAnswer method
Implementation
callVerifyRupaySecurityAnswer(BuildContext context, String ques, String ans) {
kglobal.getUserData().then((valuePref) async {
Map<String, dynamic> requestBody = {
'ReqType': AppUrl.TA_Oneapp_RuPayVerifySecurity,
"Mobilenumber": valuePref?.mobileNumber,
"SecurityQuestion": ques,
"SecurityAnswer": ans,
"ReferenceNumber": kglobal.shared.RupayRefNum,
// "SessionID": valuePref?.sessionID,
"Cardnumber": MySingleton().ruPayCardStatusSinglton.maskedCard,
"Date": kglobal.shared.getCurrentDateTime(),
"Platform": kglobal.shared.kPlatform,
"ApplicationType": kglobal.shared.applcationType,"EntityID": kglobal.shared.EntityID,
"MachineID": kglobal.shared.deviceID,
"GeoLocation": kglobal.shared.geolocation,
};
print(requestBody);
String bodyJson = jsonEncode(requestBody);
auth.RuPayVerifySecurityRequest(context, bodyJson).then((value2) {
setEncryption3DESValue(value2);
if (value2.responseCode == "99723") {
kglobal.shared.showSnack(context,true, rupayEncryption3DESModel.value.message ?? "");
} else if (rupayEncryption3DESModel.value.responseCode?.length == 4) {
kglobal.shared.showSnack(context,false, rupayEncryption3DESModel.value.message ?? "");
Navigator.push(
context,
MaterialPageRoute(builder: (_) => ForgotPinOtpScreen()),
);
} else {
// 05 nov
kglobal.shared.showSnack(context,true, rupayEncryption3DESModel.value.message ?? "");
}
});
});
}