Android wechat payment source code sharing
This article shares the Android wechat payment source code for your reference. The specific contents are as follows
Parameter configuration
Get prepay_ id
The above configurations are correct. When you run, you will receive the return result of wechat:
When taking the second step, you may have the following problems:
result_ code><! [CDATA [app_id does not match merchant ID]] > < / result_ Code > / / wrong merchant ID result_ code><! [CDATA [signature error]] > < / result_ Code > / / when assembling product parameters, specify the code for the Chinese class content, otherwise the code will be garbled and this error will be reported;
Successfully obtained, prepay_ ID, can't the payment interface be adjusted at this time?
/***Note: 1. If you apply to open an app for wechat payment and register on the wechat open platform and use the eclipse default signature, you can call up the payment page now in the development environment. 2. If you use a user-defined signature on the app on the open platform, you need to use the signature to package and run again to call up wechat payment***/
Where is the callback of wechat payment results?
1. App client, we accept payment callback results in this class
/**Where you paint, you need to change it into your own app_ id **/
be careful:
Available demo downloads for wechat payment: http://xiazai.jb51.net/201608/yuanma/androidwxpay (jb51.net).rar
This article has been sorted into "Android wechat payment tutorial summary", welcome to learn and read.
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.