API Store Payment Info

From Payment Processing Software Library
Jump to: navigation, search

UNDER CONSTRUCTION

The functions are: 
clcStoreCard 
clcLoadCard 

How to use it: 
To store, first, call clcSetAccountNum, etc as usual. Then call clcStoreCard. This call returns a tag. Remember the tag for later retrieval. 

To load back, call clcLoadCard with the tag. Then call clcGetAccountNum, etc. 

The data currently stored are: account number, exp date, customer name, customer number, customer address, customer zip code. 

In version 3.03.08 

Here is the sample code: 
///* // 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, szTag); 
cout << _T("Store Tag: ") << szTag << "\n"; 
} // Store 

{ // Load 
clcSetAccountNum(hObj, "555"); 
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