btcpayserver / btcpayserver-php-client

PHP implementation for the BTCPayServer cryptographically secure RESTful API
MIT License
29 stars 33 forks source link

Add support for enforcing one or more payment currencies. #44

Closed ndeet closed 3 years ago

ndeet commented 3 years ago

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.