The Descriptor File

H-Sphere Web Payment Processor SDK uses main.xml as the descriptor to specify components of the Web Payment Processor package. All tags and attributes are case sensitive.

processor

The processor tag encloses all other tags in the file:
Tag Description Required
name The name of the package. This must be a short one-word name with no spaces or special characters, because it will be used as a filename.
Example: iBill
Yes
info Brief information about the package. Currently not used. Yes
description The description of the package. It will show in the list of installed packages, therefore it must state that the package is a merchant gateway.
Example: iBill web payment processor
Yes
vendor The name of your company Yes
version Version of the package
Example: 1.2
Yes
build Build of the package
Example: 1
Yes
title Identifies web payment processor among others in the list of web payment processors in H-Sphere. Also shows as the title of the web payment processor configuration page. Should be brief, but can consist of several words.
Example: iBill web payment processor
Yes
class The name and package of the class that will be generated.
Example: com.ibill.IBill
Yes
form The form tag contains the list of parameters defined by merchants. These parameters will correspond to the input fields of the web payment processor configuration form in the H-Sphere admin panel. Yes
classes Specifies the location of merchant gateway classes. By default, it's set to build Yes
lang Language files. No

 

form

The form tag describes the input form for web payment processor settings in the admin panel. Each field tag corresponds to an input element in the form, like server, port, login, password, etc. The field tag has the following attributes:

Attribute Description Required
name Field name - corresponds to the name attribute of the HTML input Yes
label Text label to the HTML input. Labels must be defined in the language files, and here, the value of the label attribute is the label identifier from the lang file.
Example: admin.epayment.port
Yes
type Type of the field - corresponds to the type attribute of the HTML input. At present, only text and password types are supported. Yes
default Sets the default value of the input field in HTML No
defaultLang Default value of the field is defined in the lang file. This attribute is checked only if the default attribute is not set.
Example: admin.epayment.mygateway
No
check YAFV constraint for client-side input validation in HTML form No

 

lang

lang tag defines language files. The following tags are used within the lang tag to define different language files:

Tag Description Required
template The language file for templates. The file is defined in H-Sphere as hsphere_lang.properties No
user The language file for Java classes. The file is defined in H-Sphere as messages.properties No
menu The language file for menus. The file is defined in H-Sphere as menu.properties. No

You must specify the full path to lang files! Each of those tags can have the encoding attribute to define the encoding for the given lang file. You can have multiple tags of each type, as long as encodings are different. Encodings can be like en_US or ru_RU, etc... If no encoding is specified, the file will be used as the "default" encoding (no encoding will be appended to its name in the package).