当前位置: 首页>>代码示例>>PHP>>正文


PHP Mage_Payment_Model_Method_Cc::assignData方法代码示例

本文整理汇总了PHP中Mage_Payment_Model_Method_Cc::assignData方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Payment_Model_Method_Cc::assignData方法的具体用法?PHP Mage_Payment_Model_Method_Cc::assignData怎么用?PHP Mage_Payment_Model_Method_Cc::assignData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Mage_Payment_Model_Method_Cc的用法示例。


在下文中一共展示了Mage_Payment_Model_Method_Cc::assignData方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: assignData

 public function assignData($data)
 {
     parent::assignData($data);
     $info = $this->getInfoInstance();
     $info->setCcParcelamento($data->getCcParcelamento());
     $this->getCheckout()->setCcParcelamento($data->getCcParcelamento());
     return $this;
 }
开发者ID:renatofig,项目名称:BraspagMagento,代码行数:8,代码来源:Payment.php

示例2: assignData

 /**
  * overwrites the method of Mage_Payment_Model_Method_Cc
  * Assign data to info model instance
  *
  * @param   mixed $data
  * @return  Mage_Payment_Model_Info
  */
 public function assignData($data)
 {
     if (!$data instanceof Varien_Object) {
         $data = new Varien_Object($data);
     }
     parent::assignData($data);
     $info = $this->getInfoInstance();
     $info->setCcSsIssue($data->getCcSsIssue())->setCcSsStartMonth($data->getCcSsStartMonth())->setCcSsStartYear($data->getCcSsStartYear());
     return $this;
 }
开发者ID:arslbbt,项目名称:mangentovies,代码行数:17,代码来源:Direct.php

示例3: assignData

 /**
  * overwrites the method of Mage_Payment_Model_Method_Cc
  * Assign data to info model instance
  *
  * @param   mixed $data
  * @return  Mage_Payment_Model_Info
  */
 public function assignData($data)
 {
     if (!$data instanceof Varien_Object) {
         $data = new Varien_Object($data);
     }
     parent::assignData($data);
     $info = $this->getInfoInstance();
     if ($data->getCcType() == self::CC_CARDTYPE_SS) {
         $info->setCcSsIssue($data->getCcSsIssue())->setCcSsStartMonth($data->getCcSsStartMonth() == 0 || $data->getCcSsStartMonth() == null ? 1 : $data->getCcSsStartMonth())->setCcSsStartYear($data->getCcSsStartYear());
     }
     return $this;
 }
开发者ID:sonassi,项目名称:mage-cybersource,代码行数:19,代码来源:Soap.php

示例4: assignData

 /**
  * Assign data to info model instance
  *
  * @param   mixed $data
  * @return  Mage_Payment_Model_Info
  */
 public function assignData($data)
 {
     if (is_array($data)) {
         $data = new Varien_Object($data);
     }
     try {
         $paymentRequest = Mage::app()->getRequest()->getPost('payment');
         $data->addData(array('cc_last4' => substr($data->cc_number, -4), 'cc_exp_year' => '', 'cc_exp_month' => ''));
         $info = $this->getInfoInstance();
         $this->_openpay_token = $paymentRequest['openpay_token'];
         $this->_device_session_id = $paymentRequest['device_session_id'];
         $info->setOpenpayToken($paymentRequest['openpay_token'])->setDeviceSessionId($paymentRequest['device_session_id']);
     } catch (Exception $e) {
     }
     return parent::assignData($data);
 }
开发者ID:sigues,项目名称:openpay-magento,代码行数:22,代码来源:Openpay.php

示例5: assignData

 public function assignData($data)
 {
     if (!$data instanceof Varien_Object) {
         $data = new Varien_Object($data);
     }
     if ($this->getConfigData('paypage_enabled')) {
         $info = $this->getInfoInstance();
         $info->setAdditionalInformation('paypage_enabled', $data->getPaypageEnabled());
         $info->setAdditionalInformation('paypage_registration_id', $data->getPaypageRegistrationId());
         $info->setAdditionalInformation('paypage_order_id', $data->getOrderId());
         $info->setAdditionalInformation('cc_vaulted', $data->getCcVaulted());
         $info->setAdditionalInformation('cc_should_save', $data->getCcShouldSave());
     }
     if ($this->getConfigData('vault_enable')) {
         $info->setAdditionalInformation('cc_vaulted', $data->getCcVaulted());
         $info->setAdditionalInformation('cc_should_save', $data->getCcShouldSave());
     }
     return parent::assignData($data);
 }
开发者ID:Rodrifer,项目名称:candyclub,代码行数:19,代码来源:PaymentLogic.php

示例6: assignData

 /**
  * Assign data to info model instance
  * @param   mixed $data
  * @return  Mage_Payment_Model_Info
  */
 public function assignData($data)
 {
     Mage::log('Assign Data with Omise');
     $result = parent::assignData($data);
     if (is_array($data)) {
         if (!isset($data['omise_token'])) {
             Mage::throwException(Mage::helper('payment')->__('Need Omise\'s keys'));
         }
         Mage::log('Data that assign is Array');
         $this->getInfoInstance()->setAdditionalInformation('omise_token', $data['omise_token']);
     } elseif ($data instanceof Varien_Object) {
         if (!$data->getData('omise_token')) {
             Mage::throwException(Mage::helper('payment')->__('Need Omise\'s keys'));
         }
         Mage::log('Data that assign is Object');
         $this->getInfoInstance()->setAdditionalInformation('omise_token', $data->getData('omise_token'));
     }
     return $result;
 }
