Sending notifications from Pagseguro Sandbox to local address (C# ASP.NET MVC)

Asked

Viewed 1,419 times

1

I’m doing the integration of Pagseguro in an ASP.NET environment, and everything was going well until I got to the Pagseguro notifications part. As you can see in the image below, I have set the following parameters for redirect and for notifications: Configuração de endereço para recebimento de notificação de transação

The parameters involving the redirect worked correctly, with the transaction code being sent correctly and the buyer being redirected to my page. However, when modifying the transaction status and the notification is sent to the configured address, nothing happens, with the method even being called. When I check the Log, the following message appears:

Log do PagSeguro

To receive the notifications, I tried using the methods as displayed in the following images:

Método 1

Método 2

Método 3

However, none of them worked, with the Sandbox even calling the same.

The documentation related to receiving notification is on this link: https://dev.pagseguro.uol.com.br/documentacao/pagamento-online/notificacoes/api-de-notificacoes#notificacoes-de-transacoes

Would anyone know the solution or could tell me where I’m going wrong?

Thanks in advance.

  • What happens is that the pagseguro cannot access the address localhost:50711, you will have to use some client like Postman to simulate the POST request of the pagseguro.

  • You tested by Chrome?

  • @Pablotondolodevargas You are correct. Thanks for the help!

1 answer

0

Hello.

I’m having this problem also to send notifications to my localhost when I click the button "Forward notification", but I think it’s normal that this kind of notification doesn’t work on localhost.

In my case, to work sending notifications, I send them through the button "Resend local notification".

Take a test and see if you can receive local notification.

If this message appears:

inserir a descrição da imagem aqui

see if in the right corner of the URL field you have this symbol:



If you are, click on it and select "Loading unsafe scripts" and try to send the local notification again.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.