btcpayserver / btcpayserver-php-client

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

Update to Upstream Version 3.6.2005 of the v2 client repo #31

Closed petzsch closed 4 years ago

petzsch commented 4 years ago

This PR will move the PHP Client for BTCPayServer to the new Upstream Codebase of their v2 repository.

I know this is a massive PR, and we should have a discussion if any of these changes could potentially break other plugins using this client. (in case anyone uses composer with version * or something)

Hope this makes it in.

NicolasDorier commented 4 years ago

I can't really review it. You tried if at least they did not break their own REST API?

woutersamaey commented 4 years ago

I will pull it in my Magento 2 plugin and see if it works. If it does, we can at least be certain that basic order creation & payment works.

petzsch commented 4 years ago

Well the basic things (creating an invoice, querrying an invoice) seem to work.

I am using it in 3 projects with the code we had in the v2 repo since january

There are also unit tests preconfigured for the btcpay demo mainnet instance which seem to be green (the once supported by btcpayserver):

https://github.com/btcpayserver/php-btcpay-client-v2/blob/master/tests/BtcPaySDK/BtcPayTest.php

Something I noticed this morning: The Guide.md still contains a ton of bitpay references... that needs some more refinement. :-)

woutersamaey commented 4 years ago

I think you also wrote over the README.md. Maybe you can merge the old text with the new, explaining differences? The previous version was numbered 0.2.0 1.0.0 by me. Your version should then be 0.3.0 2.0.0 ?

woutersamaey commented 4 years ago

I am using it in 3 projects with the code we had in the v2 repo since january

My Magento module is not on your v2 from jan, but 0.2.0 1.0.0 from this repo. My case will be what most people following this repo will experience.

petzsch commented 4 years ago

I went by your tags (the last beeing v1.0.0), but sure we can call it 0.3.0 as well. I allowed edits by maintainers to my repo, feel free to make edits there to add it to this PR :-)

woutersamaey commented 4 years ago

My mistake, I meant 1.0.0. 0.2.0 is old. Corrected previous replies.

petzsch commented 4 years ago

some variable names in the samples still include "bitpay" in their names... don't know if we want to change that as well.

The Readme.md now includes the information from the old readme as well.

Please let me know if there is anything I can do to help with the magento2 plugin.

petzsch commented 4 years ago

any update on this?

NicolasDorier commented 4 years ago

hey @woutersamaey @psyb0t don't hesitate to add @petzsch as contributor to this repo if you are too busy reviewing the contributions. He has been a member in the community since long ago.

woutersamaey commented 4 years ago

@NicolasDorier I've added him to this repo.

Unfortunately not finding the time to check everything. Personally I'm looking forward to the Greenfield API, making this and the BitPay API compatibility obsolete.

petzsch commented 4 years ago

BitPay updated to v4.0.2007 Will try to get the changes into my repo for this pull request.

NicolasDorier commented 4 years ago

@petzsch btw, we don't have to keep compatibility with them now. I did that originally so people could migrate from their API to ours. But now we don't need it.

petzsch commented 4 years ago

Agreed. We should probably shift effort to making a Greenfield API Client available. Just had a look at the upcoming Invoices endpoint... awesome stuff. 👍

https://github.com/btcpayserver/btcpayserver/pull/1760

petzsch commented 4 years ago

Closed in favour of Greenfield.

There is no need to break the old bitpay api implementation that people are using, when the way to go will be Greenfield in the foreseeable future.