开发者ID:agentelinux,项目名称:omise-magento,代码行数:24,代码来源:PaymentMethod.php

示例7: assignData

 public function assignData($data)
 {
     parent::assignData($data);
     if (!$data instanceof Varien_Object) {
         $data = new Varien_Object($data);
     }
     $info = $this->getInfoInstance();
     if (!$info->getCcLast4() && $data->getCcLastFour()) {
         $info->setCcLast4($data->getCcLastFour());
     }
     $details = array();
     if ($data->getData('cc_save_future')) {
         $details['cc_save_future'] = 1;
     }
     if ($data->getData('securesubmit_token')) {
         $details['securesubmit_token'] = $data->getData('securesubmit_token');
     }
     if ($data->getData('use_credit_card')) {
         $details['use_credit_card'] = 1;
     }
     if ($data->getData('customer_id')) {
         $details['customer_id'] = $data->getData('customer_id');
     }
     if (!empty($details)) {
         $this->getInfoInstance()->setAdditionalData(serialize($details));
     }
     return $this;
 }
开发者ID:rcclaudrey,项目名称:dev,代码行数:28,代码来源:Payment.php

示例8: assignData

 /**
  * Assign post data to the payment info object.
  * @param array|Varien_Object $data Contains payment data submitted in checkout - Varien_Object in OPC, array otherwise
  * @return self
  */
 public function assignData($data)
 {
     parent::assignData($data);
     if (is_array($data)) {
         $data = Mage::getModel('Varien_Object', $data);
     }
     if ($this->_isUsingClientSideEncryption) {
         $this->getInfoInstance()->setCcLast4($data->getCcLast4());
     }
     return $this;
 }
开发者ID:WinstonN,项目名称:magento-retail-order-management,代码行数:16,代码来源:Ccpayment.php

示例9: assignData

 /**
  * Assign data to info model instance
  *
  * @param   array|Varien_Object $paymentData
  * @return  Fontis_EwayAu_Model_Token
  */
 public function assignData($paymentData)
 {
     parent::assignData($paymentData);
     if (is_array($paymentData)) {
         $paymentData = new Varien_Object($paymentData);
     }
     $tokenHelper = $this->getTokenHelper();
     $customerId = $tokenHelper->getCustomerId();
     // If customer credit card data has already been stored on eWAY recently skip.
     if (!$customerId) {
         // Determine if customer credit card data already exists on eWAY
         try {
             $query = $this->queryCustomerByReference();
             // Check if customer data requires update
             if ($query->isRequestSuccessful()) {
                 $updateResponse = $this->updateCustomer($paymentData, $query->getProcessedResponse());
                 if ($updateResponse === false) {
                     $tokenHelper->logMessage('Unable to update eWAY token customer.');
                     Mage::throwException('An error occurred during the checkout process.');
                 }
             } else {
                 $createResponse = $this->createCustomer($paymentData);
                 if (!$createResponse->isRequestSuccessful()) {
                     $tokenHelper->logMessage('Unable to create eWAY token customer.');
                     Mage::throwException('An error occurred during the checkout process.');
                 }
             }
         } catch (Exception $e) {
             $tokenHelper->logMessage($e->getMessage());
             Mage::throwException($e->getMessage());
         }
     }
     return $this;
 }
开发者ID:netzkollektiv,项目名称:fontis_ewayau,代码行数:40,代码来源:Token.php

示例10: assignData

 public function assignData($data)
 {
     parent::assignData($data);
     $this->getInfoInstance()->setCcLast4($data->getCcLast4());
     return $this;
 }
开发者ID:technomagegithub,项目名称:inmed-magento,代码行数:6,代码来源:Paymentmethod.php

示例11: assignData

 /**
  * Update the CC info during the checkout process.
  */
 public function assignData($data)
 {
     if (!$data instanceof Varien_Object) {
         $data = new Varien_Object($data);
     }
     parent::assignData($data);
     if ($data->hasCardId() && $data->getCardId() != '') {
         $card = $this->loadAndSetCard($data->getCardId());
         if ($data->hasCcType() && $data->getCcType() != '') {
             $this->getInfoInstance()->setCcType($data->getCcType());
         }
         if ($data->hasCcLast4() && $data->getCcLast4() != '') {
             $this->getInfoInstance()->setCcLast4($data->getCcLast4());
         }
         if ($data->getCcExpYear() > date('Y') || $data->getCcExpYear() == date('Y') && $data->getCcExpMonth() >= date('n')) {
             $this->getInfoInstance()->setCcExpYear($data->getCcExpYear())->setCcExpMonth($data->getCcExpMonth());
         }
         if ($data->hasSavedCcCid() && $data->getSavedCcCid() != '') {
             $this->getInfoInstance()->setCcCid(preg_replace('/[^0-9]/', '', $data->getSavedCcCid()));
         }
     } else {
         $this->getInfoInstance()->unsetData('tokenbase_id');
     }
     if ($data->hasSave()) {
         $this->getInfoInstance()->setAdditionalInformation('save', intval($data->getSave()));
     }
     return $this;
 }
开发者ID:billadams,项目名称:forever-frame,代码行数:31,代码来源:Method.php


注:本文中的Mage_Payment_Model_Method_Cc::assignData方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。