2016-07-15 39 views
2

我使用php api for blockchain.info。blockchain.info api_code缺失

這裏是我的代碼:

$Blockchain = new \Blockchain\Blockchain(); 
$Blockchain->setServiceUrl('http://localhost:' . env('BTCPORT') . '/'); 
$Blockchain->Wallet->credentials($w_id, $w_password); 
// $w_id is wallet id 
$response = $Blockchain->Wallet->send($account, $amount, null, $fee, 'my comment'); 

在這裏,我的node.js的過程說 '錯誤:缺少查詢參數:a​​pi_code'。 我使用php的這個庫https://github.com/blockchain/api-v1-client-php

回答

1

檢查blockchain api。它應該是

$Blockchain = new \Blockchain\Blockchain($url, $my_api_code); 

如果您需要API代碼,您可以獲得here