Difference between revisions of "Template:CreditLine Programming Rules"

From Payment Processing Software Library
Jump to: navigation, search
Line 4: Line 4:
 
can have multiple instances to make multiple requests.
 
can have multiple instances to make multiple requests.
  
3. Each instance needs to have a '''unique client name'''. For example,  
+
3. Each instance needs to have a '''unique client name''' or terminal name. For example,  
instance 1 gets TERM001, and instance 2 gets TERM002.
+
instance 1 gets TERM001, and instance 2 gets TERM002.  The best way to configure this is by device.  The length limit is 7. The server monitors the names for duplication and will do it's own name resolution in case of duplicate client names.  The server name should match what's showing on the title bar of the credit server program.
  
 
4. Some environments, such as VB.NET may loose the automation reference if the same API is called twice too quickly. Avoid calling the same API in '''tight loops''' - add a reasonable delay if needed.
 
4. Some environments, such as VB.NET may loose the automation reference if the same API is called twice too quickly. Avoid calling the same API in '''tight loops''' - add a reasonable delay if needed.
  
 
5. Avoid '''redundant''' and '''inefficient''' code.
 
5. Avoid '''redundant''' and '''inefficient''' code.
 +
 +
 +
The server name should match what's showing on the title bar of the
 +
credit server program.
 +
We had a NETBIOS interface before, so they must match.  However, the
 +
file API is not that strict.  However, it is a good practice to match
 +
them, in case we implement multi-servers that monitor the same message
 +
directory.

Revision as of 02:37, 27 April 2007

1. Each instance needs to call the initialization function (such as clcInit or Init) themselves and get a unique handle to themselves. This handle can not be shared.

2. Each instance can only make one request at a time, but one process can have multiple instances to make multiple requests.

3. Each instance needs to have a unique client name or terminal name. For example, instance 1 gets TERM001, and instance 2 gets TERM002. The best way to configure this is by device. The length limit is 7. The server monitors the names for duplication and will do it's own name resolution in case of duplicate client names. The server name should match what's showing on the title bar of the credit server program.

4. Some environments, such as VB.NET may loose the automation reference if the same API is called twice too quickly. Avoid calling the same API in tight loops - add a reasonable delay if needed.

5. Avoid redundant and inefficient code.


The server name should match what's showing on the title bar of the credit server program. We had a NETBIOS interface before, so they must match. However, the file API is not that strict. However, it is a good practice to match them, in case we implement multi-servers that monitor the same message directory.