/** * Assign data to info model instance * * @param Varien_Object|Array $data * @return TemplateTag_Stripe_Model_Payment */ public function assignData($data) { if (is_array($data)) { $data = new Varien_Object($data); } try { $token = $this->getToken($data->getStripeToken()); $data->addData(array('cc_last4' => $token->card->last4, 'cc_type' => $token->card->type, 'cc_owner' => $token->card->name)); } catch (Exception $e) { } $data->setData('stripe_test', $this->_getHelper()->getTest()); return parent::assignData($data); }