Online Payment Module Architecture: Difference between revisions

m
Tag: 2017 source edit
Tag: 2017 source edit
Line 51: Line 51:
</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  
If you built a module that declares this is its module descriptor, then the newpayment.php page will suggest the payment mode as a different button "Pay using MyPaymentMode". To output the HTML code of your button, you must use the hook '''doAddButton''' for the context "newpayment". Your hook must return such an array
<syntaxhighlight lang="PHP">
<syntaxhighlight lang="PHP">
$this->resarray = array('mypaymentcode' => 'MyPaymentMode Label on Button')
$this->resarray = array('mypaymentcode' => 'MyPaymentMode Label on the button')
</syntaxhighlight>
</syntaxhighlight>