private void CanMakeInvoice() { var invoice = Bitpay.CreateInvoice(new Invoice() { Price = 5.0m, Currency = "USD", PosData = "posData", OrderId = "orderId", //RedirectURL = redirect + "redirect", NotificationURL = CallbackUri + "/notification", ItemDesc = "Some description", FullNotifications = true }); Logs.Tests.LogInformation("Invoice created"); BitcoinUrlBuilder url = new BitcoinUrlBuilder(invoice.PaymentUrls.BIP21); RPC.SendToAddress(url.Address, url.Amount); Logs.Tests.LogInformation("Invoice paid"); //Server.ProcessNextRequest((ctx) => //{ // var ipn = new StreamReader(ctx.Request.Body).ReadToEnd(); // JsonConvert.DeserializeObject<InvoicePaymentNotification>(ipn); //can deserialize //}); var invoice2 = Bitpay.GetInvoice(invoice.Id); Assert.NotNull(invoice2); }
private void CanMakeInvoice() { var invoice = Bitpay.CreateInvoice(new Invoice { Price = 1.0m, Currency = "USD", PosData = "posData", OrderId = "orderId", NotificationURL = "/notification", ItemDesc = "Some description", FullNotifications = true }); var response = Bitpay.CreateInvoice(invoice); Assert.NotNull(response); var invoice2 = Bitpay.GetInvoice(invoice.Id); Assert.NotNull(invoice2); }