Okay My question is likewise: I am implementing a crypto payment gateway, I send all parameters along with callbackurl (which is notification url). Once I make payment, it will send a notification in json format. I don't know how to read data/parse data without knowing source url which is sending notification to my notification url.
the data likewise:
{
"timestamp": 6716171771,
"nonce": 5635262,
"sign": "dasjh1276312hjhdwwghhdsuy2128781291g2",
"body": "{\"address\":\"01HSXHSUSGNXSHGDSKJDASJ\",\"amount\":\"7917\",\"blockHigh\":\"17219\",\"coinType\":\"206\",\"decimals\":\"8\",\"fee\":\"452000\",\"mainCoinType\":\"206\",\"status\":3,\"tradeId\":\"20181024175416907\",\"tradeType\":1,\"txId\":\"31689c332536b56a2246347e206fbed2d04d461a3d668c4c1de32a75a8d436f0\"}"
}
string result_GET = null;
string url = "https://mytestweb.com/notifypayment.aspx";
// I don't know what URL we use here in case we don't know the source url, so this is my general practice for all gateways GET response.
WebResponse response = null;
StreamReader reader = null;
HttpWebRequest httpWebRequest = null;
httpWebRequest = HttpWebRequest.Create(url) as HttpWebRequest;
httpWebRequest.Method = "GET"; // Supports POST too
var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
var get_json_data = streamReader.ReadToEnd();
LabelJsonData.Text = get_json_data.ToString();
//I want the json data here , so that I can parse it and use it then.
}