本文整理汇总了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;
}
示例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;
}
示例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;
}
}
}
示例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;
}
示例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);
}
示例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();
}