コード例 #1
0
ファイル: PaymentMethod.php プロジェクト: pagseguro/magento2
 /**
  * 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']);
     }
 }
コード例 #2
0
ファイル: BoletoMethod.php プロジェクト: pagseguro/magento2
 /**
  * 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]));
 }