Alipay way to develop interfaces to pay public key certificate (sandbox environment)

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)

MAC_OSX

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!

Published 90 original articles · won praise 21 · views 470 000 +

Guess you like

Origin blog.csdn.net/yx13649017813/article/details/104897230