/**
  * Get a list of PagSeguroTransaction from webservice.
  * @return JSON|null of PagSeguroTransaction list
  */
 public function doPostAction()
 {
     $this->builder();
     if ($this->days) {
         $this->log->setSearchTransactionLog(get_class($this->refund), $this->days);
         try {
             $this->refund->initialize($this->days);
             if (!$this->refund->getPaymentsArray()) {
                 print json_encode(array("status" => false));
                 exit;
             }
             print $this->refund->getTransactionGrid($this->refund->getPaymentsArray());
         } catch (Exception $e) {
             print json_encode(array("status" => false, "err" => trim($e->getMessage())));
         }
     }
 }
예제 #2
0
 /**
  * Get status of server extensions required for PagSeguro module.
  * @return JSON|null of requirement list
  */
 public function doRequirementsAction()
 {
     $this->builder();
     $this->log->setRequirementsLog();
     print json_encode($this->requirements->validateRequirements());
 }