<?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 $wtvAw) { goto W40dd; ImHqY: $wtvAw->subscribe(config('pay.payListener')); goto UtIsP; RjwDK: $this->app->register(AlipayServiceProvider::class); goto ImHqY; UtIsP: 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 $ZemkG) { } goto vH743; IPBzz: PayCenterProvider::register(AlipayQrPayCenterProvider::class); goto Faxg1; W40dd: $this->commands(array(PayOrderExpireCheckCommand::class)); goto IPBzz; sTP66: ModuleClassLoader::addNamespace('Payment', __DIR__ . '/../SDK/helei112g-payment/src'); goto Aa7lO; Aa7lO: $this->publishes(array(__DIR__ . '/../Config/pay.php' => config_path('pay.php')), 'config'); goto RjwDK; hOcSs: ModuleClassLoader::addNamespace('Latrell\\Alipay', __DIR__ . '/../SDK/alipay/src/Latrell/Alipay'); goto sTP66; Faxg1: AdminMenu::register(function () { $WSdtP = 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 $oMd7I) { $WSdtP[] = array('title' => $oMd7I->title(), 'rule' => 'PayCenterConfig', 'url' => modstart_admin_url('pay_center/provider/' . $oMd7I->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' => $WSdtP)))); }); goto hOcSs; vH743: } public function register() { $this->mergeConfigFrom(__DIR__ . '/../Config/pay.php', 'pay'); } }