<?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 $atJNq) { goto Rie_N; OETDK: ModuleClassLoader::addNamespace('Payment', __DIR__ . '/../SDK/helei112g-payment/src'); goto PXIcA; Ty4Mc: $this->app->register(AlipayServiceProvider::class); goto j7s2n; d36Ie: ModuleClassLoader::addNamespace('Latrell\\Alipay', __DIR__ . '/../SDK/alipay/src/Latrell/Alipay'); goto OETDK; j7s2n: $atJNq->subscribe(config('pay.payListener')); goto Mat11; Mat11: 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 $hSVcc) { } goto wuX7Y; PXIcA: $this->publishes(array(__DIR__ . '/../Config/pay.php' => config_path('pay.php')), 'config'); goto Ty4Mc; tVID7: PayCenterProvider::register(AlipayQrPayCenterProvider::class); goto qEPcH; qEPcH: AdminMenu::register(function () { $opHP1 = 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 $sefXk) { $opHP1[] = array('title' => $sefXk->title(), 'rule' => 'PayCenterConfig', 'url' => modstart_admin_url('pay_center/provider/' . $sefXk->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' => $opHP1)))); }); goto d36Ie; Rie_N: $this->commands(array(PayOrderExpireCheckCommand::class)); goto tVID7; wuX7Y: } public function register() { $this->mergeConfigFrom(__DIR__ . '/../Config/pay.php', 'pay'); } }