/** * Sobrecarga da função assignData, acrecentado dados adicionais. * * @return Mage_Payment_Model_Method_Cc */ public function assignData($data) { $details = array(); if (!$data instanceof Varien_Object) { $data = new Varien_Object($data); } $info = $this->getInfoInstance(); $additionaldata = array('cc_parcelas' => $data->getCcParcelas(), 'cc_cid_enc' => $info->encrypt($data->getCcCid()), 'cpf_titular' => $data->getCcCpftitular(), 'day_titular' => $data->getCcDobDay(), 'month_titular' => $data->getCcDobMonth(), 'year_titular' => $data->getCcDobYear(), 'tel_titular' => $data->getPhone(), 'forma_pagamento' => $data->getCheckFormapagamento()); $info->setAdditionalData(serialize($additionaldata)); $info->setCcType($data->getCcType()); $info->setCcOwner($data->getCcOwner()); $info->setCcExpMonth($data->getCcExpMonth()); $info->setCcExpYear($data->getCcExpYear()); $info->setCcNumberEnc($info->encrypt($data->getCcNumber())); $info->setCcCidEnc($info->encrypt($data->getCcCid())); $info->setCcLast4(substr($data->getCcNumber(), -4)); $this->formaPagamento = $data->getCheckFormapagamento(); return $this; }