<?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 YO09V; YO09V: BizException::throwsIf('钱包充值未开启', !modstart_config('Member_MoneyChargeEnable', false)); goto uJFCo; BF6z4: $Ubb8m = app(PayCenterPerform::class); goto KrIXt; SffsF: BizException::throwsIf('请安装 PayCenter 模块', !modstart_module_enabled('PayCenter')); goto BF6z4; uJFCo: $WZ8dY = InputPackage::buildFromInput(); goto nntZi; YgxRv: BizException::throwsIf('金额最少为0.01元', $MgvDM < 0.01); goto REaMF; VJ7QS: $HsIf6 = ModelUtil::insert('member_money_charge_order', array('status' => OrderStatus::WAIT_PAY, 'memberUserId' => MemberUser::id(), 'money' => $MgvDM)); goto SffsF; KrIXt: return $Ubb8m->performSubmitOrder(MemberMoneyChargePayCenterBiz::NAME, $HsIf6['id'], $HsIf6['money'], '钱包充值'); goto gL1gd; nntZi: $MgvDM = $WZ8dY->getDecimal('money'); goto YgxRv; REaMF: BizException::throwsIf('金额最大为1,000,000元', $MgvDM > 1000000); goto VJ7QS; gL1gd: } }