<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\PayCenter\Admin\Controller; use Illuminate\Routing\Controller; use ModStart\Admin\Layout\AdminConfigBuilder; use ModStart\Core\Exception\BizException; use Module\PayCenter\Provider\PayCenterProvider; class ConfigController extends Controller { public static $PermitMethodMap = array('provider' => '@PayCenterConfig'); public function alipay(AdminConfigBuilder $A2Tuf) { goto ROwFC; RpuBA: $A2Tuf->text('payAlipaySellerId', '卖家ID(SellerId)')->help('如 seller@example.com'); goto Nd5G7; G6TTA: $A2Tuf->switch('payAlipayOn', '开启支付宝付款'); goto OewF3; Nd5G7: $A2Tuf->text('payAlipayKey', '安全Key')->help('如 pdehgmdjeubnghtyddktjm174hdj'); goto lDoax; OewF3: $A2Tuf->text('payAlipayPartnerId', '卖家ID(PartnerId)')->help('如 2085364735263489'); goto RpuBA; MWCnu: $A2Tuf->formClass('wide'); goto fTC9R; ROwFC: $A2Tuf->pageTitle('支付宝（旧）'); goto G6TTA; lDoax: $A2Tuf->display('_empty_', '')->content('<span class="ub-text-danger">如果您还没开通支付宝收款，请 <a href="https://tecmz.com/article/payapply" target="_blank">联系我们</a> 协助申请</span>'); goto MWCnu; fTC9R: return $A2Tuf->perform(); goto Wridm; Wridm: } public function wechat(AdminConfigBuilder $A2Tuf) { goto bJk7v; frliI: $A2Tuf->text('payWechatAppId', 'AppId')->help('如 需要和微信授权登录AppId相同'); goto uVZj6; t5OZn: $A2Tuf->switch('payWechatOn', '开启微信付款'); goto frliI; T0aZZ: return $A2Tuf->perform(); goto xwgoL; bkG1C: $A2Tuf->display('_empty_', '')->content('<span class="ub-text-danger">如果您还没开通微信商户收款，请 <a href="https://tecmz.com/article/payapply" target="_blank">联系我们</a> 协助申请</span>'); goto Wrcv7; Wrcv7: $A2Tuf->formClass('wide'); goto T0aZZ; uVZj6: $A2Tuf->text('payWechatMerchantId', '商家ID(MerchantId)')->help('如 136XXXXXXX'); goto cQVXP; bJk7v: $A2Tuf->pageTitle('微信支付'); goto t5OZn; cQVXP: $A2Tuf->text('payWechatKey', 'API密钥(Key)')->help('长度32位，在微信支付平台中的 账户中心 > API安全 > API密钥 中获取。'); goto bkG1C; xwgoL: } public function alipayWeb(AdminConfigBuilder $A2Tuf) { goto m0ec5; m0ec5: $A2Tuf->pageTitle('支付宝'); goto PuSMB; nz4vQ: return $A2Tuf->perform(); goto btcQO; iAm12: $A2Tuf->text('payAlipayWebAppId', 'AppId')->help('如 '); goto l8LeH; Q3CZg: $A2Tuf->display('_empty_', '')->content('<span class="ub-text-danger">如果您还没开通支付宝收款，请 <a href="https://tecmz.com/article/payapply" target="_blank">联系我们</a> 协助申请</span>'); goto VUCBB; BO96g: $A2Tuf->textarea('payAlipayWebRSAPrivateKey', '应用私钥RSA2(SHA256)')->help('复制 -----BEGIN RSA PRIVATE KEY----- 和 -----END RSA PRIVATE KEY----- 中间的部分'); goto Q3CZg; l8LeH: $A2Tuf->textarea('payAlipayWebAliPublicKey', '支付宝公钥')->help('如 '); goto BO96g; VUCBB: $A2Tuf->formClass('wide'); goto nz4vQ; PuSMB: $A2Tuf->switch('payAlipayWebOn', '开启'); goto iAm12; btcQO: } public function index(AdminConfigBuilder $A2Tuf) { goto vO4To; vO4To: $A2Tuf->pageTitle('支付功能设置'); goto bEqiS; TxwY3: $A2Tuf->formClass('wide'); goto V7fws; OOXUv: $A2Tuf->switch('payQuickPreferEnable', '优先扫码快捷支付')->help('在PC适配了扫码快捷支付的页面，优先启用扫码快捷支付，仅支持微信支付、支付宝支付'); goto TxwY3; V7fws: return $A2Tuf->perform(); goto XcHlo; bEqiS: $A2Tuf->switch('payMemberMoneyOn', '开启余额支付'); goto OOXUv; XcHlo: } public function provider(AdminConfigBuilder $A2Tuf, $BjHij) { goto f5_su; kiibR: $sefXk->adminConfig($A2Tuf); goto jyyN0; ujH3a: $A2Tuf->pageTitle($sefXk->title()); goto kiibR; f5_su: $sefXk = PayCenterProvider::get($BjHij); goto YPLhj; YPLhj: BizException::throwsIfEmpty('支付方式未找到', $sefXk); goto ujH3a; jyyN0: return $A2Tuf->perform(); goto TPNT5; TPNT5: } }