public PlaceOrderResponse PlaceOrder(Coin coin, string callbackurl)
        {
            var client = new WebClient();

            callbackurl = HttpUtility.UrlEncode(callbackurl);

            client.Headers.Add("user-agent", "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36");
            var ls = PlaceOrderResponse.FromJson(
                client.DownloadString($"https://api.paybear.io/v2/{coin.ToString()}/payment/{callbackurl}?token={_apiSecret}"));

            return(ls);
        }
Exemple #2
0
 public static string ToJson(this PlaceOrderResponse self) => JsonConvert.SerializeObject((object)self, (JsonSerializerSettings)Converter.Settings);