I installed this package via composer:
composer require amzn/login-and-pay-with-amazon-sdk-php
composer update
I added this to my Controller file: use PayWithAmazon\Client;
... and would like to use the Client class, provided with this package.
$amazonClient = new PayWithAmazon\Client($this->amazonCredentials);
The error message of the framework:
ClassNotFoundException in CartController.php line 185: Attempted to load
class "Client" from namespace "**Microsite\FrontBundle\Controller\PayWithAmazon**".
Did you forget a "use" statement for e.g.
"Symfony\Bundle\FrameworkBundle\Client",
"Symfony\Component\BrowserKit\Client",
"Symfony\Component\HttpKernel\Client",
"Guzzle\Service\Client" or "Guzzle\Http\Client"?
`
Can anyone tells me what i do wrong?
How do I change the namespace for "Client" class from Microsite\FrontBundle\Controller\PayWithAmazon
to the right one?
(I did not have problems with other packages...)
Cheers Greg
I will suggest you do follow
use PayWithAmazon\Client as AmazonClient;
...
$amazonClient = new AmazonClient($this->amazonCredentials);