─────────────────────────────────────────     
Product name：UnionPay payment control
Date：  2016-08-01
─────────────────────────────────────────

───────────
 **Note**
1） Read the following guide before testing
2） This demo is based on .net framework4.0，VS2010. If VS of higher version is used，please do NOT double click to open. Please choose the route "file->open project" to open the project instead.
3） This project can be run to test, Chrome or FireFox browsers are recommended
UPOP web/WAP gateway transaction demo address：http://IP：port/index_05_app.aspx
───────────

───────────
demo project directory structure
───────────

upacp_demo_app
  │
  ├assets ┈┈┈┈┈┈┈┈┈assets directory
  │  │  
  │  ├certificates for testing environment
  │  │  │  
  │  │  ├acp_test_enc.cer┈┈┈┈┈┈┈┈┈ 【important】encryption certificate for sensitive information in testing environment (same one for all merchants) 
  │  │  │  
  │  │  ├acp_test_sign.pfx ┈┈┈┈┈┈┈┈┈ 【important】certificate for signature private key in testing environment（same one for all merchants） 
  │  │  │  
  │  │  ├acp_test_root.pfx ┈┈┈┈┈┈┈┈┈ 【important】root certificate for signature-verification public key in testing environment（same one for all merchants）    
  │  │  │  
  │  │  └acp_test_middle.cer ┈┈┈┈┈┈┈┈┈【important】middle certificate for signature-verification public key in testing environment（same one for all merchants）    
  │  │  
  │  ├certificates for production environment
  │  │  │
  │  │  ├acp_prod_enc.cer┈┈┈┈┈┈┈┈┈【important】 encryption certificate for sensitive information in production environment（same one for all merchants）
  │  │  │
  │  │  ├acp_prod_root.cer ┈┈┈┈┈┈┈┈┈【important】 root certificate for signature-verification public key in production environment（same one for all merchants）    
  │  │  │
  │  │  └acp_prod_middle.cer ┈┈┈┈┈┈┈┈┈【important】 middle certificate for signature-verification public key in production environment（same one for all merchants）      
  │  │  
  │  ├configuration files of production environment
  │  │  │
  │  │  ├Web.config.密钥 ┈┈┈┈┈┈┈┈┈ 【important】 configuration file demo of production environment (signing by key)
  │  │  │
  │  │  └Web.config.证书 ┈┈┈┈┈┈┈┈┈ 【important】 configuration file demo of production environment (signing by certifiate) 
  │  │ 
  │  ├configuration files of testing environment
  │  │  │
  │  │  ├Web.config.密钥 ┈┈┈┈┈┈┈┈┈ 【important】 configuration file demo of testing environment (signing by key)
  │  │  │
  │  │  └Web.config.证书 ┈┈┈┈┈┈┈┈┈ 【important】 configuration file demo of testing environment (signing by certifiate) 
  │  │ 
  │  └reconciliation files demo 
  │     │
  │     └802310048993424_20150905.zip┈┈┈┈┈┈┈┈┈reconciliation file demo（for reference）
  │  
  ├demo ┈┈┈┈┈┈┈┈┈ demo
  │  │  
  │  ├api_05_app ┈┈┈┈┈┈┈┈┈API
  │  │  │  
  │  │  ├Form_6_2_AppConsume.aspx┈┈┈┈┈purchase（to obtain tn）（back-end）
  │  │  │  
  │  │  ├Form_6_3_ConsumeUndo.aspx┈┈┈┈┈purchase cancellation （back-end）
  │  │  │  
  │  │  ├Form_6_4_Refund.aspx┈┈┈┈┈refund （back-end）
  │  │  │  
  │  │  ├Form_6_5_Query.aspx┈┈┈┈┈transaction inquiry （back-end）
  │  │  │  
  │  │  ├Form_6_6_FileTransfer.aspx┈┈┈┈┈download reconciliation file （back-end）  
  │  │  │  
  │  │  ├Form_6_7_1_FrontPreauth.aspx┈┈┈┈┈pre-authorization (to obtain tn)（back-end）
  │  │  │  
  │  │  ├Form_6_7_2_PreauthUndo.aspx┈┈┈┈┈pre-authorization cancellation （back-end）
  │  │  │  
  │  │  ├Form_6_7_3_PreauthFinish.aspx┈┈┈┈┈pre-authorization completion （back-end）
  │  │  │  
  │  │  └Form_6_7_4_PreauthFinishUndo.aspx┈┈┈┈┈pre-authorization completion cancellation （back-end）
  │  │   
  │  ├FrontReceive.aspx┈┈┈┈┈front-end notification process demo （back-end） 
  │  │
  │  └BackReceive.aspx┈┈┈┈┈back-end notification process demo
  │  
  ├upacp_sdk_net.com.unionpay.sdk┈┈┈┈┈┈sdk (all sdks in this folder are reserved for unionpay interneal use except AcpService) 
  │  │
  │  └AcpService.cs ┈┈┈┈┈┈ UPOP SDK API
  │  
  ├pages ┈┈┈┈┈┈┈┈┈ demo page
  │
  ├static ┈┈┈┈js and css related with demo
  │
  ├Web.config ┈┈┈┈┈┈┈┈┈ 【important】 configuration file，using the configuration file (signing by certificate) in the “assets/configuration files of testing environment” directory
  │
  └index_05_app.aspx ┈┈┈┈entrance of demo page

───────────
 **Note**


1.【About MID】
Please ignore the MID in the SDK demo and use your real MID for testing. IF error such as "no authority" occurs, please contact UPI to make sure if the authority is granted.
  
2.【About Certificate Files】
Certificate for signature private key and certificate for signature-verification public key in testing environment can be found under the "assets" directory. Configure these files under the directory defined by "Web.config" before use.You don't have to know the algorithm for signature or signature-verification while using our demo. Please refer to configuration file notes for details.

Certificate for signature-verification public key and "SDKConfig.php" file can be found under "assets" directory in production environment, configure private key and public key before use. Please refer to configuration file notes for details. 

3.If problems occurs during testing：
  1）Try to find answer on  https://open.unionpay.com/ajweb/help/faq/list（only Chinese language available）：
FAQ: https://open.unionpay.com/ajweb/help/faq/list
For 7-digit response code: enter the code on https://open.unionpay.com/ajweb/help/respCode/respCodeList to search for the answer
  2）Payment in testing environment shall use the testing cards
  3）Serach "切换" in the FAQ for the key points of switching to production environment.



───────────

