Download Miva Merchant 9 Module API Reference Guide

Transcript
Chapter 3: Module API
Payment Settings Screen Feature (vis_payment)
Return Value
1 if validation is successful
0 if validation is not successful
Payment Settings Screen Feature (vis_payment)
Modules that implement this feature provide one or more tabs on the Payment Settings screen.
The vis_payment feature includes the following functions:
•
•
•
•
•
Module_Payment_Content
Module_Payment_Head
Module_Payment_Tabs
Module_Payment_Update
Module_Payment_Validate
Module_Payment_Content
This function renders content for visible tabs or hides state information for invisible tabs. If tab is
the code of one of the module’s tabs, the module should render whatever HTML content is required
for that specific tab. For all other tabs (or for all tabs if tab is not one of the module’s tabs), the
module should use hidden HTML <input> fields to maintain whatever state information is required
when a tab is not visible. Typically, this would involve creating hidden input fields for each HTML
form field which normally appears on an invisible tab. If load_fields is true, the module should
initialize all fields to a default value or current values for fields provided on all tabs.
Syntax
Module_Payment_Content ( module var, tab, load_fields )
Parameters
module
The Module record of the current module
tab
The code of the currently visible tab
load_fields
1 if the module should initialize its state,
0 if the module should expect the state to be present
Return Value
1 on success
0 on error
Note: Error messages should be reported via the Error function.
212