Alipay signature mode selection: general public, the public key certificate
Call requires funds involved class interface is recommended to select a public key certificate manner.
Here the public key certificate access mode:
1, RSA key generation, the official reference documentation: https://docs.open.alipay.com/291/105971/
According to the system environment, download the corresponding key generation tool:
WINDOWS (Windows version of the tool, do not install in the directory path contains spaces, otherwise it will cause problems with public and private key garbled)
After installation is complete, open the Tools:
Click on the "Click for" button, as bomb box:
Improve the relevant information, click on the "Generate the CSR file" button
After the build is complete, click "Open File Location" button, the file directory:
2, console configuration:
Click on the "Settings / View" to bring up the following interface:
Just upload files .csr 3 file and apply public key certificate, the public key certificate Alipay Alipay root certificate three certificates for download.
3, coding
pom-dependent
Public request parameter definitions:
Note: The three certification path requires absolute address
test execution results:
Results show:
Can be viewed in a sandbox account in the balance of merchants and buyers to change information.
The above code is test code, name, grammar non-standard place, please understand. Welcome Tucao, thank you!