Пример #1
0
 /**
  * Get information of purchased items and set in the attribute $_paymentRequest
  */
 private function setItemsInformation($product)
 {
     $this->_paymentRequest->addItems()->withParameters($product->getId(), \UOL\PagSeguro\Helper\Data::fixStringLength($product->getName(), 255), $product->getSimpleQtyToShip(), \UOL\PagSeguro\Helper\Data::toFloat($product->getPrice()), round($product->getWeight()));
 }
Пример #2
0
 /**
  * Get information of purchased items and set in the attribute $_paymentRequest
  *
  * @return PagSeguroItem
  */
 private function setItemsInformation()
 {
     foreach ($this->_checkoutSession->getLastRealOrder()->getAllVisibleItems() as $product) {
         $this->_paymentRequest->addItems()->withParameters($product->getId(), \UOL\PagSeguro\Helper\Data::fixStringLength($product->getName(), 255), $product->getSimpleQtyToShip(), \UOL\PagSeguro\Helper\Data::toFloat($product->getPrice()), round($product->getWeight()));
     }
 }