Secure Checkout Secure Pag - Unauthorized

2

I'm having trouble completing the transparent checkout of the secure pag, following the code of what I'm downloading

$url = "https://ws.sandbox.pagseguro.uol.com.br/v2/transactions";
$dados = '[email protected]&token=6128AD81C3E1487CA564B23D28D91577&paymentMode=default&paymentMethod=boleto&currency=BRL&notificationURL=http://pjdesign.zapto.org/newalternativa/notify&reference=ABCD123&senderName=Paulo José&senderCPF=11111111111&senderAreaCode=11&senderPhone=11&[email protected]&senderHash=36f5be1b09a8f3af3a8489cf9ae1d3539884e2012a266f1c303176b6baf381ff&shippingAddressStreet=Rua Getúlio Vargas&shippingAddressNumber=11&shippingAddressComplement=&shippingAddressDistrict=Alto da Boa Vista&shippingAddressPostalCode=75523170&shippingAddressCity=Itumbiara&shippingAddressState=GO&shippingAddressCountry=BRA&shippingType=3&shippingCost=160.00&itemId1=1748&itemDescription1=Shape Adesivado E Pintura Verniz Automotivo&itemAmount1=63.25&itemQuantity1=1';

$curl = curl_init($url);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_HTTPHEADER, Array('Content-Type: application/xml; charset=ISO-8859-1'));
curl_setopt($curl, CURLOPT_POSTFIELDS, $dados);
$xml = curl_exec($curl);
curl_close($curl);

if($xml == 'Unauthorized'){
        echo 'O servidor encontra se temporariamente indisponível';
        printvetor($xml);
        exit;
}

I definitely follow all the instructions in the documentation and always enter Unauthorized, can anyone who has already done this integration help me?

    
asked by anonymous 03.09.2015 / 00:22

0 answers