31,034
edits
Tag: 2017 source edit |
Tag: 2017 source edit |
||
| Line 46: | Line 46: | ||
The parameter are used by the page to find the amount to ask for the payment from the object retrieved in URL | The parameter are used by the page to find the amount to ask for the payment from the object retrieved in URL. | ||
To | 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'''. | ||
array(' | <syntaxHighlight> | ||
$hookmanager->resarray = array('mypaymentcode => 'valid'); | |||
</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 | |||
<syntaxHighlight> | |||
array('mypaymentcode' => 'MyPaymentMode') | |||
</syntaxHighlight> | |||
If you want you can also implement the hook '''checkStatus''' to retrieve information from your payment platform to show information on the payment page. | If you want you can also implement the hook '''checkStatus''' to retrieve information from your payment platform to show information on the payment page. | ||