Php 实时服务器上出现Laravel Coinbase API Http异常错误,但可在Xampp上运行

Php 实时服务器上出现Laravel Coinbase API Http异常错误,但可在Xampp上运行,php,laravel,api,coinbase-api,Php,Laravel,Api,Coinbase Api,Laravel上的Coinbase API生成以下错误日志。有人帮我解决这个问题。这个错误只发生在实时环境中,但在xampp中它工作得很好。下面是错误日志。可能是什么问题 production.ERROR: Type error: Argument 1 passed to `Coinbase\Wallet\Exception\HttpException::exceptionClass() must be an instance of Psr\Http\Message\ResponseInter

Laravel上的Coinbase API生成以下错误日志。有人帮我解决这个问题。这个错误只发生在实时环境中,但在xampp中它工作得很好。下面是错误日志。可能是什么问题

 production.ERROR: Type error: Argument 1 passed to `Coinbase\Wallet\Exception\HttpException::exceptionClass() must be an instance of Psr\Http\Message\ResponseInterface, null given, called in /home/amunuxwq/public_html/core/vendor/coinbase/coinbase/src/Exception/HttpException.php on line 33 {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\FatalThrowableError(code: 0): Type error: Argument 1 passed to Coinbase\\Wallet\\Exception\\HttpException::exceptionClass() must be an instance of Psr\\Http\\Message\\ResponseInterface, null given, called in /home/amunuxwq/public_html/core/vendor/coinbase/coinbase/src/Exception/HttpException.php on line 33 at /home/amunuxwq/public_html/core/vendor/coinbase/coinbase/src/Exception/HttpException.php:98)`
这是我在laravel项目中使用的代码

<?php
namespace App;
use Coinbase\Wallet\Client;
use Coinbase\Wallet\Configuration;
use Coinbase\Wallet\Resource\Account;
use Coinbase\Wallet\Resource\Address;
class PayData {

    private static $apiKey= "XXXXXXXXXXXX";
    private static $apiSecret= "YYYYYYYYYYYYYYYYYYYYY";

     public static function apiauth()
     {

        $configuration = Configuration::apiKey(self::$apiKey, self::$apiSecret);
        $client = Client::create($configuration);
        return $client;
     }

    public static function rates(){
    try{
        $xrate['usvalue']= PayData::apiauth()->getSpotPrice('BTC-USD')->getAmount();
        $xrate['buyvalue']=PayData::apiauth()->getBuyPrice('BTC-USD')->getAmount();
        $xrate['sellvalue']=PayData::apiauth()->getSellPrice('BTC-USD')->getAmount();
         return $xrate;
    }
    catch (Exception $e){
        $msg =$e->getMessage();
        return $msg;
    }
    }

    Public static function myaddress($name){
        try{

        $account =PayData::apiauth()->getPrimaryAccount();
        $address= new Address ([
            'name'=>$name
            ]);
         $add = PayData::apiauth()->createAccountAddress($account,$address);
         //$addressId=PayData::apiauth()->getAccountAddresses($account);
        //$addressd = $addressId->getfirstID();
        //$address = PayData::apiauth()->getAccountAddress($account,$addressd);
        //echo $address->getAddress();
        return $add->getAddress();
        }
        catch (Exception $e){
            report ($e);
            return false;

        }
    }


    }

您必须更新
etc
文件夹中的coinbase证书(
ca coinbase.crt


它可以工作:)

请显示您的代码。一个错误没有帮助,因为这是code@aynber我已包含代码您是如何解决此问题的?证书已添加到etc文件夹,但仍显示相同的错误消息。您好,请说明如何添加证书?