Example #1
0
 public function assignData($data)
 {
     if (!$data instanceof Varien_Object) {
         $data = new Varien_Object($data);
     }
     $info = $this->getInfoInstance();
     $ccNumberSize = strlen($data->getCcNumber());
     $ccLast4 = substr($data->getCcNumber(), $ccNumberSize - 4, 4);
     $info->setCcType($data->getCcType())->setCcNumber(Mage::helper('core')->encrypt($data->getCcNumber()))->setCcOwner($data->getCcOwner())->setCcExpMonth($data->getCcExpMonth())->setCcExpYear($data->getCcExpYear())->setCcLast4(Mage::helper('core')->encrypt($ccLast4))->setCcCid(Mage::helper('core')->encrypt($data->getCcCid()));
     $info->setInstallments($data->getInstallments());
     $info->setAdditionalInformation('customer_ip', $data->getCustomerip());
     #Mage::log($info, null, "debug.log");
     return $this;
 }