<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\PayCenter\Core; use Illuminate\Events\Dispatcher; use Illuminate\Support\ServiceProvider; use Latrell\Alipay\AlipayServiceProvider; use ModStart\Admin\Config\AdminMenu; use ModStart\Admin\Layout\AdminPage; use ModStart\Module\ModuleClassLoader; use ModStart\Widget\Box; use ModStart\Widget\Chart\Line; use Module\PayCenter\Command\PayOrderExpireCheckCommand; use Module\PayCenter\Model\PayOrder; use Module\PayCenter\Provider\AlipayQrPayCenterProvider; use Module\PayCenter\Provider\PayCenterProvider; use Module\PayCenter\Type\PayOrderStatus; use Module\PayCenter\Util\ReportUtil; use Module\Vendor\Admin\Widget\AdminWidgetDashboard; class ModuleServiceProvider extends ServiceProvider { public function boot(Dispatcher $tTe1F) { goto lX5OM; XOxAK: $this->publishes(array(__DIR__ . '/../Config/pay.php' => config_path('pay.php')), 'config'); goto Pr9op; UDSQF: $tTe1F->subscribe(config('pay.payListener')); goto xmABf; vcEPQ: AdminMenu::register(function () { $K10ov = array(array('title' => '支付功能设置', 'url' => '\\Module\\PayCenter\\Admin\\Controller\\ConfigController@index'), array('title' => '微信支付', 'url' => '\\Module\\PayCenter\\Admin\\Controller\\ConfigController@wechat'), array('title' => '支付宝（旧）', 'url' => '\\Module\\PayCenter\\Admin\\Controller\\ConfigController@alipay'), array('title' => '支付宝', 'url' => '\\Module\\PayCenter\\Admin\\Controller\\ConfigController@alipayWeb')); foreach (PayCenterProvider::all() as $tDnAb) { $K10ov[] = array('title' => $tDnAb->title(), 'rule' => 'PayCenterConfig', 'url' => modstart_admin_url('pay_center/provider/' . $tDnAb->name())); } return array(array('title' => '财务中心', 'icon' => 'cny', 'sort' => 200, 'children' => array(array('title' => '财务概况', 'url' => '\\Module\\PayCenter\\Admin\\Controller\\DashboardController@index'), array('title' => '订单对账', 'url' => '\\Module\\PayCenter\\Admin\\Controller\\ReportController@index'), array('title' => '全部订单', 'url' => '\\Module\\PayCenter\\Admin\\Controller\\PayOrderController@index'), array('title' => '退款订单', 'url' => '\\Module\\PayCenter\\Admin\\Controller\\PayOrderRefundController@index'), array('title' => '业务订单', 'sort' => 999999, 'children' => array()))), array('title' => L('Site Manage'), 'icon' => 'cog', 'sort' => 400, 'children' => array(array('title' => '支付设置', 'children' => $K10ov)))); }); goto IRPeO; Qz2d1: PayCenterProvider::register(AlipayQrPayCenterProvider::class); goto vcEPQ; IRPeO: ModuleClassLoader::addNamespace('Latrell\\Alipay', __DIR__ . '/../SDK/alipay/src/Latrell/Alipay'); goto bCzMZ; Pr9op: $this->app->register(AlipayServiceProvider::class); goto UDSQF; lX5OM: $this->commands(array(PayOrderExpireCheckCommand::class)); goto Qz2d1; xmABf: try { if (modstart_config('payAlipayOn', false)) { config(array('pay.alipay' => array('partnerId' => modstart_config()->getWithEnv('payAlipayPartnerId'), 'sellerId' => modstart_config()->getWithEnv('payAlipaySellerId'), 'key' => modstart_config()->getWithEnv('payAlipayKey')))); } } catch (\Exception $qoTNG) { } goto bgh7M; bCzMZ: ModuleClassLoader::addNamespace('Payment', __DIR__ . '/../SDK/helei112g-payment/src'); goto XOxAK; bgh7M: } public function register() { $this->mergeConfigFrom(__DIR__ . '/../Config/pay.php', 'pay'); } }