WeChat Mini Program - Enterprise Payment to Change API Development

Recently, the development has encountered the problem of paying the change to the enterprise. After consulting the WeChat development documentation and other blogs, it was solved, and it is recorded here.

[WeChat development documentation]     https://pay.weixin.qq.com/wiki/doc/api/tools/mch_pay.php?chapter=14_2
[Reference blog]     https://blog.csdn.net/xiaozhegaa/article/ details/79178751

I found that WeChat payment and enterprise payment to change have similar steps.

0. Generate your own signature based on the parameters to be passed.
1. Data encapsulation map collection is generally performed.
2. Convert the current map combination into xml format.
3. Then send a post request to call the WeChat interface.
4. Parse the returned xml as a map collection.

Similar to these steps, the use of some tools and merchant numbers and the merchant appid user openid applet appid need to be set according to their own development.
Here is a brief summary, other codes will be added later.

 

The level is limited, if you have any questions, please leave a message to exchange.

Learn from each other and make progress together :) Please indicate the source for reprinting. Thank you.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325273608&siteId=291194637