I'm working with PagSeguro in Laravel 5.3, the problem is the Class PagSeguroConfigWrapper that I need to generate to do the authentication, I do all the steps described in the documentation and it works only if I use the authentication after the instance of the class PagSeguroPaymentRequest. Home
See the example:
It works
new PagSeguroPaymentRequest();
$credentials = PagSeguroConfig::getAccountCredentials();
$transaction = PagSeguroTransactionSearchService::searchByCode($credentials, $transaction_code);
Does not work, error: Credentials not set
$credentials = PagSeguroConfig::getAccountCredentials();
$transaction = PagSeguroTransactionSearchService::searchByCode($credentials, $transaction_code);