search
HomeWeChat AppletWeChat DevelopmentDemonstration of payment function developed by WeChat

I have been studying WeChat recently. I don’t know if I don’t study it. Once I study it, I will jump to the next page. WeChat can really do too many things. Let’s take a look at the development experience of WeChat payment first. I will slowly complete other aspects in the future. The development code

WeChat Pay, even if you pay the deposit, you are still in the testing stage and cannot be officially released. You must submit order, shipping notification and other data to the WeChat system through program testing before you can apply for release.

Then, because the API is called through JS in WeChat, the payment authorization directory must be set up in the WeChat backend, and it must go to the second and third level directories. This is a small problem when using the MVC framework.

Using MVC, in the development environment, the url is often in the native url format, and there is no guarantee that it must be in the form of path/

So, a more reliable way is to create a subfolder of the entity , such a change requires some modifications in terms of the overall URL of the system.

In addition, in the last step, when calling js, for the js library provided here at http://www.php.cn/, when calling, you must ensure that it is triggered after the page is loaded, that is, the status of WeixinJSBridgeReady. Because only then can we communicate with the jsbridge provided by WeChat browser.

5.24 Repair

For details, please see the relevant code in Weiqing.

Copy code The code is as follows:




The above is the detailed content of Demonstration of payment function developed by WeChat. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
1 months agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

Atom editor mac version download

Atom editor mac version download

The most popular open source editor