Project

General

Profile

Programming Guide » History » Revision 9

Revision 8 (chin-yeh, 10/31/2011 10:09 AM) → Revision 9/15 (chin-yeh, 10/31/2011 10:09 AM)

{{toc}} 

 h1. Programming Guide 

 * [[programming_guide#Steps-By-Steps|Steps-By-Steps]] - describes how to integrate the SP web services APIs. 
 * [[API References]] - the API references of all of the APIs mentioned in the [[programming_guide#Steps-By-Steps|Steps-By-Steps]] 

 _Demo Application:_ 
 > http://192.168.2.68:8080/sp-test/index.html 

 Below is the list of libraries needed: 
 * sp-stub - _download the latest version from_ "Nexus":http://192.168.2.13:8081/nexus/index.html 
 * sp-client - _download the latest version from_ "Nexus":http://192.168.2.13:8081/nexus/index.html 

 h2. Steps-By-Steps 

 h3. Query Utilization Status 

 This [[API_References#Query-utilization-status-of-the-Special-Bundle-Set|API]] checks if the member has already purchased the special bundle set. 

 *Steps:* 
 # This API requires the parameters: 
 ** memberId 
 ** countryCode 
 # Pass the required parameters into the method, [[API_References#Query-utilization-status-of-the-Special-Bundle-Set|queryUtilizationStatus]] 
 # If the returned status is: 
 ** *0000*  
 ### then check the returned value, *isUtilized*, *true* means has been utilized 
 ** _any other codes_ 
 ### do not proceed as it could be system error or programming error 


 h3. Utilize the Special Bundle Set 

 This [[API_References#Utilize-the-Special-Bundle-Set|API]] informs SP web services when the member has purchased the special bundle set. 

 *Steps:* 
 # [[API_References#Utilize-the-Special-Bundle-Set|Query the utilization status of the special bundle set]] 
 ## if *not yet utilized* 
 ### pass the following parameters to the method, [[API_References#Utilize-the-Special-Bundle-Set|flagSpecialSetUtilization]]: 
 **** dbConnection 
 **** orderId 
 **** countryCode 
 **** memberId 
 **** trxDate 
 ### if the returned status is *0000*, it has been successfully processed 
 ## if *utilized*, inform the member that he/she has purchased the bundle set. 

 h3. Return or Exchange Special Bundle Set 

 Invokes this [[API_References#Return-the-Special-Bundle-Set|API]] when the member return or exchange the special bundle set. 

 *Steps:* 
 # there's no need to query the utilization status 
 # pass the following parameters to the method, [[API_References#Return-the-Special-Bundle-Set|unflagSpecialSetUtilization]]: 
 ** dbConnection 
 ** orderId 
 ** countryCode 
 ** memberId 
 ** trxDate 
 # if the returned status is *0000*, it has been successfully processed else failed to process. 

 h2. API References 

 See [[API References]]