Using PERL API's. A Development and Implementation Guideline for

This document is to assist developers in creating Perl Web applications that utilise the NetRegistry Payment Gateway (NPG). TheMerchant is a product offered by NetRegistry that provides access to the NPG.

Contents

  1. Requirements
  2. Synopsis
  3. Preparation

Web applications that utilise the NetRegistry Payment Gateway require the following:

  1. An eCommerce Merchant facility .

  2. This facility enables payment from Credit Cards. All merchant facilities for the NPG must be with the National Australia Bank or St George
  3. A compatible eCommerce Hosting account, such as TheMerchant.

  4. Access through this API is only available to Website customers of NetRegistry and customers of participating Web Hosting Companies and ISPs.
  5. Local development resources.

  6. For security reasons no telnet, ssh, or other console mode access is allowed to our Web servers. In order to develop and debug you will need access to local (i.e.: your own) resources. These should include a cgi capable Web server, a UNIX or UNIX like operating system, and Perl 5.005 or greater.
    While it is possible to develop on a win32 platform ( 9x, NT, Win2K ), this is not recommended as it requires MUCH greater modification to the scripts to run them on the server. Due to the current state of MacPerl, development on the Mac platform is also not recommended.

Synopsis

The development process will usually consist of four stages, preparation, program creation, porting and testing, activation.

  • Preparation

  • Collecting the resources you will need to create the program
  • Program Creation

  • Actually programming or application, or conversion of existing application
  • Porting and Testing

  • The process of moving the application from your local development server to our production Web server, modifications to connect all required resources, and thorough testing of the application
  • Activation

  • This step involves technical verification and a quick security check of the application by NetRegistry Tech Support, freeze of the code, and activation of the account.

Preparation

Thorough preparation will make development, testing and activation a lot easier.

Account status
While at this point you do not need your NAB merchant facility, or your NetRegistry eCommerce Hosting account, it is a good idea to be sure that you have an understanding that everything you plan to do will be compatible with the NetRegistry servers, and that you are confident that the NAB or St George Bank will approve your eCommerce Merchant facility request.

Module and Library Availability
Many people use downloaded CPAN modules in their code that do not come in the Perl core distribution. NetRegistry are happy to install common modules on request, however these are approved on a case by case basis. If you plan to use any custom modules, please contact NetRegistry Tech Support to see if any special modules you need are installed or can be installed. By default, the server will already include modules such as DBI and the DBD drivers for any databases you get as part of your hosting package.

Development server file structure.
One factor that can make the transferral of an application more difficult is that the underlying filesystem structure may change. This is a particular issue with Apache, the most commonly used development Web server platform. The difference between the two filesystems is shown below
 

Apache Directory Structure Zeus Directory Structure

Note that the Apache directory structure has the root html and cgi-bin directories side by side, whereas the Zeus directory structure has the cgi-bin directory underneath the main html directory.

In order to overcome this, we recommend modifying the directory structure of apache to the following.
 

Modified Apache
Directory Structure

Making this change will ensure that you have no file system structure problems when moving your Website from an Apache style Web server to Zeus.

Perl Version
The version of perl running on the server is 5.005_03. It is preferable that this version of Perl be used when developing. You should not rely on any of the new features of 5.005_04 or above. The use of the 03 revision is not essential. For most purposes if is possible to use any 03 or lower 5.005 series. We do not recommend going below 5.005, however 5.004 may suffice in some circumstances. Any version 5.003 or lower will not be supported, and you are advised that prior to 5.004 perl 5 is considered unstable. Perl 4 is not supported. To find out what version of perl you have, type perl -v.

Related topics

© 1997- 2008 Netregistry Pty Ltd