使用Paywithamazon与Symfony 2使用作曲家安装



我通过作曲家安装了此软件包:

composer require amzn/login-and-pay-with-amazon-sdk-php
composer update

我将其添加到我的控制器文件中:使用Paywithamazon Client;

...并想使用此软件包提供的客户端类。

$amazonClient = new PayWithAmazonClient($this->amazonCredentials);

框架的错误消息:

ClassNotFoundException in CartController.php line 185: Attempted to load 
    class "Client" from namespace "**MicrositeFrontBundleControllerPayWithAmazon**".
Did you forget a "use" statement for e.g.
    "SymfonyBundleFrameworkBundleClient",
    "SymfonyComponentBrowserKitClient",
    "SymfonyComponentHttpKernelClient",
    "GuzzleServiceClient" or "GuzzleHttpClient"?

`

谁能告诉我我做错了什么?如何将"客户端"类的名称空间从MicrositeFrontBundleControllerPayWithAmazon更改为正确的?

(我没有其他软件包的问题...)

欢呼格雷格

我建议您遵循

use PayWithAmazonClient as AmazonClient;
...
$amazonClient = new AmazonClient($this->amazonCredentials);

相关内容

  • 没有找到相关文章

最新更新