Location and Naming Convention
For a new plugin, the following location conventions must be used:
-
Each plugin is deployed in its own folder in the document root. The document root path is
/var/www/pa-payment-sdk
. -
Each folder must have the same name as the plug-in script name. For example, the PayPal plug-in path must be
$(DOCUMENT_ROOT)/PayPal/PayPal.php
. -
The plug-in directory may contain an internationalization directory
$(PLUGIN_NAME)/i18n
that contains a set of files with language specific strings (case-sensitive):-
The file name must be:
<two-letter language code>.strings
(for example,en.string
for English, orru.string
for Russian). -
The file must contain all language-specific strings for the given language; each string must start from the new line.
-
The structure of each string must be: "
<key>
" "<translation>
" (for example,"unknown_error" "Unknown payment error. Check logs for more information."
).
-
-
Any other files used by the plugin can be placed into the plug-in directory.
-
The plug-in script file must implement all methods using the following notation:
$(PLUGIN_NAME)_$(METHOD_NAME)
. For example, the TestConnection method must have the following signature in thePayPal.php
script file:Copyfunction PayPal_TestConnection($params)