The api key is now deprecated and only two factor or oAuth is available.

Cheers

Comments

danharper’s picture

Priority: Major » Critical
torgospizza’s picture

Might be a slight typo, as OAuth and "API Key plus Secret key" are available. You do need two-factor authentication to enable the API key, though, but it's essentially a version 2 of the Simple key.

However after some investigation the module will through a WSOD because the Coinbase API now requires a Secret Key. Without that then the library throws a 401 (unauthorized) error and it will fail during the checkout process.

zhuber’s picture

Assigned: Unassigned » zhuber
Status: Active » Needs work

I'm preparing a patch for this, since I am looking to use Coinbase for my bitcoin transactions.

zhuber’s picture

Title: API Key now depreciated » API Key now deprecated
Assigned: zhuber » Unassigned
Status: Needs work » Needs review
StatusFileSize
new3.77 KB

I've patched this module to use the new authentication version (key and secret).

zhuber’s picture

StatusFileSize
new2.77 KB

Updated patch, without install donation additions.

romank0’s picture

I would also replace https://coinbase.com/api/v1/ (since it's deprecated) with https://api.coinbase.com/v1/ in commerce_coinbase.module and commerce_coinbase.install files.
P.S. Did the same fixes in the code a few days ago myself, never got around to learn how to create a patch for Drupal modules :)
By the way, do you have any issues with Coinbase callbacks?

zhuber’s picture

Status: Needs review » Fixed

The patch from #5 has been ported to the 7.x-1.x branch, it will go out with the next release.

@romank0 - Can you post your patch or create a new ticket for your changes?

romank0’s picture

Hey @zhuber. Thank you. Tried your patch today everything works except the Coinbase callbacks. For whatever reason I'm getting following error in the logs, every time I receive the callback: Coinbase_ApiException: Status code 401 in Coinbase_Requestor->doCurlRequest() (line 22 of /sites/all/libraries/coinbase-php/lib/Coinbase/Requestor.php).
Do you experience the same behavior by any chance? Thank you.

zhuber’s picture

@romank0 - Please make sure you have the correct API key and secret configured in the 'Coinbase' settings. The 401 issue is an authorization issue. This is actually the issue that is fixed by my patch. You still need to add the correct key/secret combination though.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

WillsCreative’s picture

I applied patch #5 and I get the following error

Fatal error: Class 'Coinbase_ApiKeyAuthentication' not found in /home/mysite/public_html/sites/all/modules/commerce_coinbase/includes/commerce_coinbase.commerce_callbacks.inc on line 178

zhuber’s picture

@WillsCreative

Make sure you have the Coinbase PHP library. This is a prerequisite.

If you are still having trouble, read through the instructions on the project homepage:
https://www.drupal.org/project/commerce_coinbase