This is the 15th day of my participation in the August More text Challenge. For details, see: August More Text Challenge
I. Configure merchant platform
The completion of wechat official account payment depends on the binding relationship between the official account and merchant number (McHId). Generally, the wechat service number is qualified to apply for payment. The service number corresponds to the main body of the offline company, and the wechat Pay merchant number corresponds to the corporate account of the company.
In this article, the merchant access model we use is the direct connection model.
The direct connection mode refers to that the merchant develops the system on its own to conduct transactions with wechat Pay, and wechat Pay directly settles the funds to the merchant’s settlement account, and the merchant provides payment services to the user. This mode requires merchants to have the ability of system development, and merchants can enter the merchant platform by themselves. — from wechat official
The payment mode is JSAPI payment.
JSAPI payment means that the user opens the H5 page of the merchant in wechat, and the merchant invoks the JSAPI interface provided by wechat Pay to call the wechat Pay module to complete the payment on the H5 page.
— from wechat official
Start the configuration
After applying for the wechat merchant platform, you will enter the background management page of the merchant platform. Choose to enter the product center. Two areas need to be configured, including the payment configuration in the development configuration and the APPID account management.
Because we use JSAPI payment, we add to the JSAPI payment authorization directory to configure the payment.
Note that there is a delay before it officially takes effect. The official word is about 10 minutes. Be patient.
After payment configuration is complete, you can add the APPID of the public account corresponding to the merchant number, that is, perform the operation of APPID account management.
In the direct connection mode, the main body of the appId corresponding to the official account should be the same as the company main body of the merchant number. Note that after submission, a new message will be added to the associated appId list to be confirmed by the background of the official account, and the prompt information is as follows
Your associate application has been initiated, please wait for the administrator of the service number to confirm your application. — from wechat official
2. Configure the public account platform
Choose wechat Pay -> Merchant Number Management. In the list of merchant numbers to be associated, after you agree the application request, there will be one more merchant number information under the associated merchant number.
At this point, the merchant payment environment configuration is complete, and then you can use wechat official documents to complete the development of JSAPI payment.