Thinkphp3.2 integrated with WeChat payment V3

Source: Internet
Author: User
Provides various official and user-released code examples. For code reference, you are welcome to learn thinkphp3.2 integrate the latest SDK for payment V3. The service should be placed in the callback function to process the SDK.
To build a project, you need to integrate APP payment. The framework is developed with thinkphp3.2 and the V3 version is paid. Because most of the information on the Internet comes from the integration of thinkphp and v2 versions, after downloading many written V3 versions, they are all V2 versions. There are too many pitfalls. After downloading the V3 version, we find that there are many differences between the V3 version V2 versions, so we can find information everywhere, I found the same problem on the entire website and did not have the same answer. I was so worried that I couldn't help it. I had to study it myself. Who knows that some official code of the V3 SDK is wrong, in addition, the official team did not consider how to handle the businesses integrated into the box by paying for V3. According to the official example, only WXNOTIFY can be inherited. But how does thinkphp inherit the third-party SDK, in distress, I thought of a solution. The business is still processed in the controller. First, the data validity is verified, and then the business processing is executed. This does not rely on the callback of a third-party database.
I will not elaborate on the configuration. This website has a lot of materials and is also very comprehensive. Here I will share with you the location and ideas for writing the business processing code, please do not talk about the code for the first time!

Wxpay_v3_demo.zip (18.45 KB download: 277 times)

AD: truly free, domain name + VM + enterprise mailbox = 0 RMB

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.