2016-06-24 7 views
2

私はカスタム決済ゲートウェイを作成しましたが、発注しようとするとキャプチャ機能と承認機能が起動しません。私はここで欠けているものを訴えません。ここに私の支払いモデルのコードは次のとおりです。権限とキャプチャ機能が発射されないmagentoカスタム決済ゲートウェイ

class RD_Echeck_Model_Paymentmethod extends Mage_Payment_Model_Method_Abstract { 
    protected $_code = 'echeck'; 
    protected $_formBlockType = 'echeck/form_echeck'; 
    protected $_infoBlockType = 'echeck/info_echeck'; 
    protected $_canAuthorize = true; 
    protected $_canCapture = true; 
    protected $_canRefund = false; 


public function authorize(Varien_Object $payment, $amount) 
{ 
    echo 'sa';die; 
    Mage::log('** Capturing **'); 
    // Third-party API stuff would go here, with exceptions being thrown if the gateway determines they've provided an invalid card, etc. 
} 

public function capture(Varien_Object $payment, $amount) 
{ 
    echo 'sa';die; 
    Mage::log('** Capturing **'); 
    // Third-party API stuff would go here, with exceptions being thrown if the gateway determines they've provided an invalid card, etc. 
} 

} 

マイXMLの支払い設定:

<default> 
    <payment> 
     <echeck> 
     <active>1</active> 
     <model>echeck/paymentmethod</model> 
     <order_status>pending</order_status> 
     <title>TheEcheck</title> 
     <allowspecific>0</allowspecific> 
     <payment_action>sale</payment_action> 
     </echeck> 
    </payment> 
    </default> 

答えて

0

私は私の設定ファイルを変更した、すべてが今も元気そうです。私は、payment_actionをauthorizeとして追加しました。

<default> 
    <payment> 
     <echeck> 
     <active>1</active> 
     <model>echeck/echeck</model> 
     <order_status>processing</order_status> 
     <payment_action>authorize</payment_action> 
     <title>TheEcheck</title> 
     <currency>USD</currency> 
     <allowspecific>0</allowspecific> 
     </echeck> 
    </payment> 
    </default> 
関連する問題