Changes

m
Line 49: Line 49:     
Then the page search the list of all available payment mode by calling getValidOnlinePaymentMethods(). To complete this list to add your own module, you must implement the hook '''getValidPayment''' of the context '''nexpayment'''.
 
Then the page search the list of all available payment mode by calling getValidOnlinePaymentMethods(). To complete this list to add your own module, you must implement the hook '''getValidPayment''' of the context '''nexpayment'''.
<syntaxHighlight>
+
<syntaxHighlight lang="php">
 
$hookmanager->resarray = array('mypaymentcode => 'valid');
 
$hookmanager->resarray = array('mypaymentcode => 'valid');
 
</syntaxHighlight>
 
</syntaxHighlight>
    
Then for each entry found the page suggest the payment mode as a different button "Pay using MyPaymentMode". To output HTML code of your button, you must use the hook '''doAddButton''' for the context "newpayment". Your hook must return an  
 
Then for each entry found the page suggest the payment mode as a different button "Pay using MyPaymentMode". To output HTML code of your button, you must use the hook '''doAddButton''' for the context "newpayment". Your hook must return an  
<syntaxHighlight>
+
<syntaxHighlight lang="php">
 
$this->resarray = array('mypaymentcode' => 'MyPaymentMode Label on Button')
 
$this->resarray = array('mypaymentcode' => 'MyPaymentMode Label on Button')
 
</syntaxHighlight>
 
</syntaxHighlight>