First of all, you need to obtain openid in
two ways: the first is to manually implement it. Viewing WeChat document
1 requires you to have an external network address, set it in the public account
2 and then view the document. You need to click on the connection provided by WeChat to obtain from this connection code
2 After your server gets the code, you also need to click on a connection, and you need to use the parameters you used to get the last code. Then get the openid.
The second: third-party SDK recommended
github link address: https://github.com/wechat-group/weixin-java-tools
payment SDK
https://github.com/Pay-Group/best-pay-sdk