Location and Naming Convention

For a new plugin the following location conventions should be used:

  • Each plug-in is deployed in its own folder in the document root. Document root path is /var/www/pa-exchange-rate-sdk.
  • Each folder must have the same name as the plugin script name. For example, "OpenExchangeRates" plugin path must be $(DOCUMENT_ROOT)/OpenExchangeRates/OpenExchangeRates.php.
  • The plugin 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.strings for English or ru.strings for Russian)
    • The file must contain all language-specific strings for the given language; each string should start from the new line.
    • The structure of each string must be: "<key>" "<translation>" (for example, "app_id" "App ID")

    For example, the OpenExchangeRates/i18n/en.strings localization file for the OpenExchangeRates plugin can have following contents:

    "rate_provider_name" "Open Exchange Rates""app_id" "App ID"
  • Any other files used by the plugin can be placed into the plug-in directory.

  • The plug-in script file must implement all necessary methods using the following notation: $(PLUGIN_NAME)_$(METHOD_NAME). For example, the TestConnection method must have the following signature in the OpenExchangeRates .php script file:

    function OpenExchangeRates_TestConnection($parameters)
CloudBlue, an Ingram Micro business, uses cookies to improve the usability of our site. By continuing to use this site and/or logging in you are accepting the use of these cookies. For more information, visit our Privacy Policy.