Exemplo n.º 1
0
 /** @return InvoiceLog */
 function getInvoiceLog()
 {
     if (!$this->log) {
         $this->log = $this->plugin->getDi()->invoiceLogRecord;
         if ($this->invoice) {
             $this->log->invoice_id = $this->invoice->invoice_id;
             $this->log->user_id = $this->invoice->user_id;
         }
         $this->log->paysys_id = $this->getPlugin()->getId();
         $this->log->remote_addr = $_SERVER['REMOTE_ADDR'];
         foreach ($this->plugin->getConfig() as $k => $v) {
             if (is_scalar($v) && strlen($v) > 4) {
                 $this->log->mask($v);
             }
         }
     }
     return $this->log;
 }