/** * Set the sender phone if it exist */ private function setSenderPhone() { $shipping = $this->getShippingData(); if (!empty($shipping['telephone'])) { $phone = \UOL\PagSeguro\Helper\Data::formatPhone($shipping['telephone']); $this->_paymentRequest->setSender()->setPhone()->withParameters($phone['areaCode'], $phone['number']); } }
/** * Get the shipping information and set in the attribute $_paymentRequest */ private function setShippingInformation() { $shipping = $this->getShippingData(); $address = \UOL\PagSeguro\Helper\Data::addressConfig($shipping['street']); $this->_paymentRequest->setShipping()->setAddress()->withParameters($this->getShippingAddress($address[0], $shipping), $this->getShippingAddress($address[1]), $this->getShippingAddress($address[0]), \UOL\PagSeguro\Helper\Data::fixPostalCode($shipping['postcode']), $shipping['city'], $this->getRegionAbbreviation($shipping['region']), $this->getCountryName($shipping['country_id']), $this->getShippingAddress($address[2])); }