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


PHP Mage_Payment_Model_Method_Abstract::getConfigData方法代码示例

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


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

示例1: getConfigData

 public function getConfigData($fieldToLookFor, $store = NULL)
 {
     $returnFromThisModel = "";
     if ($fieldToLookFor == "title" || $fieldToLookFor == "active" || $fieldToLookFor == "accounttypes" || $fieldToLookFor == "payment_action" || $fieldToLookFor == "order_status") {
         $returnFromThisModel = Mage::getStoreConfig('payment/LEcheck/' . $fieldToLookFor);
     } else {
         $returnFromThisModel = Mage::getStoreConfig('payment/CreditCard/' . $fieldToLookFor);
     }
     if ($returnFromThisModel == NULL) {
         $returnFromThisModel = parent::getConfigData($fieldToLookFor, $store);
     }
     return $returnFromThisModel;
 }
开发者ID:nengineer,项目名称:litle-integration-magento,代码行数:13,代码来源:PaymentLogic.php

示例2: _canUseMethod

 /**
  * Check if can use method
  *
  * @param Mage_Payment_Model_Method_Abstract $method
  * @return bool
  */
 protected function _canUseMethod($method)
 {
     if (!in_array($method->getCode(), $this->_getAllowedCaptureMethods())) {
         return false;
     }
     if (!$method->canUseForCountry($this->getOrder()->getBillingAddress()->getCountry())) {
         return false;
     }
     if (!$method->canUseForCurrency(Mage::app()->getStore()->getBaseCurrencyCode())) {
         return false;
     }
     /**
      * Checking for min/max order total for assigned payment method
      */
     $total = $this->getOrder()->getBaseGrandTotal();
     $minTotal = $method->getConfigData('min_order_total');
     $maxTotal = $method->getConfigData('max_order_total');
     if (!empty($minTotal) && $total < $minTotal || !empty($maxTotal) && $total > $maxTotal) {
         return false;
     }
     return true;
 }
开发者ID:flintdigital,项目名称:mage-mod-ar-po-emja,代码行数:28,代码来源:Popup.php

示例3: getConfigData

 public function getConfigData($field, $storeId = null)
 {
     $data = parent::getConfigData($field, $storeId);
     if ($data === null) {
         return $this->_getGeneralConfig($field, $storeId);
     } else {
         switch ($field) {
             case 'active':
                 return $data && $this->_isActive($storeId);
             default:
                 return $data;
         }
     }
 }
开发者ID:programmerrahul,项目名称:vastecom,代码行数:14,代码来源:Notsaved.php

示例4: getConfigData

 /**
  * @param string $field
  * @param int $storeId
  * @return mixed
  */
 public function getConfigData($field, $storeId = null)
 {
     if ($field == 'sort_order') {
         try {
             $data = $this->getConfigForQuote()->getSortOrder();
         } catch (Payone_Core_Exception_PaymentMethodConfigNotFound $e) {
             return 0;
         }
     } else {
         $data = parent::getConfigData($field, $storeId);
     }
     return $data;
 }
开发者ID:kirchbergerknorr,项目名称:Payone_Core,代码行数:18,代码来源:Abstract.php

示例5: getConfigData

 /**
  * @param string $field
  * @param null $storeId
  * @return mixed
  */
 public function getConfigData($field, $storeId = null)
 {
     if ($this->isValidIndex()) {
         if ($field === "min_order_total") {
             return $this->_api->methods[$this->_index]['amount']->minimum;
         }
         if ($field === "max_order_total") {
             return $this->_api->methods[$this->_index]['amount']->maximum;
         }
         if ($field === "sort_order") {
             return $this->_api->methods[$this->_index]['sort_order'];
         }
         if ($field === "title") {
             return Mage::helper('core')->__($this->_api->methods[$this->_index]['description']);
         }
     }
     if ($field === "active") {
         return $this->_isAvailable();
     }
     if ($field === "title") {
         return Mage::helper('core')->__('{Reserved}');
     }
     return parent::getConfigData($field, $storeId);
 }
开发者ID:TimVroom,项目名称:MollieMagento,代码行数:29,代码来源:Api.php

示例6: _processApproved

 /**
  * Handle Approved answer
  *
  * @throws Exception
  */
 protected function _processApproved()
 {
     $state = $this->_paymentMethod->getConfigData('after_pay_status');
     $this->_order->setStatus($state)->addStatusHistoryComment('WayForPay returned an Approved status.');
     $this->_order->save();
 }
开发者ID:alexkuk,项目名称:Magento,代码行数:11,代码来源:ResponseProcessor.php


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