ThinkPHP uses WeChat Pay SDK

below is the file of WeChat Pay SDK containing samples
I am using TP5, how should I introduce and use them in my controller

entanglement points:

    Namespaces are all used in
  1. TP5, and all nine files in this SDK are introduced with require_once . How to interface with
  2. transform the nine files into namespaces, but find that there are 20 classes in one of the files, which do not comply with the rules of TP (the class name is the same as the file name)

May.26,2022

< H2 > official documentation < / H2 >
ThinkPHP5 recommends that all extended class libraries use namespaces. If your class libraries do not use namespaces, automatic loading is not supported. You must use the Loader::import method to import files before you can use them.
< H2 > how to use < / H2 >
  

ThinkPHP5 I remember also supporting composer . Just use the written wheel directly, as long as the wheel is specified by psr-4 or psr-0

.
Menu