0
59001 - "Unknown web Session id"
I am implementing Transparent Pagseguro Checkout using PHP v2 API, but I always get the above error in the Javascript part. Their support is horrible, there’s nowhere else to turn.
Edited: I added the real link so that tests can be performed.
Follows the code:
function cartao(){
$(document).ready(function(){
var senderHash;
$.post('http://plimplimfestas.com/rafael/checkout.php', { sessao: "sessao" }, function(returnedData){
//TESTES
//*******************************************//
//***** Inicializando a sessão checkout *****// //*******************************************//
var xml = returnedData,
xmlDoc = $.parseXML(xml),
$xml = $(xmlDoc),
$title = $xml.find("id");
var idSess = $title.text();
console.log("SessionId");
console.log(idSess);
PagSeguroDirectPayment.setSessionId(idSess);
//***************************************//
//***** Obtendo o hash do comprador *****//
//***************************************//
var hashComprador = PagSeguroDirectPayment.getSenderHash();
senderHash = hashComprador;
//FIM TESTES
}).done(function(){
PagSeguroDirectPayment.getPaymentMethods({
success: function(response){ console.log(response); },
error: function(response){ console.log(response); },
complete: function(response){ console.log(response); }
});
throw "Stop forçado.";
//Os consoles de error e complete acima retornam o erro
/*
existem mais trechos, porém não passa do ponto acima
*/
}).fail(function(e){
console.error(e);
});
}); //document ready
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
Add the link http://codepen.io/szagot/pen/RdXVY?editors=0010 in your reply, because without it I would still be lost haha Everything working, thanks!
– Jhonatan Pereira
@Jhonatanpereira - Placed ;)
– Szag-Ot