callRupayForgotPINChange method

Future<void> callRupayForgotPINChange(
  1. BuildContext context,
  2. String? rPIN,
  3. String? mobileNumber
)

Implementation

Future<void> callRupayForgotPINChange(BuildContext context, String? rPIN,
    String? mobileNumber) async {
  Map<String, dynamic> requestBody = {
    'ReqType': AppUrl.TA_Oneapp_RuPay_Forgot_PIN,
    "Mobilenumber": mobileNumber,
    "ReferenceNumber": kglobal.shared.RupayRefNum,
    "Optional_PIN": rPIN,
    // "SessionID": sessionID,
    "Cardnumber": MySingleton().ruPayCardStatusSinglton.maskedCard,
    "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.RuPayForgotPINRequest(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) {
      // 05 nov

        kglobal.shared.showSnack(context,true, rupayEncryption3DESModel.value.message ?? "");
        Navigator.of(context).pop();
        Navigator.of(context).pop();
    } else {
      // 05 nov
      kglobal.shared.showSnack(context,true, rupayEncryption3DESModel.value.message ?? "");

    }
  });
}