change output to status #10
This commit is contained in:
@@ -233,16 +233,16 @@ int Deals::Status()
|
|||||||
nlohmann::json jsonData = nlohmann::json::parse(result);
|
nlohmann::json jsonData = nlohmann::json::parse(result);
|
||||||
|
|
||||||
std::ostringstream stream;
|
std::ostringstream stream;
|
||||||
stream << "success: " << jsonData["result"]["success"] << endl;
|
|
||||||
stream << "message: " << jsonData["result"]["message"] << endl;
|
|
||||||
bool isPayment = false;
|
bool isPayment = false;
|
||||||
string payload = cleanup_html(base64_decode(jsonData["payload"]));
|
string payload = cleanup_html(base64_decode(jsonData["payload"]));
|
||||||
|
stream << payload << endl;
|
||||||
// order: Paid, order: Completed, order: Executed
|
// order: Paid, order: Completed, order: Executed
|
||||||
if (payload.find("Paid") >= 0 || payload.find("Completed") >= 0 || payload.find("Executed") >= 0)
|
if (payload.find("Paid") >= 0 || payload.find("Completed") >= 0 || payload.find("Executed") >= 0)
|
||||||
{
|
{
|
||||||
isPayment = true;
|
isPayment = true;
|
||||||
}
|
}
|
||||||
stream << "order: " << isPayment << endl;
|
|
||||||
|
|
||||||
string decoded = stream.str();
|
string decoded = stream.str();
|
||||||
cout << decoded << endl;
|
cout << decoded << endl;
|
||||||
|
|||||||
Reference in New Issue
Block a user