I have to pre-define the delivery address of the pagseguro in my code PHP
. The problem is that I have tried and I can not, what I can do is just set the billing address. My code:
$paymentRequest = new PagSeguroPaymentRequest();
$paymentRequest->setCurrency("BRL");
$address = new PagSeguroAddress();
/* Define o valor do frete */
$shipping = new PagSeguroShipping();
$type = new PagSeguroShippingType(3);
$shipping->setType($type);
$shipping->setCost($frete);
$address->setStreet('Av. Brig. Faria Lima');
/* Informando o número do logradouro */
$address->setNumber('1384');
/* Informando o complemento do logradouro */
$address->setComplement('apto. 114'); //
/* Informando o bairro do logradouro */
$address->setDistrict('Jardim Paulistano');
/* Informando o bairro a cidade */
$address->setCity('São Paulo');
/* Informando o bairro o estado */
$address->setState('SP');
/* Informando o bairro o país */
$address->setCountry('BRA');
$shipping->setAddress($address);
$paymentRequest->setShipping($shipping);
This code is only setting the billing, but the delivery code it can for me to type CEP
.