btcpayserver: API returns wrong amountPaid empty string instead of 0

On invoice creation the original BitPay API returns 0 as empty value for amountPaid BtcPayServer returns an empty string "" instead. Using PHP client library.

This is causing some existing database storage of the invoice fail when switching from BitPay to BtcPayServer.

Would be great if this can be confirmed and fixed* so that we do not need to change upstream library or fix the value before saving.

* I’m not familar with C# but if you can give me some hints where this needs to be fixed I will try to get dev setup and give a PR a try.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 17 (17 by maintainers)

Commits related to this issue

Most upvoted comments

@NicolasDorier Thank you! Updated my docker node to 1.0.2.22, works like a charm now. 💯

1.0.2.22 should be available in like 20-30 min.

@ndeet We discussed this briefly @ #168 No idea how we should be setting this as when partial multi crypto payments are involved we will end up giving out bad data since the new format does not support it well at all.

amountPaid should probably be the total paid in all cryptos converted with the exchange rate to what is set to transactionCurrency. Question is, what do we set it to, the first payment? a store configuration? Meh…