本文整理汇总了PHP中Mage_Sales_Model_Order_Payment_Transaction::getOrderPaymentObject方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Sales_Model_Order_Payment_Transaction::getOrderPaymentObject方法的具体用法?PHP Mage_Sales_Model_Order_Payment_Transaction::getOrderPaymentObject怎么用?PHP Mage_Sales_Model_Order_Payment_Transaction::getOrderPaymentObject使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mage_Sales_Model_Order_Payment_Transaction
的用法示例。
在下文中一共展示了Mage_Sales_Model_Order_Payment_Transaction::getOrderPaymentObject方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Add control buttons
*
*/
public function __construct()
{
parent::__construct();
$this->_txn = Mage::registry('current_transaction');
$backUrl = $this->_txn->getOrderUrl() ? $this->_txn->getOrderUrl() : $this->getUrl('*/*/');
$this->_addButton('back', array('label' => Mage::helper('sales')->__('Back'), 'onclick' => "setLocation('{$backUrl}')", 'class' => 'back'));
if (Mage::getSingleton('admin/session')->isAllowed('sales/transactions/fetch') && $this->_txn->getOrderPaymentObject()->getMethodInstance()->canFetchTransactionInfo()) {
$fetchUrl = $this->getUrl('*/*/fetch', array('_current' => true));
$this->_addButton('fetch', array('label' => Mage::helper('sales')->__('Fetch'), 'onclick' => "setLocation('{$fetchUrl}')", 'class' => 'button'));
}
}
示例2: _construct
/**
* Add control buttons
*
*/
protected function _construct()
{
parent::_construct();
$this->_txn = Mage::registry('current_transaction');
if (!$this->_txn) {
return;
}
$backUrl = $this->_txn->getOrderUrl() ? $this->_txn->getOrderUrl() : $this->getUrl('*/*/');
$this->_addButton('back', array('label' => Mage::helper('Mage_Sales_Helper_Data')->__('Back'), 'onclick' => "setLocation('{$backUrl}')", 'class' => 'back'));
if (Mage::getSingleton('Mage_Core_Model_Authorization')->isAllowed('Mage_Sales::transactions_fetch') && $this->_txn->getOrderPaymentObject()->getMethodInstance()->canFetchTransactionInfo()) {
$fetchUrl = $this->getUrl('*/*/fetch', array('_current' => true));
$this->_addButton('fetch', array('label' => Mage::helper('Mage_Sales_Helper_Data')->__('Fetch'), 'onclick' => "setLocation('{$fetchUrl}')", 'class' => 'button'));
}
}