WS: Clean up json responses and report engine submission results.

This commit is contained in:
Arthur Britto
2012-10-12 21:14:04 -07:00
parent cc4bda6bf6
commit 7495fe70cc
6 changed files with 74 additions and 45 deletions

View File

@@ -959,7 +959,19 @@ void WSConnection::doSubmit(Json::Value& jvResult, const Json::Value& jvRequest)
try
{
jvResult["submitted"] = tpTrans->getJson(0);
jvResult["transaction"] = tpTrans->getJson(0);
if (temUNCERTAIN != tpTrans->getResult())
{
std::string sToken;
std::string sHuman;
transResultInfo(tpTrans->getResult(), sToken, sHuman);
jvResult["engine_result"] = sToken;
jvResult["engine_result_code"] = tpTrans->getResult();
jvResult["engine_result_message"] = sHuman;
}
}
catch (std::exception& e)
{