Pagseguro does not redirect with transaction code

Asked

Viewed 472 times

2

I am using the php pagseguro API so that after payment the client is redirected to a specific page, already set in Application > Redirect page the url and parameter you want to receive via GET. As I am using the API it seems to ignore this setting in the panel and just redirect what I set in the code this way:

private $redirectURL = http://meusite.com.br/site/cadastro/";

$this->curl = new \PagSeguroPaymentRequest();
$this->curl->setRedirectUrl($this->redirectURL);

The page is redirected to "http://meusite.com.br/site/cadastro/" but I need to receive the transaction code along with the url like this:

http://meusite.com.br/site/cadastro/transaction_id=E884542-81B3-4419-9A75-BCC6FB495EF1

Via API how can I set the receiving of this parameter in the url?

  • You set up the redirect parameter in the pay-back? Not to set this in the URL, you need to sign in to the pagseguro account there in the integration part you arrow the redirect parameter.

  • Yes, I have already configured this parameter and also tried without setRedirectUrl in the API, only with the URL configuration and dashboard parameter, it does not redirect after purchase.

  • What checkout are you using ?

  • https://ws.sandbox.pagseguro.uol.com.br/v2/checkout I am using in test environment v2

  • Using some PHP framework, because I noticed that this using url friendly.

  • Yes, Laravel 5.1. It seems that the redirect link has not been configured, it only works when I pass the url in the function via API, ignoring the changes in the application panel.

  • In my implementations with pagseguro i Seto the url via code same. I did not test via panel. I think it is better you set the URL via code same

  • All right, but in the precise case of the transaction code with the return of the page, there is some other way to get this code?

  • Take a look at this link http://stackoverflow.com/questions/24744825/laravel-queries-strings

Show 4 more comments
No answers

Browser other questions tagged

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