I'm using coinbase-php to generate payment pages and process orders on my website. I'm able to create buttons and payment pages without any problems, but when I attempt to check an order's status, I get a 401 error. The code I'm using is:
$coinbase = Coinbase::withApiKey($coinbase_key, $coinbase_secret);
$data = json_decode($coinbase->get('/orders/'.$order_id));
And this is the error I get:
Notice: exception 'Coinbase_ApiException' with message 'Status code 401' in lib\Coinbase\Requestor.php:22
Stack trace:
#0 lib\Coinbase\Rpc.php(95): Coinbase_Requestor->doCurlRequest(Resource id #50)
#1 lib\Coinbase\Coinbase.php(64): Coinbase_Rpc->request('GET', '/orders/6c00ec5...', Array)
#2 inc\admin\orders.inc.php(214): Coinbase->get('/orders/N1263OA...')