callRupayEncryption3DESAPI method

dynamic callRupayEncryption3DESAPI(
  1. BuildContext context,
  2. String rPIN,
  3. String perTransAmt,
  4. String perDayAmt,
  5. String perMonthAmt,
  6. String limitType,
)

Implementation

callRupayEncryption3DESAPI(
    BuildContext context,
    String rPIN,
    String perTransAmt,
    String perDayAmt,
    String perMonthAmt,
    String limitType) {
  kglobal.getUserData().then((value) async {
    var xorHexValue = kglobal.shared.xorHex('04' + rPIN + 'FFFFFFFFFF',
        '0000' + value!.mobileNumber.toString() + 'FF');
    print('xorHexValue>>${xorHexValue}');
    Map<String, dynamic> requestBody = {
      'ReqType': AppUrl.TA_Oneapp_RupayEncryption3DES,
      "Enc_Key": MySingleton().ruPayCardStatusSinglton.encKey,
      "Mobilenumber": value?.mobileNumber,
      "Date": kglobal.shared.getCurrentDateTime(),
      // "Hex_XOR_Value": "0412A4DBD96BAC00" ,
      "Hex_XOR_Value": xorHexValue,
      "Platform": kglobal.shared.kPlatform,
      "ApplicationType": kglobal.shared.applcationType,
      "EntityID": kglobal.shared.EntityID,
      "MachineID": kglobal.shared.deviceID,
    "GeoLocation": kglobal.shared.geolocation,
    };

    String bodyJson = jsonEncode(requestBody);
    auth.RupayEncryption3DES(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) {
        //PopupAlert().showPopupWithBack(context, rupayEncryption3DESModel.value.message ?? '', false);
        callRuPayTransactionLimitUpdate(
            context,
            value?.mobileNumber.toString(),
            rupayEncryption3DESModel.value.rPIN.toString(),
            perTransAmt,
            perDayAmt,
            perMonthAmt,
            limitType);
      } else {
        kglobal.shared.showSnack(context,true, rupayEncryption3DESModel.value.message ?? "");

      }
    });
  });
}