<?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 d0c4X; GZflE: BizException::throwsIf('金额最大为1,000,000元', $k92oI > 1000000); goto bDDmx; epvA2: $Km8YS = InputPackage::buildFromInput(); goto EokCv; d0c4X: BizException::throwsIf('钱包充值未开启', !modstart_config('Member_MoneyChargeEnable', false)); goto epvA2; AvIWH: $eQyQ4 = app(PayCenterPerform::class); goto B0QGK; bDDmx: $v9Xk2 = ModelUtil::insert('member_money_charge_order', array('status' => OrderStatus::WAIT_PAY, 'memberUserId' => MemberUser::id(), 'money' => $k92oI)); goto MjJna; EokCv: $k92oI = $Km8YS->getDecimal('money'); goto X7F77; B0QGK: return $eQyQ4->performSubmitOrder(MemberMoneyChargePayCenterBiz::NAME, $v9Xk2['id'], $v9Xk2['money'], '钱包充值'); goto Aputq; X7F77: BizException::throwsIf('金额最少为0.01元', $k92oI < 0.01); goto GZflE; MjJna: BizException::throwsIf('请安装 PayCenter 模块', !modstart_module_enabled('PayCenter')); goto AvIWH; Aputq: } }