|
|
@@ -817,7 +817,7 @@ ErrorCodeEnum CAccessAuthEntity::GetPinPadModel(CSimpleStringA& pinpadModel, boo
|
|
|
bPinPadOnline = false;
|
|
|
CSimpleStringA strErrMsg;
|
|
|
CSmartPointer<IEntityFunction> spFunction = this->GetFunction();
|
|
|
-
|
|
|
+ std::map<std::string, std::string> errInfo;
|
|
|
//oilyang@20210514
|
|
|
if (!IsMachineTypeConfigurePinPad(m_info.strMachineType))
|
|
|
return Error_Succeed;
|
|
|
@@ -856,7 +856,7 @@ ErrorCodeEnum CAccessAuthEntity::GetPinPadModel(CSimpleStringA& pinpadModel, boo
|
|
|
else if(rc == Error_NotInit)
|
|
|
{
|
|
|
DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("pinpad NOT INIT!, state: %d", ans.state);
|
|
|
- return nRet; //此时nRet = -1, pinpad调用失败
|
|
|
+ return nRet;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
@@ -866,12 +866,33 @@ ErrorCodeEnum CAccessAuthEntity::GetPinPadModel(CSimpleStringA& pinpadModel, boo
|
|
|
string outStr = GetOutPutStr("%s%08X%s%s", "GetDevInfo", rc, "strErrMsg", strErrMsg.GetData());
|
|
|
m_FSM.doWarnMsg(ERR_ACCESSAUTH_FROM_PINPAD, outStr.c_str());
|
|
|
DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode("RTA5205")(outStr.c_str());
|
|
|
+
|
|
|
+ errInfo["errcode"] = "RTA5205";
|
|
|
+ errInfo["msg"] = "调用PinPad发生错误";
|
|
|
+ errInfo["getLastErr"] = GetLastError();
|
|
|
+ pinpadModel = generateJsonStr(errInfo).second.c_str();
|
|
|
|
|
|
- return nRet; //此时nRet = -1, pinpad调用失败
|
|
|
+ return nRet;
|
|
|
}
|
|
|
|
|
|
pPinPadClient->GetFunction()->CloseSession();
|
|
|
}
|
|
|
+ else if (rc == Error_NetBroken)
|
|
|
+ {
|
|
|
+ strErrMsg = "PinPad实体未启动, 连接密码键盘失败";
|
|
|
+ SetAuthErrMsg((const char*)strErrMsg);
|
|
|
+
|
|
|
+ m_FSM.doWarnMsg(ERR_ACCESSAUTH_CONNECT_PINPAD_UNLOAD,
|
|
|
+ GetOutPutStr("%s%08X%s%s", "Connect", rc, "strErrMsg", "PinPad实体未启动, 连接密码键盘失败").c_str());
|
|
|
+ pPinPadClient->SafeDelete();
|
|
|
+
|
|
|
+ errInfo["errcode"] = "RTA5218";
|
|
|
+ errInfo["msg"] = "PinPad实体未启动";
|
|
|
+ errInfo["getLastErr"] = GetLastError();
|
|
|
+ pinpadModel = generateJsonStr(errInfo).second.c_str();
|
|
|
+
|
|
|
+ return nRet;
|
|
|
+ }
|
|
|
else
|
|
|
{
|
|
|
strErrMsg = "连接PinPad实体失败";
|
|
|
@@ -882,6 +903,11 @@ ErrorCodeEnum CAccessAuthEntity::GetPinPadModel(CSimpleStringA& pinpadModel, boo
|
|
|
DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode("RTA5204")("连接密码键盘异常");
|
|
|
pPinPadClient->SafeDelete();
|
|
|
|
|
|
+ errInfo["errcode"] = "RTA5204";
|
|
|
+ errInfo["msg"] = "PinPad实体启动成功,但连接PinPad实体失败";
|
|
|
+ errInfo["getLastErr"] = GetLastError();
|
|
|
+ pinpadModel = generateJsonStr(errInfo).second.c_str();
|
|
|
+
|
|
|
return nRet; //此时nRet = -1, pinpad调用失败
|
|
|
}
|
|
|
|
|
|
@@ -1107,7 +1133,7 @@ bool CAccessAuthEntity::SendInitMKReqACS(CInitlizerMKReq& initMKReq)
|
|
|
}
|
|
|
|
|
|
CBlob encInfo;
|
|
|
- char* key = "s5da69gnh4!963@6s5da69gnh4!963@6";
|
|
|
+ char* key = "s5da69gnh4!9631";
|
|
|
nRet = (ErrorCodeEnum)m_FSM.GetEncTerminalInfoWithKey(encInfo, (BYTE*)key);
|
|
|
if (( m_FSM.GetEncTerminalInfoWithKey(encInfo, (BYTE*)key)) != Error_Succeed)
|
|
|
{
|