1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-01 16:12:49 -05:00

switch to official bitpay light library

This commit is contained in:
Kyle Spearrin
2019-12-19 10:27:06 -05:00
parent 665e78ec1c
commit e2d65e5b08
6 changed files with 27 additions and 33 deletions

View File

@ -15,20 +15,19 @@ namespace Bit.Core.Models.Api
public string Name { get; set; }
public string Email { get; set; }
public NBitpayClient.Invoice ToBitpayClientInvoice(GlobalSettings globalSettings)
public BitPayLight.Models.Invoice.Invoice ToBitpayInvoice(GlobalSettings globalSettings)
{
var inv = new NBitpayClient.Invoice
var inv = new BitPayLight.Models.Invoice.Invoice
{
Price = Amount.Value,
Price = Convert.ToDouble(Amount.Value),
Currency = "USD",
RedirectURL = ReturnUrl,
BuyerEmail = Email,
Buyer = new NBitpayClient.Buyer
RedirectUrl = ReturnUrl,
Buyer = new BitPayLight.Models.Invoice.Buyer
{
email = Email,
Email = Email,
Name = Name
},
NotificationURL = globalSettings.BitPay.NotificationUrl,
NotificationUrl = globalSettings.BitPay.NotificationUrl,
FullNotifications = true,
ExtendedNotifications = true
};