123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <?php
- namespace app\common\util\wechat;
- use app\common\util\SingleObjectClass;
- use EasyWeChat\Factory;
- use think\Log;
- class WechatPaySDK extends SingleObjectClass
- {
- protected $app;
-
- public function __construct()
- {
- $miniProgramConfig = WxAccountConfig::getWechatPayConfig();
- $this->app = Factory::payment($miniProgramConfig);
- $cache = new WechatCache();
- $this->app->rebind('cache', $cache);
- Log::record($cache);
- }
-
- public function getApp()
- {
- return $this->app;
- }
- }
|