Maintaining BitPay compatibility

Ref: https://github.com/btcpayserver/btcpayserver/issues/180
This commit is contained in:
rockstardev
2018-05-16 10:40:22 -05:00
committed by nicolas.dorier
parent eeb522fe7d
commit fe5347aa86
2 changed files with 7 additions and 9 deletions

View File

@@ -231,14 +231,14 @@ namespace BTCPayServer.Models
[JsonProperty("paymentTotals")]
public Dictionary<string, long> PaymentTotals { get; set; }
[JsonProperty("amountPaid")]
[JsonProperty("amountPaid", DefaultValueHandling = DefaultValueHandling.Include)]
public long AmountPaid { get; set; }
[JsonProperty("minerFees")]
public long MinerFees { get; set; }
[JsonProperty("exchangeRates")]
public Dictionary<string, Dictionary<string, decimal>> ExchangeRates{ get; set; }
public Dictionary<string, Dictionary<string, decimal>> ExchangeRates { get; set; }
[JsonProperty("supportedTransactionCurrencies")]
public Dictionary<string, NBitpayClient.InvoiceSupportedTransactionCurrency> SupportedTransactionCurrencies { get; set; }
@@ -246,7 +246,7 @@ namespace BTCPayServer.Models
[JsonProperty("addresses")]
public Dictionary<string, string> Addresses { get; set; }
[JsonProperty("paymentCodes")]
public Dictionary<string, NBitpayClient.InvoicePaymentUrls> PaymentCodes{get; set;}
public Dictionary<string, NBitpayClient.InvoicePaymentUrls> PaymentCodes { get; set; }
}
public class Flags
{

View File

@@ -338,9 +338,8 @@ namespace BTCPayServer.Services.Invoices
Status = Status,
Currency = ProductInformation.Currency,
Flags = new Flags() { Refundable = Refundable },
PaymentSubtotals = new Dictionary<string, long>(),
PaymentTotals= new Dictionary<string, long>(),
PaymentTotals = new Dictionary<string, long>(),
SupportedTransactionCurrencies = new Dictionary<string, InvoiceSupportedTransactionCurrency>(),
Addresses = new Dictionary<string, string>(),
PaymentCodes = new Dictionary<string, InvoicePaymentUrls>(),
@@ -351,7 +350,6 @@ namespace BTCPayServer.Services.Invoices
dto.CryptoInfo = new List<NBitpayClient.InvoiceCryptoInfo>();
foreach (var info in this.GetPaymentMethods(networkProvider))
{
var accounting = info.Calculate();
var cryptoInfo = new NBitpayClient.InvoiceCryptoInfo();
var subtotalPrice = accounting.TotalDue - accounting.NetworkFee;