Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

stefanio

Retorno Automático

Recommended Posts

Boa tarde,

 

Estou encontrando problemas em relação ao pagseguro. Após o usuário fazer o pagamento, na tela que pede para aguarda que será redirecionado para o sistema. Se o cliente fechar a janela ou apertar stop. O pagseguro não me retorna nenhum post.

Como posso proceder para tentar tratar esses casos?

 

o código

 

//quando for o post automatico
      if (Request.Form.Count > 0)
      {
                        string strFormValues;
                        string requestform = String.Empty;
                        string strNewValue;
                        string strResponse;
                        string Token;

        // faz o tratamento do post
}
else
{
// caso seja o redirecionamento do pagseguro
}


No caso não entra no if, porque não existe valores no post.

Compartilhar este post


Link para o post
Compartilhar em outros sites

Põe uma mensagem bem grande no site:

 

Por favor, aguarde o redirecionamento do site., rs...

 

Brincadeiras a parte, mas é isso mesmo, se o cliente não deixar redirecionar, você perde a referência. Mas isso não é só com o pagseguro, qualquer sistema que utilize que dependa de redirecionamento, precisa aguardar que o mesmo aconteça.

Compartilhar este post


Link para o post
Compartilhar em outros sites

Na tela do pagseguro, não tem como editar o css né? rsrs

 

Porque eu tava vendo, a parte que está escrito, aguarde que será redirecionado, está muito pequeno. às vezes o cliente não ve e fecha a janela.

Compartilhar este post


Link para o post
Compartilhar em outros sites

Hi

How can i set the value to redirect to my site after the payment is complte . I am posting value as

 

sPageForm = "<HTML>" & _
"<BODY onload =""document.forms[0].submit();"">" & _
"<form target=""pagseguro"" method=""post"" action=""" & PayPal_url & """>" & _
"<input type=""hidden"" name=""email_cobranca"" value=""" & mail_id & """ />" & _
"<input type=""hidden"" name=""tipo"" value=""CBR"" />" & _
"<input type=""hidden"" name=""moeda"" value=""" & sCurrency & """ />" & _
"<input type=""hidden"" name=""item_id"" value=""123"" />" & _
"<input type=""hidden"" name=""item_descr"" value=""Pack_Credits"" />" & _
"<input type=""hidden"" name=""item_quant"" value=""1"" />" & _
"<input type=""hidden"" name=""item_valor"" value=""10.12"" />" & _
"<input type=""hidden"" name=""frete"" value=""0"" />" & _
"<input type=""hidden"" name=""peso"" value=""0"" />" & _
"</ form>" & _
"</ body>" & _
"</ HTML>"

Compartilhar este post


Link para o post
Compartilhar em outros sites

How can i set the value to redirect to my site after the payment is complte.

Hi @jayason, first you have to configure your return url in the PagSeguro panel:

 

Step 1 http://forum.imasters.com.br/public/style_emoticons/default/seta.gif Choose Preferências in the left menu:

Imagem Postada

 

Step2 http://forum.imasters.com.br/public/style_emoticons/default/seta.gif Choose Retorno automático de dados in the submenu:

Imagem Postada

 

Step3 http://forum.imasters.com.br/public/style_emoticons/default/seta.gif Select Ativar in the radio field and then inform your return url:

Imagem Postada

 

After doing this the informed URL will receive a HTTP POST as descrieved in https://pagseguro.uo..._de_dados.jhtml

Compartilhar este post


Link para o post
Compartilhar em outros sites

Hi

Thanks a lot. I have one more doubt . I have resisted with Pagseguro and i have a mail id and password. How do i specify the the password so that when ever a client makes payment it goes to my account .

 

Thanks

JAYASON

Compartilhar este post


Link para o post
Compartilhar em outros sites

i have a mail id and password. How do i specify the the password so that when ever a client makes payment it goes to my account .

 

@jayason,

 

You do not have to specify your password, you just have to use your account email and all payment goes to your PagSeguro account, just simple.

 

Once your email is unique, all you have to do is to create a HTML form that point to PagSeguro, and put your email id in the "email_cobranca" field, like this:

 

<form target="pagseguro" method="post" action="https-~~-//pagseguro.uol.com.br/checkout/checkout.jhtml">
	<!-- Here you put your email id -->
	<input type="hidden" name="email_cobranca" value="your_email_id@yourdomain.com">

	<!--
	In this field you can use CP or CBR.
	CP - means that you are using your own shopping cart and this is the default.
	CBR - means that you are using PagSeguro shopping cart.
	-->
	<input type="hidden" name="tipo" value="CP">

	<!--
	This is the ISO 4217 Currency Code, but actually PagSeguro only supports BRL
	-->
	<input type="hidden" name="moeda" value="BRL">

	<!-- ... -->
</form>

 

There are some other required fields that can be found in Campos Obrigatórios

Compartilhar este post


Link para o post
Compartilhar em outros sites

Thanks João Batista Neto . I have some more doubts .They are

1)When i reached the check out page , i want to cancel it and return back to my page , will i be redirected to the page which i have set in my account or somewhere else .

 

Thanks

JAYASON

Compartilhar este post


Link para o post
Compartilhar em outros sites

i want to cancel it and return back to my page , will i be redirected to the page which i have set in my account or somewhere else

 

Nope,

 

Once your client has clicked in your check out button, a new window (or tab) will be oppened. If he don't want to finish the transaction, he just have to close the new window, in this case, your application will not receive the "Retorno Automático" from PagSeguro, so, you must have to set your application to store the cart data with an inactive flag until the "Retorno Automático" has been received.

Compartilhar este post


Link para o post
Compartilhar em outros sites

Hi

Thanks a lot for your reply . I have one more doubt . I have created a page with the code to receive the post from pagseguro(Buy_Credits_Pagseguro_OK.aspx) . Can i manualy create a post method the above page so that i can test if its coming to that page .

 

Thanks

JAYASON

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.