I have installed the latest php-client version (1.9).
When I go to the Drupal status report page it is showing the library as not installed.
http://i.imgur.com/q8pCKgd.png
I do have the library installed as you can see from my terminal.
$ cd htdocs/sites/all/libraries/php-client/
$ ls
bp_lib.php bp_options.php CHANGELOG LICENSE README.mdAny help wold be appreciated
Comments
Comment #1
iwant2fly commentedComment #2
iwant2fly commentedComment #3
deekayen commentedSometimes when Bitpay updates their library, they move stuff around and the library detection on the Drupal module gets confused. It's usually a trivial fix when I make time to update.
Comment #5
deekayen commented7.x-2.4 should resolve the issue.
Comment #6
iwant2fly commentedWorks great. Thanks.
Comment #8
donquixote commentedThey changed it again. They even removed the file. And you can no longer download the library from the proposed location, instead you are redirected to
https://github.com/bitpay/php-bitpay-client
So I think commerce_bitpay needs a very specific commit (history snapshot) of php-bitpay-client. Just which one?
Also, i think the line number is quite a fragile way to determine the version. Is this really the best way to do this? Libraries API allows to specify a version callback..
Comment #9
deekayen commentedThe whole module is fragile because I think the API this module uses is deprecated. It's a bigger issue than just a Libraries API reference.
Comment #10
deekayen commentedHaving not read any code yet, "This is a self-contained PHP implementation of BitPay's new cryptographically secure API" doesn't look like a good sign for a quick fix.
Comment #11
donquixote commentedWell, I think it used to work kinda ok with an older version of the library. I just need to know which version..
The problem only occured after an update to both the module *and* the library (on a dev instance of a site).
And I did the module update only because the client was not happy with the "Complete checkout" button. So, to fix #2108313: Complete checkout button doesn't go anywhere.
I understand if you say that maybe the whole module needs a rewrite, but I think we can get sth usable just by choosing a suitable version of bitpay php-client.
Comment #12
deekayen commentedYeah, but you're implying they've been making releases. This "new" version 2.0.0 is the first time they've tagged a release in git.
The git commit snapshot at https://github.com/bitpay/php-bitpay-client/archive/b76b91d97ef94d82e9cb... is what this module worked with last time I fixed it. They've done a done of development on the library since then.
Comment #13
deekayen commentedI copied the same zip file link to the project main page.
Next time this module breaks, it's probably them turning off the old API.
Comment #14
donquixote commentedI am actually using a git clone of that library. So the commit ID is what I need :)
b76b91d97ef94d82e9cbf7f03b592b9fd1034463
Comment #15
donquixote commentedMaybe interesting to see the commit history around that one. (look for HEAD)
(further down = older commits)
"Fixed comparison operator" might be important for us.
Everything after that seem to be the big new API-breaking changes.
Comment #16
donquixote commentedNah, great. I am now working with this commit and get
"Notice: Constant VERSION already defined in require_once() (line 44 of /var/www/e4btc.com/dev/htdocs/sites/all/libraries/php-client/bp_lib.php)."
(how stupid of both Drupal and this library to define a VERSION constant in the global namespace)
Also, the "Complete checkout" button is back to doing nothing :(
Comment #17
deekayen commentedIf you figure out a good commit hash to use, I'll link to it's github zip on the project page.