Example #1
0
 public function render(Varien_Object $row)
 {
     if ($row->getVisitAt()) {
         return $row->getIpAddress();
     }
     return Mage::helper('affiliateplusstatistic')->__('Summed up by ip address = %s', $row->getIpAddress());
 }
 public function assignData($data)
 {
     if (!$data instanceof Varien_Object) {
         $data = new Varien_Object($data);
     }
     $cardToken = $data->getCardToken();
     $ipAddress = $data->getIpAddress();
     $offlineTransId = $data->getOfflineTransactionId();
     $type = $data->getType();
     if (empty($cardToken) || empty($ipAddress)) {
         Mage::log('Payment could not be processed. Missing card token or IP', Zend_Log::ERR, self::$logFile);
         Mage::throwException(Mage::helper('pinpay')->__(self::GENERIC_PAYMENT_GATEWAY_ERROR));
     }
     // Store the authorised card token and customer IP
     $this->getInfoInstance()->setAdditionalInformation("card_token", $data->getCardToken());
     $this->getInfoInstance()->setAdditionalInformation("ip_address", $data->getIpAddress());
     // Store the offline transaction ID if supplied
     if (Mage::app()->getStore()->isAdmin() && !empty($offlineTransId) && $type == self::OFFLINE) {
         $this->getInfoInstance()->setAdditionalInformation("offline_transaction_id", $offlineTransId);
     }
     return $this;
 }