This a broader approach of #29 that supports multiple currencies.
Goal:
The Bitpay API (and BTCPay Server) supports setting of paymentCurrencies parameter to enforce currencies on the payment page. This client library was incomplete and did not support that functionality. Also the available getTransactionCurrency() and setTransactionCurrency() on the Invoice class only allowed strings to be set, also the naming was a bit unrelated and not documented in the API docs.
Also the InvoiceInterface interface looks a bit ugly and chaotic, eg. only getter methods there and many no docBlock etc. But I did not touch those to keep the PR clean and scoped.
This a broader approach of #29 that supports multiple currencies.
Goal: The Bitpay API (and BTCPay Server) supports setting of
paymentCurrencies
parameter to enforce currencies on the payment page. This client library was incomplete and did not support that functionality. Also the availablegetTransactionCurrency()
andsetTransactionCurrency()
on the Invoice class only allowed strings to be set, also the naming was a bit unrelated and not documented in the API docs.Also the
InvoiceInterface
interface looks a bit ugly and chaotic, eg. only getter methods there and many no docBlock etc. But I did not touch those to keep the PR clean and scoped.