btcpayserver / btcpayserver-php-client

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

Does it works without bitpay ? #28

Open ZauChoco opened 4 years ago

ZauChoco commented 4 years ago

I've read in the tutorial that we need a bitpay account to make use this library, is there any alternative ? Here

I mean, i planned to use it because of third tier service absence, and now i need to create an account ? Did I misunderstand ?

NicolasDorier commented 4 years ago

@ZauChoco you don't need bitpay. This library is a in big part a copy/paste of bitpay's library with things renamed. Possible we left out one.

ZauChoco commented 4 years ago

So what is the $pairingCode variable line 52 ? https://github.com/btcpayserver/btcpayserver-php-client/blob/master/examples/tutorial/002_pair.php It is clearly said that i need to get a pairing code at https://test.bitpay.com/api-tokens and that it is available once and for a duration of 24h.

What I want to do is to generate public and private keys, to make transactions and to check balances. Is-it possible to do all of this only with this library ?

I'm pretty new with all these blockchain stuffs, maybe I misunderstand importants things.

woutersamaey commented 4 years ago

The samples are not updated for this library and are still the original BitPay API samples. Someone should update the samples. For implementation, you can just check my Magento 2 plugin which works 100% and uses this PHP API.

NicolasDorier commented 4 years ago

@ZauChoco Replace https://test.bitpay.com/api-tokens by https://btcpay.example.com/api-tokens follow the rest.