|
|
External API - Development and Implementation Guideline for integration with our eCommerce payment gatewayThis document is to assist developers in creating web applications that utilise the Netregistry Payment Gateway (NPG) where the application will be written in a language, other than Perl, such as PHP or C, or where the developer is not hosting the website on Netregistry's servers. RequirementsIn order to create an application as detailed below, you will need
SynopsisUnlike the native Perl API, external access is treated on an account basis. The only service provided by Netregistry is in the form of an access account. Access to the account is the responsibility of the developer. The account consists of access to a generic CGI program that serves as an interface between the gateway and an arbitrary program on your, or our server. From this point, this document will deal with on-site and off-site options separately. Off SiteThe process for off-site accounts is quite simple. To begin, you will need an eCommerce Merchant facility. This will get you a merchant number and a terminal ID. If you plan to put through a reasonably large number of transactions ( 100 per day or higher ) we recommend having two terminal IDs. If you plan to put through more than 1000-2000 transactions per day or higher, we recommend you have three to four terminal IDs. Once your eCommerce Merchant number and terminal IDs have been provided to Netregistry, you will be allocated an MID ( Netregistry Merchant ID ). You will also be provided with two passwords. The first is your log password. This is used to access the log viewer. Using the log viewer, you are able to see all transaction attempts made with the bank. The log view also generates daily and monthly statistics for your account. The second password is known as your Account Access Password. This is a long random 16 digit alphanumeric number. This number should be strictly guarded, as it would enable an outside party to generate false credit card request to your account. A Note on Security and ResponsibilityThe responsibility for security of credit card details has defined beginning and end points. You, the developer, are responsible for security from the browser to your server, and from there to Netregistry's External Access Server. Your responsibility ends once the data has reached the EAS. A Note on GET vs POSTWhichever application language you are using we HIGHLY recommend you use POST instead of GET. There has been some evidence that GETs will cause responses to cache in some situations, and instead of repeating the attempt at the same transaction, the result from the previous attempt will be used instead. Hence, you should always use POST. On SiteOn site "external" access works similarly to off site access described above, except there will be the extra step of porting your application to our servers. SynopsisThe development process will usually consist of four stages, preparation, program creation, porting and testing and activation.
FinalThorough preparation will make development, testing and activation far simpler. Account statusFor the external API, there is no generic test account available for you to use. This means that you will need your Netregistry Account, and have been issued with your Account Access Password before you can write and test that section of your program. Testing can only be performed using your own account. Server SupportYou are advised to check with Netregistry before commencing development to ensure that everything you wish to do can be supported by the servers. For example, because the servers support the Frontpage extensions, they do not support ACCESS databases, even though accessing ACCESS databases is a part of the use of Frontpage extensions. Please ensure all modules, libraries etc can be used. If you are using an Apache module for the development, please check to ensure that an equivalent process exists for Zeus. Also, make sure that version compatibility exists as well, so that language changes will not cause a problem. The technical staff at Netregistry can advise you on which technologies you can or cannot use. Development server file structure.One factor that can make the transferal 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
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.
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. Program CreationThis section provides a general guide to the creation of your application. For specific commands, syntax, and response types. Your properly created application will make the call to the gateway in six stages Stage 1 - Acquire Input Data Stage 2 - Data Validation Stage 3 - Processing Function Call Stage 4 - Handling the response Depending on the response, your application should act on the approval rejection, or failure. Sufficient response handling is a requirement for application approval by Netregistry. Stage 5 - Actions after processing
A Note on testing during development Porting and TestingOnce you are satisfied with the state of your application on your local development server, it is time to migrate the program over to Netregistry. Porting Issues Final Testing Related topics |