Android wechat payment V3 local signature unified order details

It was full of holes because the server was lazy and asked the customer service to write a unified order, and the server only gave the URL of the notice. Wechat payment demo does not have a unified order code.

Read this article before you read it: https://pay.weixin.qq.com/wiki/doc/api/app/app.PHP?chapter=9_ one

Step by step, first introduce the tool according to the parameters of unified order:

1. Get the current IP address:

2. Random order number generation test you can generate random numbers according to yourself:

3. Signature tool:

Almost. Now we need to generate and pass parameters in XML format:

Where toxml:

Get the passed parameters. According to the document instructions, we need to use post to hang the connection URL address: https://api.mch.weixin.qq.com/pay/unifiedorder :

Where decodexml is:

After the order is placed, the second part is to transfer the parameters of wechat payment to wechat payment (see the document description for specific parameters):

Part III, wechat payment:

Of which:

The appid is obtained from the developer platform

Merchant ID

Callback notification address after payment.

Sign twice, and then use the API key, which is customized in the API security of the merchant platform.

By the way, there is also a tool for obtaining time

The above is the whole content of this article. I hope it will be helpful to your study, and I hope you can support programming tips.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>