2
Coinbase API로 작업하기 위해 아래 코드를 잘못 이해할 수 있습니다. Composer에 Coinbase 의존성이 설치되어 있습니다. 이전에는 Coinbase 클래스가 설치되지 않았다는 오류가 발생했습니다. 이는 경로 때문이라고 생각했습니다. 더 이상 오류가 발생하지 않지만 코드가 실행되지 않습니다. 누구든지 도와 줄 수 있습니까?Coinbase API를 작동 시키려고 시도합니다.
<?php
require_once __DIR__ . '/usr/bin/vendor/autoload.php';
use coinbase\coinbase;
//I've tried to run it both with and without the following 3 lines of code with no difference
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
$apiKey = 'XXX';
$apiSecret = 'XXX';
$configuration = Configuration::apiKey($apiKey, $apiSecret);
$client = Client::create($configuration);
$account = $client->getPrimaryAccount();
echo 'Account name: ' . $account->getName() . '<br>';
echo 'Account currency: ' . $account->getCurrency() . '<br>';
?>
응답 해 주셔서 감사합니다. 그것은 불행히도 그것을하지 않았다. 해당 링크를 확인하려고합니다. – Shlomo7