When I receive notification of PagSeguro with payment status, it gives 500 error when pushing in my API

1

The code below is the PUSH created so that PAGSeguro sends me notification of the status of my payment. But the error returned is 500, and in their forum there are no answers so far. Anyone who has ever had this problem can help me?

@PostMapping(value="/pagseguro-notificacao")
    public @ResponseBody
    String resgistrarNotificacao(
            @RequestParam(value = "notificationCode") String nCode,
            @RequestParam(value = "notificationType") String nType) {
        try {
            final PagSeguro pagSeguro = PagSeguro.instance(Credential.sellerCredential(sellerEmail,
                      sellerToken), PagSeguroEnv.PRODUCTION);

            TransactionDetail transaction = pagSeguro.transactions().search().byNotificationCode(nCode);

            if (transaction != null) {                
                atualizarStatusDoAnuncio(transaction);
            }

        } catch (Exception e) {
            Logger.getLogger(e.getLocalizedMessage());
        }

        return null;

    }

Error returned

    
asked by anonymous 15.05.2018 / 21:07

0 answers