In localhost everything working fine . But in live server its breaking at a fatal error and not executing further.
/* ======== API CONFIG ========== */
require __DIR__.'/dev_components/wallet_api_components/vendor/autoload.php';
use Coinbase\Wallet\Client;
use Coinbase\Wallet\Configuration;
use Coinbase\Wallet\Resource\Account;
use Coinbase\Wallet\Resource\Address;
use Coinbase\Wallet\Resource\Transaction;
use Katzgrau\KLogger\Logger;
/* Settings */
$apiKey = "XXXXXXXXXX";
$apiSecret = "YYYYYYYYYYYYYYY";
$configuration = Configuration::apiKey($apiKey, $apiSecret);
$logger = new Logger(__DIR__.'/errorlog', Psr\Log\LogLevel::WARNING, array (
'logFormat' => '{date} - {level} - {message}',
'filename' => 'error_log',
'extension' => 'txt'
));
$logger->info('INFO message');
$configuration->setLogger($logger);
$client = Client::create($configuration);
// I have used print_r($configuration) ; print_r($client) to check the full
//configuration and client object and in both localhost and Live server its
//showing same data
$account_btc = $client->getAccount('BTC'); // From this line nothing executing
$account_eth = $client->getAccount('ETH');
the Error is
stderr: PHP Catchable fatal error: Argument 1 passed to Coinbase\Wallet\Exception\HttpException::exceptionClass() must be an instance of Psr\Http\Message\ResponseInterface, null given, called in /path/vendor/coinbase/coinbase/src/Exception/HttpException.php on line 33 and defined in /path/vendor/coinbase/coinbase/src/Exception/HttpException.php on line 98
What is the reason behind getting the above fatal error in Live Server and how to get rid of this ?