The WeChat applet works fine when tested with developer tools and real devices, but WeChat payment cannot be invoked after uploading. Finally, the reason has been found.

The web-view WeChat applet embeds H5 to complete the payment by calling the WeChat applet. It worked fine during the developer tools and real machine testing, but the reason why WeChat payment cannot be called after uploading is finally found.

is because after the mini program uploads and passes the review, it needs to verify the legal domain name and check the corresponding documents. The official WeChat mini program requires that each WeChat mini program needs to set a communication domain name in advance. The mini program can only communicate with the specified Domain name and network communication, so we need to configure and add your URL in Mini Program Backend-Settings-Development Settings-Server Domain Name can solve the problem.

Just add your URL to "request legal domain name"

Guess you like

Origin blog.csdn.net/u010439874/article/details/132610743