UnionPay Interface Test-detailed (JAVA), UnionPay interface java
Prepare materials
1. Register account https://open.unionpay.com/ajweb/register? Locale = zh_CN
2. log on to the Alipay account and choose help center> download, select gateway payment, and download the network management payment product technical development kit. There are some documents in it. You can also download them.
3. Development Tools Eclipse + Tomcat7.0
4. Import a readme.txt file to the project directory.
Start of Text
1. modify the configuration file and some parameters
Retrieve test parameters
Callback my parameters
① Click the merchant's private key certificate and UnionPay Public Key Certificate to download
② Here is the test Merchant number and test entry address.
③ Rename the downloaded merchant Private Key Certificate to acp_test_sign.pfx
④ Rename the downloaded UnionPay Public Key Certificate to acp_test_verify_sign.cer
⑤ Create the certs folder on disk D and copy the files in the project sr/cassets/test environment certificate to the folder just created
6. copy the file renamed in step 3 and replace it with D: \ certs.
Open the acp_sdk.properties configuration file in the project and modify the request transaction address. For the request transaction address here, see "test parameters"
Modify the following locations (If your certs folder is the same as me, you will be the same as me)
Do you still remember the test merchant ID in your test parameters? Copy it and modify the merId in each java file. Some files do not need to be modified. The following is an example.
2. Test your product --> not tested --> pay by gateway, click Start test, and wait for 10 minutes (the test takes effect 10 minutes later)
▼ Use the IE access address http: // 127.0.0.1: 8080/ACPSample_ B2C/(remember not to use 360 will cause problems), enter your test Merchant number, and click to jump to the UnionPay payment page, there will be a certificate security issue here, no matter whether he continues to access
▼ Go to the payment page and test the bank card below the test parameters. Click "confirm payment". Is the payment successful?
Now the development and testing project is running. You can debug the project, read the document, and read the code! If you have any questions, leave a message.