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


PHP Mage_Payment_Model_Method_Abstract::getCode方法代码示例

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


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

示例1: validate

 /**
  * Validate data before save
  *
  * @return Mage_Payment_Model_Billing_Agreement
  */
 public function validate()
 {
     if (is_null($this->_paymentMethodInstance) || !$this->_paymentMethodInstance->getCode() || !$this->getCustomerId() || !$this->getReferenceId() || !$this->getStatus()) {
         throw new Mage_Core_Exception('Not enough data to save billing agreement instance.');
     }
     return $this;
 }
开发者ID:codercv,项目名称:urbansurprisedev,代码行数:12,代码来源:Agreement.php

示例2: _getMethodConfigData

 /**
  * Return system config value by key for specified payment method
  *
  * @param string $key
  * @param Mage_Payment_Model_Method_Abstract $method
  * @param int $storeId
  *
  * @return string
  */
 protected function _getMethodConfigData($key, Mage_Payment_Model_Method_Abstract $method, $storeId = null)
 {
     if (!$method->getCode()) {
         return null;
     }
     return Mage::getStoreConfig("payment/{$method->getCode()}/{$key}", $storeId);
 }
开发者ID:evinw,项目名称:project_bloom_magento,代码行数:16,代码来源:Observer.php

示例3: _filterValues

 /**
  * Filter self data to make sure it can be validated properly
  *
  * @return Mage_Payment_Model_Recurring_Profile
  */
 protected function _filterValues()
 {
     // determine payment method/code
     if ($this->_methodInstance) {
         $this->setMethodCode($this->_methodInstance->getCode());
     } elseif ($this->getMethodCode()) {
         $this->getMethodInstance();
     }
     // unset redundant values, if empty
     foreach (array('schedule_description', 'suspension_threshold', 'bill_failed_later', 'period_frequency', 'period_max_cycles', 'reference_id', 'trial_period_unit', 'trial_period_frequency', 'trial_period_max_cycles', 'init_may_fail') as $key) {
         if ($this->hasData($key) && (!$this->getData($key) || '0' == $this->getData($key))) {
             $this->unsetData($key);
         }
     }
     // cast amounts
     foreach (array('billing_amount', 'trial_billing_amount', 'shipping_amount', 'tax_amount', 'init_amount') as $key) {
         if ($this->hasData($key)) {
             if (!$this->getData($key) || 0 == $this->getData($key)) {
                 $this->unsetData($key);
             } else {
                 $this->setData($key, sprintf('%.4F', $this->getData($key)));
             }
         }
     }
     // automatically determine start date, if not set
     if ($this->getStartDatetime()) {
         $date = new Zend_Date($this->getStartDatetime(), Varien_Date::DATETIME_INTERNAL_FORMAT);
         $this->setNearestStartDatetime($date);
     } else {
         $this->setNearestStartDatetime();
     }
     return $this;
 }
开发者ID:blazeriaz,项目名称:youguess,代码行数:38,代码来源:Profile.php

示例4: isValid

 /**
  * Validate data before save
  *
  * @return bool
  */
 public function isValid()
 {
     $this->_errors = array();
     if (is_null($this->_paymentMethodInstance) || !$this->_paymentMethodInstance->getCode()) {
         $this->_errors[] = Mage::helper('payment')->__('Payment method code is not set.');
     }
     if (!$this->getReferenceId()) {
         $this->_errors[] = Mage::helper('payment')->__('Reference ID is not set.');
     }
     return empty($this->_errors);
 }
开发者ID:codercv,项目名称:urbansurprisedev,代码行数:16,代码来源:AgreementAbstract.php

示例5: getMethodLabelAfterHtml

 /**
  * Payment method additional label part getter
  * @param Mage_Payment_Model_Method_Abstract $method
  */
 public function getMethodLabelAfterHtml(Mage_Payment_Model_Method_Abstract $method)
 {
     if ($form = $this->getChild('payment.method.' . $method->getCode())) {
         return $form->getMethodLabelAfterHtml();
     }
 }
开发者ID:nilshopsahl,项目名称:hasla.local,代码行数:10,代码来源:Methods.php

示例6: setMethod

 /**
  * Method code setter
  *
  * @param string|Mage_Payment_Model_Method_Abstract $method
  * @return Mage_Paypal_Model_Config
  */
 public function setMethod($method)
 {
     if ($method instanceof Mage_Payment_Model_Method_Abstract) {
         $this->_methodCode = $method->getCode();
     } elseif (is_string($method)) {
         $this->_methodCode = $method;
     }
     return $this;
 }
开发者ID:blazeriaz,项目名称:youguess,代码行数:15,代码来源:Config.php

示例7: canPaymentMethodManageSubscriptions

 /**
  * Check whether the payment method can manage subscriptions.
  *
  * @param Mage_Payment_Model_Method_Abstract $paymentMethod
  * @return boolean
  */
 public function canPaymentMethodManageSubscriptions(Mage_Payment_Model_Method_Abstract $paymentMethod)
 {
     return $paymentMethod instanceof Customweb_Payment_Authorization_IPaymentMethod || $paymentMethod instanceof Customweb_Subscription_Model_Payment_Abstract || in_array($paymentMethod->getCode(), array('IsrInvoice'));
 }
开发者ID:xiaoguizhidao,项目名称:extensiongsd,代码行数:10,代码来源:Payment.php

示例8: getMethodFormBlock

 /**
  * Retreive payment method form html
  *
  * @param   Mage_Payment_Model_Abstract $method
  * @return  Mage_Payment_Block_Form
  */
 public function getMethodFormBlock(Mage_Payment_Model_Method_Abstract $method)
 {
     $block = false;
     $blockType = $method->getFormBlockType();
     if ($this->getLayout()) {
         $block = $this->getLayout()->createBlock($blockType, $method->getCode());
         $block->setMethod($method);
     }
     return $block;
 }
开发者ID:natxetee,项目名称:magento2,代码行数:16,代码来源:Data.php

示例9: getCode

 /**
  * Retrieve dummy payment method code
  *
  * @return string
  */
 public function getCode()
 {
     return Mage_Payment_Model_Method_Abstract::getCode();
 }
开发者ID:barneydesmond,项目名称:propitious-octo-tribble,代码行数:9,代码来源:Debit.php

示例10: getPaymentMethodFormHtml

 /**
  * Payment method form html getter
  * @param Mage_Payment_Model_Method_Abstract $method
  */
 public function getPaymentMethodFormHtml(Mage_Payment_Model_Method_Abstract $method)
 {
     return $this->getChildHtml('payment.method.' . $method->getCode());
 }
开发者ID:xiaoguizhidao,项目名称:ortodon,代码行数:8,代码来源:Methods.php


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