<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Member\Api\Controller; use Illuminate\Routing\Controller; use ModStart\Core\Dao\ModelUtil; use ModStart\Core\Exception\BizException; use ModStart\Core\Input\InputPackage; use Module\Member\Auth\MemberUser; use Module\Member\Core\MemberMoneyChargePayCenterBiz; use Module\Member\Support\MemberLoginCheck; use Module\PayCenter\Support\PayCenterPerform; use Module\Vendor\Type\OrderStatus; class MemberMoneyChargeController extends Controller implements MemberLoginCheck { public function submit() { goto cTzQ7; a46qW: $LKZdd = $tBuXm->getDecimal('money'); goto lMEl9; cTzQ7: BizException::throwsIf('钱包充值未开启', !modstart_config('Member_MoneyChargeEnable', false)); goto VT277; CKnmz: return $dE3UR->performSubmitOrder(MemberMoneyChargePayCenterBiz::NAME, $toXYt['id'], $toXYt['money'], '钱包充值'); goto sRcHB; VT277: $tBuXm = InputPackage::buildFromInput(); goto a46qW; lMEl9: BizException::throwsIf('金额最少为0.01元', $LKZdd < 0.01); goto ZTnY8; ZTnY8: BizException::throwsIf('金额最大为1,000,000元', $LKZdd > 1000000); goto L32HT; uf2vT: BizException::throwsIf('请安装 PayCenter 模块', !modstart_module_enabled('PayCenter')); goto vqGgw; vqGgw: $dE3UR = app(PayCenterPerform::class); goto CKnmz; L32HT: $toXYt = ModelUtil::insert('member_money_charge_order', array('status' => OrderStatus::WAIT_PAY, 'memberUserId' => MemberUser::id(), 'money' => $LKZdd)); goto uf2vT; sRcHB: } }