Skip to content

Commit

Permalink
Fix Verify2 bug that prevents verifications from being sent (#397)
Browse files Browse the repository at this point in the history
* Add missing argument.

* Remove "setClient" method call.

* Reversed auth handler array order.
  • Loading branch information
ash-jc-allen authored Apr 18, 2023
1 parent 6f6bb09 commit 53a204b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Verify2/ClientFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@

namespace Vonage\Verify2;

use Psr\Container\ContainerInterface;
use Vonage\Client\APIResource;
use Vonage\Client\Credentials\Handler\BasicHandler;
use Vonage\Client\Credentials\Handler\KeypairHandler;

class ClientFactory
{
public function __invoke(): Client
public function __invoke(ContainerInterface $container): Client
{
$api = $container->make(APIResource::class);
$api->setIsHAL(false)
->setErrorsOn200(false)
->setClient($this->vonageClient->reveal())
->setAuthHandler([new BasicHandler(), new KeypairHandler()])
->setAuthHandler([new KeypairHandler(), new BasicHandler()])
->setBaseUrl('https://api.nexmo.com/v2/verify/');

return new Client($api);
Expand Down

0 comments on commit 53a204b

Please sign in to comment.