/** * Get all transactions and orders and return builded data * * @return array */ public function request() { //load payments by date $this->getPagSeguroAbandoned(); if ($this->_PagSeguroPaymentList->getTransactions()) { foreach ($this->_PagSeguroPaymentList->getTransactions() as $payment) { date_default_timezone_set('UTC'); $order = \UOL\PagSeguro\Helper\Data::getReferenceDecryptOrderID($payment->getReference()); $order = $this->_order->load($order); if ($this->getStoreReference() == \UOL\PagSeguro\Helper\Data::getReferenceDecrypt($payment->getReference())) { if (!is_null($this->_session->getData('store_id'))) { array_push($this->_arrayPayments, $this->build($payment, $order)); } if ($order) { array_push($this->_arrayPayments, $this->build($payment, $order)); } } } } date_default_timezone_set($this->_timezone->getConfigTimezone()); return $this->_arrayPayments; }
/** * @param $payment * @return string */ protected function decryptReference($payment) { return \UOL\PagSeguro\Helper\Data::getReferenceDecrypt($payment->getReference()); }