thinkphp3.2整合微信支付V3最新版SDK,业务要放在回调函数里面处理SDK
因为要做一个项目,项目需要集成微信APP支付,框架用thinkphp3.2开发,微信支付V3版本,由于网上大部分资料都是来源于thinkphp与v2版本的整合,好多写的V3版本的下载之后都是V2版本的,太多的坑啊,下载了V3版本之后发现V3版本的V2版本差异很多,所以到处找资料,翻遍整个网站发现有同样问题的,确没有同样答案的,这个苦恼啊,最后没办法,只好自己研究,谁知道V3版本的SDK官方有些代码都是错的,并且官方并没有考虑微信支付V3集成到框里面的的业务该如何处理,按照官方的例子只能继承WXNOTIFY,可是thinkphp怎么继承第三方的SDK呢,苦恼之中想到了解决办法,业务还放到controller里面处理,先校验数据有效性,再执行业务处理,这样就不依赖第三方库的回调了。
配置方面就不此阐述了,这个网站资料很多,也很全,这里主要给大家分享下我业务处理代码的编写位置及思路,如果有大牛觉得不好,请勿重重吐草,第一次分享代码!
wxpay_v3_demo.zip
( 18.45 KB 下载:277 次 )
AD:真正免费,域名+虚机+企业邮箱=0元

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

Zend Studio 13.0.1
Powerful PHP integrated development environment

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

Dreamweaver Mac version
Visual web development tools
