Difference between revisions of "CreditLine DLL API Integration"
(→'''Credit Card Storage''') |
|||
(138 intermediate revisions by the same user not shown) | |||
Line 8: | Line 8: | ||
1) The interface header file '''<font color="#800000">CLCAPIW.h</font> '''located in '''911\BIN''' directory. This header contains the '''ENTIRE''' listing of available API. | 1) The interface header file '''<font color="#800000">CLCAPIW.h</font> '''located in '''911\BIN''' directory. This header contains the '''ENTIRE''' listing of available API. | ||
− | 2) The library file <font color="#800000">'''CLCAPIW2.DLL'''</font>located in '''911\ | + | 2) The library file <font color="#800000">'''CLCAPIW2.DLL'''</font>located in '''911\BIN''' directory. |
=Important Programming Rules= | =Important Programming Rules= | ||
Line 14: | Line 14: | ||
=Language Specific Instructions= | =Language Specific Instructions= | ||
− | + | {{DLL Language Specific}} | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
=Diagnostic API= | =Diagnostic API= | ||
Line 34: | Line 22: | ||
=Server Control= | =Server Control= | ||
− | clcSetTimeout → Timeout in | + | clcSetTimeout → Timeout in seconds between the POS and the credit card server. |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | |||
− | + | = Handling Track Data = | |
− | + | {{Track_Usage}} | |
− | = | + | =Credit Card Security Data (AVS, CVV2)= |
+ | Incorrect AVS or CVV data will not cause a decline unless the processor supports such functionality and you have enabled it in the software. | ||
− | |||
− | + | To enable the AVS and/or CVV decline feature, uncomment (remove the leading ';') the following settings in the '''[[CreditLine Advanced Setup]] file''': | |
− | + | ==Decline on Bad AVS== | |
+ | <nowiki>;Declines an approved transaction if the AVS result is bad.</nowiki><br> | ||
+ | <nowiki>;Values: YES=Declines if bad AVS, NO=Uses the processor result</nowiki><br> | ||
+ | <nowiki>;Default: NO</nowiki><br> | ||
+ | '''<nowiki>;ForceDeclineForBadAVSResult=YES</nowiki><br>''' | ||
− | + | ===Decline on Bad CVV2=== | |
+ | <nowiki>;Declines an approved transaction if the CVV2 result is bad.</nowiki><br> | ||
+ | <nowiki>;Values: YES=Declines if bad CVC, NO=Uses the processor result</nowiki><br> | ||
+ | <nowiki>;Default: NO</nowiki><br> | ||
+ | '''<nowiki>;ForceDeclineForBadCVCResult=YES</nowiki><br>''' | ||
− | + | If you do not find the lines above in your '''[[CreditLine Advanced Setup]] file''', add them yourself to the [911_ccv] section. | |
− | |||
− | + | =Prepaid Cards= | |
+ | See [[Prepaid Card Guide]]. | ||
+ | =PCI Tokenization and Encapsulation Functions= | ||
+ | {{PCI Exempt API Intro}} | ||
+ | For more info, please see '''[[PCI Friendly API]]'''. | ||
− | = | + | = Rush Approval Mode = |
− | + | Rush Approval Mode is an optional transparent offline mode that allows POS to continue taking credit cards without delays during connectivity failures. | |
− | + | For more information see [[Rush Approval Mode]] article. Requires 3.03.14Alpha6+ | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | {{API Call Listing}} | |
=Advanced Setup= | =Advanced Setup= | ||
Line 373: | Line 67: | ||
=Troubleshooting= | =Troubleshooting= | ||
+ | *[[CreditLine Test Mode]] | ||
*[[CreditLine_Troubleshooting#Logging|CreditLine Logging]] | *[[CreditLine_Troubleshooting#Logging|CreditLine Logging]] | ||
*[[CreditLine VITAL Test Account]] | *[[CreditLine VITAL Test Account]] |
Latest revision as of 19:09, 29 August 2016
This article is part of the Payment Processing Software Library |
|
Get it... | |
Install it... | |
Connect to it... | |
Set it up... | |
Learn to use it... | |
→ Manual & User Guide | |
Fix it... | |
→ Errors & Troubleshooting | |
Get Help... | |
More Info ... | |
See also... | |
CreditLine Payment Processing Software Integration. This site can also be reached at http://docs.911software.com
→ Looking for better rates? Get a Free Credit Card Processing Cost Comparison!
Contents
- 1 Inventory
- 2 Important Programming Rules
- 3 Language Specific Instructions
- 4 Diagnostic API
- 5 Server Control
- 6 Handling Track Data
- 7 Credit Card Security Data (AVS, CVV2)
- 8 Prepaid Cards
- 9 PCI Tokenization and Encapsulation Functions
- 10 Rush Approval Mode
- 11 Call Sequences
- 11.1 List of Functions
- 11.2 Rush Approval Mode
- 11.3 On Startup
- 11.4 On Shutdown
- 11.5 On Start Dial
- 11.6 On Regular Authorization
- 11.7 On Regular Force
- 11.8 On Regular Credit
- 11.9 On Add Tip
- 11.10 Edit Transaction
- 11.11 On Void Transaction
- 11.12 On Batch
- 11.13 On Debit Card Transaction
- 11.14 On Gift Card Transaction
- 11.15 On Loyalty Card Transaction
- 11.16 Hotel Specific
- 11.17 Find Transactions
- 11.18 Multiple Merchant Setup Info
- 12 Advanced Programming Notes
- 13 API Examples
- 14 Advanced Setup
- 15 Troubleshooting
- 16 Advanced Setup
- 17 Troubleshooting
This guide is for developers using the DLL
Inventory
To begin with, you will need the following:
1) The interface header file CLCAPIW.h located in 911\BIN directory. This header contains the ENTIRE listing of available API.
2) The library file CLCAPIW2.DLLlocated in 911\BIN directory.
Important Programming Rules
→ PLEASE, read every point below as those are the common points of failure in the integrations. Reviewing these pointers may save you significant amount of time in debugging.
- Compile for x86 / 32-bit. Do NOT compile for 64-bit even if the program will be used on a 64-bit OS.
- Each API object 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 across objects. However, SEE IMPORTANT WARNING BELOW about multiple object creation!
- Do NOT create a new object every time you call our API. This will create resource issues. The API object is meant to be created and shared by your application, unless you need to make multiple requests in parallel or creating multiple terminals to do the same - see below.
- Each instance can only make one request at a time, but one process can have multiple instances to make multiple requests.
- 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.
- 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.
- Some environments, such as VB.NET may lose 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.
- The dollar amounts have an implied decimal point. e.g. $2.00 should be submitted to our API as 200, not 2.00
- Since you will be calling a "black box" DLL, please avoid redundant and inefficient code. Obscure and hard to debug code may significantly extend your debugging efforts.
- Do take a look at our sample 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.
Language Specific Instructions
Visual Basic
- In VB you need to declare all the parameters using the ByVal prefix instead of ByRef. This includes the strings.
- If you would like to use an OCX instead for Visual Basic, you can use CLClient.ocx in the same directory. Another alternative is File Based Communication.
Public Declare Function clcInit Lib "CLCAPIW2.dll" (ByVal ClientName As String, ByVal ServerName As String As Integer)
C++
- The Header file is the regular WIN32 header file. The data type LONG is 32 bit.
- In C, the path has to be of format "C:\\911\\DATA", because back-slash is the escape char
DllImport("CLCAPIW2.dll", EntryPoint="clcInit", SetLastError=true, ExactSpelling=true, CallingConvention=CallingConvention.StdCall)
public static extern int clcInit(string ClientName, string ServerName);
.NET
- For .NET please use clcCs.dll and CLCAPIW2.dll from \911\BIN directory.
- Keep in mind that in C# and any .NET environment for instance, LONG is 64 bit so you have to use int or Integer not LONG ot Long in your definitions.
- The .NET interface is the same as C, with one exception: there is no clc prefix and you have to use an object.
→ Example: the call clcSetMerchantIndex(hObj, index)' is obj.setMerchantIndex(index).
Diagnostic API
- clcIsServerOnline → Recommended! Returns false if server is down
- clcShowInfo → After calling any set functions (e.g. clcSetAccountNumber), and before calling any transaction functions (e.g. clcSale), call this function to dump all the information that DLL has so far into the client side log file (911\data\ccv_log.txt). A good way to determine if the parameters are correct.
- clcTest → call for testing the function declarations if the POS is not in C
Server Control
clcSetTimeout → Timeout in seconds between the POS and the credit card server.
Handling Track Data
Track 2 is preferred over Track 1 since it is shorter and consistent. For Track 1 data, CreditLine Credit Card Software will convert the lower case letters to upper case. This is due to some processors not allowing lower case letters in their messages. In general, you should pass whatever you get from the card reader.
Credit Card Security Data (AVS, CVV2)
Incorrect AVS or CVV data will not cause a decline unless the processor supports such functionality and you have enabled it in the software.
To enable the AVS and/or CVV decline feature, uncomment (remove the leading ';') the following settings in the CreditLine Advanced Setup file:
Decline on Bad AVS
;Declines an approved transaction if the AVS result is bad.
;Values: YES=Declines if bad AVS, NO=Uses the processor result
;Default: NO
;ForceDeclineForBadAVSResult=YES
Decline on Bad CVV2
;Declines an approved transaction if the CVV2 result is bad.
;Values: YES=Declines if bad CVC, NO=Uses the processor result
;Default: NO
;ForceDeclineForBadCVCResult=YES
If you do not find the lines above in your CreditLine Advanced Setup file, add them yourself to the [911_ccv] section.
Prepaid Cards
See Prepaid Card Guide.
PCI Tokenization and Encapsulation Functions
There are three ways, in which CreditLine can help your application eliminate exposure to the payment info:
- Our application pops up a custom UI for accepting and processing credit cards, debit cards or gift cards, so that your application does not have to.
- Recurrent credit card data is accepted, stored and processed through our custom UI, as well.
- Tokenization UI API is used to reference credit card data that is stored and encrypted within CreditLine, instead of your POS.
This way your application can claim that no credit card data is being stored or processed.
- Important Notice: This program was called "PCI Exempt". We changed the name to reflect the new policies of the PCI Council. PCI Exempt used to be a convenient term that Point Of Sale developers use to refer to the practice of tokenization and external UI encapsulation. 911 Software does not have the authority to exempt any vendor from PCI requirements. Please, contact your independent PCI auditor for rules applicable to your situation.
For more info, please see PCI Friendly API.
Rush Approval Mode
Rush Approval Mode is an optional transparent offline mode that allows POS to continue taking credit cards without delays during connectivity failures. For more information see Rush Approval Mode article. Requires 3.03.14Alpha6+
Call Sequences
List of Functions
The full list of functions is found in \911\BIN\CLCAPIW.H file.
Rush Approval Mode
To process Stored Transactions online:
- clcGetRushApprovalTransIdString → returns a string containing all Rush Approval stored offline transaction IDs, stored under Rush Approval Mode, separated by commas. Call clcRealAuth for each one to process online (convert the id to integer)
- clcRealAuth → process Rush Approval stored offline transaction online (convert the id to integer). Call clcGetRushApprovalTransIdString to get a list of Rush Approval stored offline transaction IDs.
On Startup
- clcInit → Set the client name and server name for communications. See Important Programming Rules for more info.
- clcSetJournalDir → Set the directory where the credit card journal is, e.g. 911\DATA
- clcSetMessageDir → Set the directory where the file communications occur, e.g. C:\911\MESSAGES
NOTE: the directories are actual directories on the server (where the dll is installed)
- clcSetStationId → Set a unique number for the terminal
On Shutdown
- clcTerm Release the resources
On Start Dial
- clcSetMerchantIndex → Optional, use a different merchant than the default
- clcSetAccountNum → Set the card account number (for manual entry)
- clcSetTrackData → Set the scanned track data (for magnetic swipe)
- clcDial → Start to dial the processor, connect before sending the transaction
Note: do not call clcSetAccountNum after clcSetTrackData or the transaction will go through as type manual not scanned
On Regular Authorization
- clcSetMerchantIndex → Optional, use a different merchant than the default
- clcSetInvoiceId → Set the invoice number
- clcSetOperatorId → Set the operator number
- clcSetTableNum → Set the table number
- clcSetGuestCount → Set the guest count
- clcSetAccountNum → Set the card account number (for manual entry)
- clcSetExpDate → (format: MMYY). Set the expiration date (for manual entry)
- clcSetTrackData → Set the scanned track data (for magnetic swipe)
- clcSetAmount → Set the authorization amount ($20.01 is entered as 2001 )
- clcSetCVCNumber → Set the CVC Number
- clcSetAVSData → Set the AVS Data (e.g. Zip)
- clcAuth → Do the authorization, returns the Transaction Id if successful. Auths cannot be settled until Tip is added
- clcSale → Do the sale, returns the Transaction Id if successful
- clcGetAuthCode → Get the authorization code if successful
- clcGetErrText → Get the error text if failed
Note: do not call clcSetAccountNum after clcSetTrackData or the transaction will go through as type manual not scanned
On Regular Force
- clcSetMerchantIndex → Optional, use a different merchant than the default
- clcSetInvoiceId → Set the invoice number
- clcSetOperatorId → Set the operator number
- clcSetTableNum → Set the table number
- clcSetGuestCount → Set the guest count
- clcSetAccountNum → Set the card account number (for manual entry)
- clcSetExpDate → (format: MMYY). Set the expiration date (for manual entry)
- clcSetTrackData → Set the scanned track data (for magnetic swipe)
- clcSetAmount → Set the authorization amount
- clcSetAuthCode → Set the force auth code (acquired from the call center)
- clcSetCVCNumber → Set the CVC Number
- clcSetAVSData → Set the AVS Data (e.g. Zip)
- clcForce → Actual do the force, returns the Transaction Id if successful
On Regular Credit
- clcSetMerchantIndex → Optional, use a different merchant than the default
- clcSetInvoiceId → Set the invoice number
- clcSetOperatorId → Set the operator number
- clcSetTableNum → Set the table number
- clcSetGuestCount → Set the guest count
- clcSetAccountNum → Set the card account number (for manual entry)
- clcSetExpDate → Set the expiration date (for manual entry)
- clcSetTrackData → Set the scanned track data (for magnetic swipe)
- clcSetAmount → Set the authorization amount
- clcSetCVCNumber → Set the CVC Number
- clcSetAVSData → Set the AVS Data (e.g. Zip)
- clcSetAuthCode → Set the force auth code (acquired from the call center)
- clcCredit → Do the credit, returns the Transaction Id if successful
On Add Tip
- clcSetMerchantIndex → Optional, use a different merchant than the default
- clcAddTip → Add actual tip to the transaction, need the Transaction Id
Edit Transaction
- clcSetMerchantIndex → Optional, use a different merchant than the default
- clcEdit → Edit the transaction, need the Transaction Id. Will not finalize the transaction unless EditForceAuthToSale=YES in CreditLine Advanced Setup file. In case of upward amount adjustment an incremental auth may be sent to the processor (if supported).
On Void Transaction
- clcSetMerchantIndex → Optional, use a different merchant than the default
- clcVoid → Void the transaction, need the Transaction Id
On Batch
- clcSetMerchantIndex → Optional, use a different merchant than the default
- clcBatch → Batch
→ Note: batches longer than 400 will be broken up for reliability purpuses and sent automatically as sequential smaller batches of 400 or less. Call clcBatch BEFORE the batch to get the correct batch total. Otherwise, only the last segmented batch part total will be returned.
Batch Selected Transactions
- clcFindTransIdByInvoiceId → used to find the trans id by invoice id
- clcMarkSelected → mark transaction as selected or not
- clcBatch2 → batch selected transactions only (if bSelectedOnly set to true). The card type is the card type index present in the settlement configuration (see numbers in the left column under Index - e.g VISA = 0, AMEX = 2, if present, etc).
On Debit Card Transaction
- Get track data from the MSR.
- Get the account number from the track data
- Use the account number and the amount to call pinpadRequestEntry
- Call pinpadGetPINBlock to get the PIN Block
- Call pinpadGetDUKPTValue to get the DUKPT Value
- Call pinpadGetKeyPointer to get the Key Pointer
- Call pinpadShowDone to show "Thank You" on the pinpad
- Call the normal functions for a transaction, such as setTrackData, setAmount (Do not call setAccountNumber since it is for manual keyed transactions and Debit does not support manual entry)
- Call setPINBlock again to pass the PIN Block to the transaction buffer
- Call setDUKPTValue to pass the DUKPT Value to the transaction buffer
- Call setKeyPointer to pass the Key Pointer to the transaction buffer
- Call setCashBackAmount, setSurchargeAmount if there are any.
- Call sale to perform the debit transaction.
→ Note: debit only supports sale, refund and inquiry transactions.
- clcSetAccountType → for debit cards only. See definition in the clcapiw.h header file.
→ See Sample Code and Pin Pad Setup for more info
On Gift Card Transaction
To sell a Gift Card, the POS must first charge the client the Activation Amount by using another form of payment (such as credit card). Then activation is sent to the processor to record the sale of the gift card.
Use clcSetAccountNum and clcSetAmount to set the parameters.
→ Gift Card Vendors use various terminologies. See below for common mapping of terms.
- clcActivate → Issue. Optional, activate gift card. Returns 1 or 0 (ok=1)
- clcDeactivate → Cash out for both pre-valued and not pre-valued. Optional, deactivate gift card. Call 'clcGetAmount' for the amount to return to the customer. Returns 1 or 0 (ok=1)
- clcInquire → Optional, returns the balance on the gift card
- clcSale → Redemption. Do the gift card redemption, returns the Transaction Id if successful or 0 if not. You can use clcGetAuthCode to get an auth code.
- clcAuth → Do the auth, returns the Transaction Id if successful, or 0 if not. You can use clcGetAuthCode to get an auth code.
- clcAddTip → Do add tip/finalize, returns the Transaction Id if successful.
- clcCredit → Reload. Do the credit, returns the Transaction Id if successful
- clcVoid → Void the transaction, returns the Transaction Id if successful. Note: use voidTransaction for CLC COM interface
- clcGetAmount → Get actual amount approved - to be called after every action that affects the balance.
- clcGetTip → Get actual tip approved - to be called after every action that affects the balance
- clcGetBalanceAmount → Get remaining card balance
→ After every call, the client should use clcGetAmount() clcGetTip() to determine the true amount the gift card approves, e.g. for partial redemption. Also after every call, the balance of the card can be obtained by calling clcGetBalanceAmount().
On Loyalty Card Transaction
- clcSetAccountNum(strAccountNum); → Sets the account number
- clcSetAccountType(ACCTTYPE_LOYALTY); → Sets the account type
- cSetMoneyAmount(nTotalDollarAmount); → Sets the dollar amount
- clcSetUnits(nQuantity); → Sets number of units
- clcIssuance() → Adds points to the customer account based on the money spent.
- clcRedemption() → Deducts the points from the account to pay for the check.
- clcSetPromoCode(); → Optional. Used to issue points based on products. Promo code defined by the merchant affects the conversion of amount and units to points.
- clcSetSKU(strSKUDetailInfo) → Optional. Used to issue points based on products.
SKU Detail Info Format: SKU,price,quantity;SKU,price[,quantity] (quantity is set to 1, if omitted)
Example: "19999,19.99,3;20000,4.99;19999,19.99" means 3 x "19999,19.99" and 1 x "20000,4.99" and one more "19999,19.99"
- clcGetAmount() → Get points issued
- clcGetBalanceAmount() → Get total points on the account
See API Samples for more info.
Hotel Specific
- clcSetCheckInDate → Sets checkin date
- clcSetCheckOutDate → Sets checkout date
- clcSetRoomRate → Sets room rate
- clcSetCustomerLastName → Sets customer last name
- clcSetCustomerFirstName → Sets customer first name
- clcSetPaymentType → Disney room charges only
- clcSetGuestCount → Disney room charges only
Find Transactions
- clcFindTransIdByInvoiceId → used to find the trans id by invoice id
Multiple Merchant Setup Info
- clcGetMerchantListCount → returns how many merchant accounts are setup, or 0 if none
- clcGetMerchantListData → takes absolute index (range is 0 to total number, returned by clcGetMerchantListCount) and returns the merchant index handle. Used in clcGetMerchantInfo.
- clcGetMerchantInfo → takes merchant index handle obtained from clcGetMerchantListData, and returns merchant name and industry
Advanced Programming Notes
Card Type ID
Card Type used in clcGetCardType API can be obtained by looking at the Index number in front of the Card Type in the Configuration → Authorization Configuration: http://911software.com/credit_card_processing_software/index.php?title=CreditLine_Authorization_Configuration#Selecting_Accepted_Cards
API Examples
→ see Sample Code for more info
Dim hCC As Integer;
Dim nResult As Integer;
Dim nTransNum As Integer;
Dim nBalance As Integer;
'On Startup
' NOTE: client name has to be unique for every terminal
hCC = clcInit("TERM001", "CCVSVR1");
' NOTE: the directories are actual directories on the server
' (where the dll is installed). These are required.
clcSetJournalDir(hCC, "c:\911\data");
clcSetMessageDir(hCC, "c:\911\messages");
clcSetStationId(hCC, 1);
'On Shutdown
clcTerm(hCC);
'On Start Dial
clcSetMerchantIndex(hCC, 1); 'default is 0
clcSetAccountNum(hCC, "4111111111111111");
clcDial(hCC);
'On Regular Authorization
clcSetMerchantIndex(hCC, 1); 'default is 0
clcSetInvoiceId(hCC, 123);
clcSetOperatorId(hCC, 1);
clcSetTableNum(hCC, 10);
clcSetAccountNum(hCC, "4111111111111111");
clcSetExpDate2(hCC, 02, 12);
clcSetAmount(hCC, 100); '$1.00
' sales can be batched right away but auths need tip to be added to them before batching
nResult = clcAuth(hCC); ' or nResult = clcSale(hCC);
if (nResult > 0)
- nTransNum = clcGetTransId(hCC);
- clcCopyAuthCode(hCC, strAuthCode);
else
- clcCopyErrText(hCC, strErrText);
On Regular Force
clcSetMerchantIndex(hCC, 1); 'default is 0
clcSetInvoiceId(hCC, 123);
clcSetOperatorId(hCC, 1);
clcSetTableNum(hCC, 10);
clcSetAccountNum(hCC, "4111111111111111");
clcSetExpDate2(hCC, 02, 12);
clcSetAmount(hCC, 100); '$1.00
clcSetAuthCode(hCC, "123456");
nResult = clcForce(hCC);
if (nResult > 0)
- nTransNum = clcGetTransId(hCC);
- clcCopyAuthCode(hCC, strAuthCode);
else
- clcCopyErrText(hCC, strErrText);
'On Regular Credit
clcSetMerchantIndex(hCC, 1); 'default is 0
clcSetInvoiceId(hCC, 123);
clcSetOperatorId(hCC, 1);
clcSetTableNum(hCC, 10);
clcSetAccountNum(hCC, "4111111111111111");
clcSetExpDate2(hCC, 02, 12);
clcSetAmount(hCC, 100); '$1.00
clcSetAuthCode(hCC, "CREDIT");
nResult = clcCredit(hCC);
if (nResult > 0)
- nTransNum = clcGetTransId(hCC);
- clcCopyAuthCode(hCC, strAuthCode);
else
- clcCopyErrText(hCC, strErrText);
'On Add Tip
clcSetMerchantIndex(hCC, 1); 'default is 0
clcAddTip(hCC, nTransNum, 100); 'Add $1.00 Tip
'On Void Transaction
clcSetMerchantIndex(hCC, 1); 'default is 0
clcVoid(hCC, nTransNum);
'On Gift Card transaction
' sale & credit are the same as a regular credit card
clcSetAccountNum(hCC, "4111111111111111");
clcSetAmount(hCC, 100); '$1.00
clcActivate(hCC);
nBalance = clcGetBalanceAmount(hCC);
clcDeactivate(hCC);
'On Loyalty Card Transaction
///////////////////////////////
// Amount Based Point Issuence Setup
///////////////////////////////
clcSetAccountNum(strAccountNum);
clcSetAccountType(ACCTTYPE_LOYALTY);
clcSetMoneyAmount(nTotalDollarAmount);
clcSetUnits(nQuantity);
///////////////////////////////
// END of Amount Based Point Issuence Setup
///////////////////////////////
//////////////////////////////////////////////////////////
// ALTERNATIVELY, you can use Product Based Point Issuence Setup
//////////////////////////////////////////////////////////
clcSetAccountNum(strAccountNum);
clcSetAccountType(ACCTTYPE_LOYALTY);
clcSetSKU(strSKUDetailInfo);
// SKU Detail Info Format: SKU,price,quantity;SKU,price[,quantity] (quantity is set to 1, if omitted)
// Example: "19999,19.99,3;20000,4.99;19999,19.99" means 3 x "19999,19.99" and 1 x "20000,4.99" and one more "19999,19.99"
// clcSetPromoCode(123); You can also use customer defined promo code
//////////////////////////////////////////////////////////
// END of Product Based Point Issuence Setup
//////////////////////////////////////////////////////////
// After setting up the parameters invoke the issuance command and queries
clcIssuance();
// .....
clcGetAmount(); // to get the points issued and
clcGetBalanceAmount(); // to get the total points on the account.
///////////////////////////////
// Redemption
///////////////////////////////
clcSetAccountNum(strAccountNum);
clcSetAccountType(ACCTTYPE_LOYALTY);
clcSetAmount(nChargeAmount);
clcRedemption();
clcGetBalanceAmount();// to get the total points on the account.
'On Batch
clcSetMerchantIndex(hCC, 1); 'default is 0
nResult = clcBatch(hCC);
Credit Card Storage
///* // Test Card Store
char szTag[256] = "";
{ // Store
clcSetAccountNum(hObj, "4111111111111111");
clcSetExpDate2(hObj, 2005, 12);
clcSesSetValue(hObj, CLCKEY_CUSTOMERNAME, "Test");
clcSesSetValue(hObj, CLCKEY_CUSTOMERNUMBER, "123");
clcSesSetValue(hObj, CLCKEY_CUSTOMERADDRESS, "PO BOX 888");
clcSesSetValue(hObj, CLCKEY_CUSTOMERZIPCODE, "33481");
clcStoreCard(hObj, "");
strcpy(szTag, clcGetTag());
cout << _T("Store Tag: ") << szTag << "\n";
} // Store
{ // Load
clcLoadCard(hObj, szTag);
char szValue[128] = "";
cout << _T("Account Number: ") << clcGetAccountNum(hObj) << "\n";
cout << _T("ExpDate: ") << clcGetExpDate(hObj) << "\n";
clcSesGetValue(hObj, CLCKEY_CUSTOMERNAME, szValue);
cout << _T("Name: ") << szValue << "\n";
clcSesGetValue(hObj, CLCKEY_CUSTOMERNUMBER, szValue);
cout << _T("Number: ") << szValue << "\n";
clcSesGetValue(hObj, CLCKEY_CUSTOMERADDRESS, szValue);
cout << _T("Address: ") << szValue << "\n";
clcSesGetValue(hObj, CLCKEY_CUSTOMERZIPCODE, szValue);
cout << _T("ZipCode: ") << szValue << "\n";
} // Load
{ // Delete
clcDeleteCard(hObj, szTag);
}} // Delete
Advanced Setup
CreditLine behavior can be fine tuned to match your operational requirements.
Please see the 911/data/911_CCV.INI and 911/DATA/CLCAPI.INI (for advanced API behavior) files for more information.
→ Upgrades do not overwrite the ini files because they may contain custom settings.
→ IMPORTANT! Make sure to browse through the CUSTOM POS SETTINGS section at the end of the 911/data/911_CCV.INI file for any settings that may be necessary for your specific POS installation.
- Note: for the key to take effect, do not forget to remove ';' in front of a key to uncomment it.
Troubleshooting
- CreditLine Test Mode
- CreditLine Logging
- CreditLine VITAL Test Account
- CreditLine Demo Mode
- Full Advanced Logging
Advanced Setup
CreditLine behavior can be fine tuned to match your operational requirements.
Please see the 911/data/911_CCV.INI and 911/DATA/CLCAPI.INI (for advanced API behavior) files for more information.
→ Upgrades do not overwrite the ini files because they may contain custom settings.
→ IMPORTANT! Make sure to browse through the CUSTOM POS SETTINGS section at the end of the 911/data/911_CCV.INI file for any settings that may be necessary for your specific POS installation.
- Note: for the key to take effect, do not forget to remove ';' in front of a key to uncomment it.