<?php
namespace Laravel\Passport\Http\Controllers;
use Laravel\Passport\Exceptions\OAuthServerException;
use League\OAuth2\Server\Exception\OAuthServerException as LeagueException;
use Nyholm\Psr7\Response as Psr7Response;
trait HandlesOAuthErrors
{
use ConvertsPsrResponses;
/**
* Perform the given callback with exception handling.
*
* @param \Closure $callback
* @return mixed
*
* @throws \Laravel\Passport\Exceptions\OAuthServerException
*/
protected function withErrorHandling($callback)
{
try {
return $callback();
} catch (LeagueException $e) {
throw new OAuthServerException(
$e,
$this->convertResponse($e->generateHttpResponse(new Psr7Response))
);
}
}
}
To access the Kueue Pay Developer API, you’ll need an API key. You can obtain your API key by logging in to your Kueue Pay merchant account and navigating to the API section. Collect Client ID , Secret ID & Merchant ID Carefully. Keep your API key confidential and do not share it publicly.