Creating Merchant Gateway Package

To create an H-Sphere package file (.hsp), you have to:

  1. Unpack Merchant Gateway SDK into the merchgateway-sdk directory.
  2. Modify Deployment Descriptor (merchgateway-sdk/gateway/main.xml)
  3. Go to the merchgateway-sdk directory and run the "ant stub" command. SDK will generate java class in the merchgateway-sdk/gateway/src directory and merchgateway-sdk/gateway/etc/test-data.in file for testing purposes.
  4. Modify previously generated java class according to your merchant gateway developer documentation. When your java source is ready, you need to compile this class. Go to the merchgateway-sdk directory and run the "ant compile" command. SDK will compile your java class into the merchgateway-sdk/gateway/build/ directory.
  5. Create language files for your merchant gateway, and place them into the lang-files/ directory
  6. Run the "ant package" command. SDK will create all templates and package files for your gateway in the merchgateway-sdk/[YourGatewayName]/package_name-version-build.hsp bundle.

    If you run "ant" command without any arguments, SDK will compile all classes. If successful, it will execute junit tests. If all tests are also successful, it will start the packaging process. At the end, you should see the package_name-version-build.hsp file in the Merchant Gateway SDK base directory. The build number will be automatically incremented after each build. You can reset it by modifying the build.number file.

    Also, you can run set of test transactions by running the "ant test" command after the merchant gateway java class is compiled.