Online Payment Module Architecture: Difference between revisions

m
Tag: 2017 source edit
Tag: 2017 source edit
Line 51: Line 51:
</syntaxhighlight>
</syntaxhighlight>


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  
If you built a module that declares this is its module descriptor, then the '''/public/payment/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 the button')
$this->resarray = array('mypaymentcode' => 'MyPaymentMode Label on the button')