change output to status #10

This commit is contained in:
Vladimir N. Korotenko
2025-11-17 19:26:27 +03:00
parent dcbb25b5ae
commit fc5cb439e3

View File

@@ -233,16 +233,16 @@ int Deals::Status()
nlohmann::json jsonData = nlohmann::json::parse(result);
std::ostringstream stream;
stream << "success: " << jsonData["result"]["success"] << endl;
stream << "message: " << jsonData["result"]["message"] << endl;
bool isPayment = false;
string payload = cleanup_html(base64_decode(jsonData["payload"]));
stream << payload << endl;
// order: Paid, order: Completed, order: Executed
if (payload.find("Paid") >= 0 || payload.find("Completed") >= 0 || payload.find("Executed") >= 0)
{
isPayment = true;
}
stream << "order: " << isPayment << endl;
string decoded = stream.str();
cout << decoded << endl;