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 mode by calling getValidOnlinePaymentMethods(). To complete this list to add your own module, you must implement the hook '''getValidPayment''' 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 '''nexpayment'''.
<syntaxhighlight lang="PHP">
<syntaxhighlight lang="PHP">
$hookmanager->resarray = array('mypaymentcode => 'valid');
$hookmanager->resarray = array('mypaymentcode => 'valid');

Navigation menu