btcpayserver / btcpayserver-php-client

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

Allow any currency symbol via overloaded class. #46

Closed ndeet closed 3 years ago

ndeet commented 3 years ago

As discussed in #45

@Kukks I went for your first suggestion to keep the current library class as is.

To use this class without restrictions we can now use new \Bitpay\CurrencyUnrestricted('USDt') where needed.

This class skips the hardcoded currency codes ($availableCurrencies) check of the parent Currency class and also allows lower case characters.

NicolasDorier commented 2 years ago

imho Currency shouldn't do any validation. This is a shotgun pointed at your feet.

woutersamaey commented 2 years ago

@NicolasDorier this is the old, to be discontinued PHP library... If you were looking for the Greenfield PHP lib, it's elsewhere...