|
|
@@ -704,10 +704,15 @@ ErrorCodeEnum CPinPadFSM::GetEncryptText(SpReqAnsContext<PinPadService_GetInputS
|
|
|
if (errCode != Error_Succeed)
|
|
|
{
|
|
|
SetErrorAndLog(errCode, MEC_DEVAPI_EPP_StartPinInput, "DevAdapter::StartPinInput", __FUNCTION__, IsInBusiness(), m_ullEndTime - m_ullBeginTime, PinPadService_LogCode_GetInputSM);
|
|
|
- ctxSM->Answer(Error_DevCommFailed, GetAlarmDEC());
|
|
|
+ DWORD dwCode = GetAlarmDEC();
|
|
|
+ ctxSM->Answer(Error_DevCommFailed, dwCode);
|
|
|
+ CSimpleStringA tmpRTA(true), tmpDesc(true);
|
|
|
+ if (GetEntityBase()->GetFunction()->GetVTMErrMsg(dwCode, tmpDesc, tmpRTA) == Error_Succeed)
|
|
|
+ DbgToBeidou(ctxSM->link, "GetEncryptTextJS").setReturnCode(tmpRTA)();
|
|
|
return Error_DevCommFailed;
|
|
|
}
|
|
|
DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM).setAPI("DevAdapter::StartPinInput").setCostTime(m_ullEndTime - m_ullBeginTime)();
|
|
|
+ DbgToBeidou(ctxSM->link, "GetEncryptText")();
|
|
|
char* buf = new char[len + 1];
|
|
|
memset(buf, 0, len + 1);
|
|
|
int readed = 0;
|
|
|
@@ -1172,15 +1177,20 @@ int CPinPadFSM::EncryptSM(SpReqAnsContext<PinPadService_EncryptDataSM_Req, PinPa
|
|
|
m_ullBeginTime = SP::Module::Comm::RVCGetTickCount();
|
|
|
ErrorCodeEnum eErr = m_hDevHelper->ActiveWorkingKey(1, 1);
|
|
|
m_ullEndTime = SP::Module::Comm::RVCGetTickCount();
|
|
|
- DbgToBeidou(ctx->link, "ActiveWorkingKey")();
|
|
|
+
|
|
|
DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_USER).setLogCode(PinPadService_LogCode_EncryptDataSM).setCostTime(m_ullEndTime - m_ullBeginTime)("%s", SpStrError(eErr));
|
|
|
if (eErr != Error_Succeed)
|
|
|
{
|
|
|
SetErrorAndLog(eErr, MEC_DEVAPI_EPP_ActiveWorkingKey, "DevAdapter::ActiveWorkingKey", __FUNCTION__, IsInBusiness(), m_ullEndTime - m_ullBeginTime);
|
|
|
- ctx->Answer(Error_Unexpect, GetAlarmDEC());
|
|
|
+ DWORD dwCode = GetAlarmDEC();
|
|
|
+ ctx->Answer(Error_Unexpect, dwCode);
|
|
|
+ CSimpleStringA tmpRTA(true), tmpDesc(true);
|
|
|
+ if (GetEntityBase()->GetFunction()->GetVTMErrMsg(dwCode, tmpDesc, tmpRTA) == Error_Succeed)
|
|
|
+ DbgToBeidou(ctx->link, "ActiveWorkingKey").setReturnCode(tmpRTA)();
|
|
|
m_bEncrypt = false;
|
|
|
return 0;
|
|
|
}
|
|
|
+ DbgToBeidou(ctx->link, "ActiveWorkingKey")();
|
|
|
EnDecryptInfo srcData, dstData;
|
|
|
ZeroMemory(srcData.data, MAX_EN_DECRYPT_DATA_SIZE);
|
|
|
ZeroMemory(dstData.data, MAX_EN_DECRYPT_DATA_SIZE);
|
|
|
@@ -1396,10 +1406,15 @@ ErrorCodeEnum CPinPadFSM::GetEncryptTextJS(SpReqAnsContext<PinPadService_GetInpu
|
|
|
if (errCode != Error_Succeed)
|
|
|
{
|
|
|
SetErrorAndLog(errCode, MEC_DEVAPI_EPP_StartPinInput, "DevAdapter::StartPinInput", __FUNCTION__, IsInBusiness(), m_ullEndTime - m_ullBeginTime, PinPadService_LogCode_GetInputSM);
|
|
|
- ctxJS->Answer(Error_DevCommFailed, GetAlarmDEC());
|
|
|
+ DWORD dwCode = GetAlarmDEC();
|
|
|
+ ctxJS->Answer(Error_DevCommFailed, dwCode);
|
|
|
+ CSimpleStringA tmpRTA(true), tmpDesc(true);
|
|
|
+ if (GetEntityBase()->GetFunction()->GetVTMErrMsg(dwCode, tmpDesc, tmpRTA) == Error_Succeed)
|
|
|
+ DbgToBeidou(ctxJS->link, "GetEncryptTextJS").setReturnCode(tmpRTA)();
|
|
|
return Error_DevCommFailed;
|
|
|
}
|
|
|
DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM).setAPI("DevAdapter::StartPinInput").setCostTime(m_ullEndTime - m_ullBeginTime)();
|
|
|
+ DbgToBeidou(ctxJS->link, "GetEncryptTextJS")();
|
|
|
char* buf = new char[CurrentPasswordLen + 1];
|
|
|
memset(buf, 0, CurrentPasswordLen + 1);
|
|
|
int readed = 0;
|