Online Payment Module Architecture: Difference between revisions

Jump to navigation Jump to search
m
Tag: 2017 source edit
Tag: 2017 source edit
Line 45: Line 45:
The parameter are used by the page to find the amount to ask for the payment from the object information retrieved in URL.  
The parameter are used by the page to find the amount to ask for the payment from the object information retrieved in URL.  


Then the page search the list of all available payment modes by calling '''getValidOnlinePaymentMethods()'''. Any payment module must first complete this list with its own ID. For this, the module must implement the hook '''getValidOnlinePaymentMethods''' of the context '''nexpayment'''.
Then the page search the list of all available payment modes by calling '''getValidOnlinePaymentMethods()'''. Any payment module must first complete this list with its own ID. For this, the module must implement the hook '''getValidOnlinePaymentMethods''' of the context '''newpayment'''.  
This means you must declare this in your module descriptor (See the page [[Module development]] for more information on how to make a new module):
<syntaxhighlight lang="PHP">
<syntaxhighlight lang="PHP">
$hookmanager->resarray = array('mypaymentcode => 'valid');
$hookmanager->resarray = array('mypaymentcode => 'valid');

Navigation menu