uniApp APP fails to call WeChat payment, errCode: -100 is a pitfall

After debugging after configuring the package name and signature on the open platform , WeChat Pay can be activated on some models through debugging, but it fails when packaged into an apk. There is a successful result, and the reverse inference of the code is certain no problem. But the console reports an error of errCode:-100.

Searching the Internet for answers to this question, most of them asked me to check appId, package name certificate and other issues. And whether the signatures are consistent.

Finally, I found out that it was a signature issue, but I didn't know where to start. I read an article and then successfully solved it. Attached link:

uniApp APP payment/sharing WeChat open platform Android package name signature pitfall_Coder_Kider's blog-CSDN blog

Use WeChat’s official signature viewing tool
Insert image description here

  1.  When packaging, copy the package name, and then install the apk you need to debug on your phone.
  2. Then install WeChat’s official signature viewing tool apk on your phone.
  3. Enter the copied package name into the signing tool to get the signature of the debug apk.
  4. Check whether the signature configured on the open platform is consistent.
  5. If they are inconsistent, reconfigure the obtained signature.
  6. OK! solve!

If it happens to solve your problem, you can give me a little heart~

 

Guess you like

Origin blog.csdn.net/weixin_38791717/article/details/123863871