Online Payment Module Architecture: Difference between revisions

m
Tag: 2017 source edit
Tag: 2017 source edit
Line 46: Line 46:


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'''.  
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):
This means you must declare this in your module descriptor (See the page [[Module development]] for more information on how to make a new virgin module with its module descriptor file):
<syntaxhighlight lang="PHP">
<syntaxhighlight lang="PHP">
$hookmanager->resarray = array('mypaymentcode' => 'valid');
$hookmanager->resarray = array('mypaymentcode' => 'valid');