这是我的销售订单查看/ app / local / Mage / Adminhtml / Block / Sales / Order
/* UPDATE INCLUDED BY DRAGONPAY PAYMENT MODULE - START */
/**
* This button is added for DragonPay for QUERY API button for manual checking of payment result
*/
if($order->getPayment()->getMethodInstance()->getCode() == 'dragonpay'){
$message = 'Query the Payment Gateway To Check If Any Payments Made?';
$url = Mage::helper('adminhtml')->getUrl('dragonpay/adminhtml_dragonpayapi/query/',array('order_id'=>$order->getId()));
$this->addButton('dragonpayapi_query', array(
'label' => '[--DRAGONPAY:Get payment status--]',
'onclick' => "confirmSetLocation('{$message}', '{$url}')",
));
}
/* UPDATE INCLUDED BY DRAGONPAY PAYMENT MODULE - END */
这是我的管理员端口支付控制器,位于
app/code/local/Namespace/modulename/controllers/Adminhtml/
<?php
/**
* Admindragonpay Controller
*
*/
class PixelPlusOne_Dragonpay_Adminhtml_DragonpayAPIController extends Mage_Adminhtml_Controller_Action{
public function indexAction(){
echo "hello";
}
}
But when i click the button on my Order View i am not redirected to my controller any help is appreciated
这是我的销售订单视图
答案 0 :(得分:0)
这是我的config.xml
<?xml version="1.0"?>
<config>
<modules>
<PixelPlusOne_DragonPay>
<version>1.0.0</version>
</PixelPlusOne_DragonPay>>
</modules>
<global>
<models>
<dragonpay>
<class>PixelPlusOne_DragonPay_Model</class>
</dragonpay>
</models>
<helpers>
<dragonpay>
<class>PixelPlusOne_DragonPay_Helper</class>
</dragonpay>
</helpers>
<blocks>
<dragonpay>
<class>PixelPlusOne_DragonPay_Block</class>
</dragonpay>
</blocks>
</global>
<default>
<payment>
<dragonpay>
<model>dragonpay/standard</model>
<active>1</active>
<order_status>pending</order_status>
<title>Dragon Pay</title>
<payment_action>sale</payment_action>
<allowspecific>0</allowspecific>
<sort_order>1</sort_order>
</dragonpay>
</payment>
</default>
<admin>
<routers>
<adminhtml>
<args>
<modules>
<PixelPlusOne_DragonPay after="Mage_Adminhtml">PixelPlusOne_DragonPay_Adminhtml
</PixelPlusOne_DragonPay>
</modules>
</args>
</adminhtml>
</routers>
</admin>
<frontend>
<routers>
<dragonpay>
<use>standard</use>
<args>
<module>PixelPlusOne_DragonPay</module>
<frontName>dragonpay</frontName>
</args>
</dragonpay>
</routers>
</frontend>
</config>