Difference between revisions of "Template:CreditLine Programming Rules"

From Payment Processing Software Library
Jump to: navigation, search
Line 9: Line 9:
 
4. The '''server name''' should match what's showing on the title bar of the credit server program.
 
4. The '''server name''' should match what's showing on the title bar of the credit server program.
  
5. If using the [[CreditLine Multiple Merchant Setup]], you must call clcSetMerchantIndex before every Auth, Edit, Sale, Batch and other transaction related calls. '''The merchant index is reset to 0 on every call completion.'''
+
5. If using the [[CreditLine Multiple Merchant Account Setup]], you must call clcSetMerchantIndex before every Auth, Edit, Sale, Batch and other transaction related calls. '''The merchant index is reset to 0 on every call completion.'''
  
 
6. 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.
 
6. 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.

Revision as of 14:39, 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.

4. The server name should match what's showing on the title bar of the credit server program.

5. If using the CreditLine Multiple Merchant Account Setup, you must call clcSetMerchantIndex before every Auth, Edit, Sale, Batch and other transaction related calls. The merchant index is reset to 0 on every call completion.

6. 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.

7. Avoid redundant and inefficient code. Obscure and hard to debug errors may hide in such 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.