Q: I have received a project recently. I haven't touched it before. Suddenly there is a problem with the payment. The JSAPI payment interface is WeixinJSBridge. invoke (& quot; getBrandWCPayRequest & quot ;..... this always returns: get_brand_wcpay_request: fail, and then... question first
I recently received a project and never touched it before. Suddenly there was a problem with the payment, and the JSAPI payment interface was WeixinJSBridge. invoke ("getBrandWCPayRequest "..... this always returns: get_brand_wcpay_request: fail, and then there is no more.
I went to the JSAPI technical documentation on the official website of the public platform and read the JSAPI technical documentation. The code in the cloud is completely different from that in my project, later I know that my project is the payment V2 version, the official website is V3, And then I in the "https://pay.weixin.qq.com/wiki/doc/api/jsapi.php? Chapter = 7_7 & index = 6 "found a document for calling JS payment on an H5 webpage. Unfortunately, it looks very similar to what I called, but the parameters are still different. It looks like it is also V3. Baidu gave this keyword "get_brand_wcpay_request: fail", and said that the new version does not support such calls, but is not sure, because the official website did not say it is unavailable.
So now I am in a desperate situation. I do not know whether my code can be used, nor can I find any helpful information, nor can I upgrade my payment, I saw that the upgrade payment still designed many things. Now I have no choice but to ask for help. I hope those who have experience in this field will not be enlightened!
I have never seen such a messy technical document. What is this. Too angry.
Reply content:
Question first
I recently received a project and never touched it before. Suddenly there was a problem with the payment, and the JSAPI payment interface was WeixinJSBridge. invoke ("getBrandWCPayRequest "..... this always returns: get_brand_wcpay_request: fail, and then there is no more.
I went to the JSAPI technical documentation on the official website of the public platform and read the JSAPI technical documentation. The code in the cloud is completely different from that in my project, later I know that my project is the payment V2 version, the official website is V3, And then I in the "https://pay.weixin.qq.com/wiki/doc/api/jsapi.php? Chapter = 7_7 & index = 6 "found a document for calling JS payment on an H5 webpage. Unfortunately, it looks very similar to what I called, but the parameters are still different. It looks like it is also V3. Baidu gave this keyword "get_brand_wcpay_request: fail", and said that the new version does not support such calls, but is not sure, because the official website did not say it is unavailable.
So now I am in a desperate situation. I do not know whether my code can be used, nor can I find any helpful information, nor can I upgrade my payment, I saw that the upgrade payment still designed many things. Now I have no choice but to ask for help. I hope those who have experience in this field will not be enlightened!
I have never seen such a messy technical document. What is this. Too angry.
Payment is now divided into v2 and v3. The application for payment is v2 before January 1, September 10, 2014, and the application for payment is v3. The paySignKey parameter is not provided for payment in V3.
The two versions depend on the application time and cannot be converted. The code and process are also very different.
Now, you need to pass the permission verification to call jsapi. The solution to this problem is to use jssdk for jsapi payment, but the payment code of the server is still used.
It is not difficult for V2 to upgrade V3. It is feasible for V3 to have the payment parameter missing the key of caifu Tong, and then the official source code of the corresponding language is provided. Directly modify the parameters to run the program. If you are using C #, you can contact us in our group. 217073730
Php and c # payment websites all have ready-made demos, which can be used with several parameters. You can first try the official demo to see if it works properly.
Https://pay.weixin.qq.com/wiki/doc/api/jsapi.php? Chapter = 11_1