已达到每月 API 请求的最大允许 API 数量

The maximum allowed API amount of monthly API requests has been reached

我在 laravel 项目中使用兑换器 api (florianv/laravel-swap) 来获取外币汇率。

我的 composer.json 剪断了相关性:

"require": {
    "php": "^7.1.3",
    "florianv/laravel-swap": "^1.3",
},

虽然 api 在我的本地环境中提供值,但它在生产环境中抛出异常。

    The chain resulted in 2 exception(s): 
    Exchanger\Exception\Exception: The maximum allowed API amount of 
    monthly API requests has been reached. 
    Exchanger\Exception\Exception: The currency is not supported or 
    Google changed the response format

错误本身就很清楚了。但是在升级 api 计划之前,我想我会尝试使用另一个 api 密钥,我从 fixer.io 获得了一个免费的 api 密钥并将其插入 config/swap.php 文件在我的项目中。

/*Config/Swap.php*/
'services' => [
    'fixer' => [
        'access_key' => 'MY_ACCESS_KEY', // Your app id
    ],
    'google' => true,
],

错误仍然存​​在。

我应该在其他地方输入密钥吗?它如何在我的本地环境而不是在生产环境中工作?

选择其他服务 google。

或者您可以使用最新版本并按照文档进行操作。