There happened to be a project that needed this function, so I researched around on the Internet and found a case. After debugging, it can be used normally. Share it with everyone.
Key difficulties: When downloading the merchant center certificate to find various payment parameters and certificate paths, be sure to use relative paths. Another thing to note is that when someone with the same amount paid for the second time, it was unsuccessful. Please change it. The payment amount can be very strange. I haven't had time to study what's going on. Let me share it first. If anyone has studied it, please let me know!
WeChat Enterprise Payment API Class.zip ( 2.74 KB Download: 15 times )