4
I have to pre-set the delivery address of the pagseguro in my code PHP
. The problem is I’ve tried and I can’t, 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 charge, but the delivery code it can for me to enter the CEP
.