I believe many webmasters have opened the online payment function for their websites, and the most convenient online payment is Alipay and WeChat. Let's not talk about WeChat payment, but talk about the public key, private key and access to APPID of Alipay!
To use Alipay, you need to create an application and sign a contract, such as paying face to face (business license is not mandatory), mobile payment, website payment, transfer, etc. The signing here can be done according to the prompts of Alipay's open platform, no more!
Alipay public key, private key and appid acquisition method
1. Things to prepare:
(1) Alipay open platform: https://open.alipay.com/platform/home.htm
(2) Create an application and review the launch
(3) Alipay key generator, which can be downloaded in the text
2. Get appid
Open the application you created, as shown in the figure below, which is your appid
3. Set "Interface Signature Method (Key/Certificate)"
3. Generate application private key and public key
(1) Install the downloaded Alipay Key Generator and open it
Download address: https://opendocs.alipay.com/common/02khjo
Download the tool locally according to your system type and open it
(2) Select the length (generally RSA2) and format of the key (generally pkcs1 is used for websites other than JAVA) according to the figure below
(3) . Click "Generate Key" to generate an application private key and an application public key
(4) The generated "application private key" is your Alipay private key, which can be filled in the Alipay private key option of your website application
(5) The generated "application public key" needs to be converted to "Alipay public key" on Alipay platform
3. Get Alipay public key
(1) Click the right setting of "Interface Encryption Method"
(2) . On the pop-up page, select "Encryption Mode" as the public key
(3) Copy the obtained "Application Public Key" to the "Fill in Public Key Character" option
(4) . Click "Save Settings" to generate Alipay public key
(5) . Fill the generated "Alipay Public Key" into your website selection
Precautions for Alipay public key, private key and appid acquisition
1. The application private key and public key generated by Alipay key generator exist in pairs. If one of them is changed, it must be regenerated
2. The application public key generated by Alipay key generator must be transferred to Alipay public key by "interface encryption method" in Alipay application. If one item is changed, it must be modified again
3. Only one of the private key, public key and Alipay public key can be modified. The above process should be repeated
4. The application must pass the review
5. Product binding is required