<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Member\Core; use ModStart\Core\Dao\ModelUtil; use ModStart\Core\Exception\BizException; use ModStart\Core\Input\Response; use Module\Member\Util\MemberMoneyUtil; use Module\PayCenter\Biz\AbstractPayCenterBiz; use Module\PayCenter\Type\PayType; use Module\Vendor\Type\OrderStatus; class MemberMoneyChargePayCenterBiz extends AbstractPayCenterBiz { const NAME = 'mMemberMoneyCharge'; public function name() { return self::NAME; } public function title() { return '用户钱包充值'; } public function disabledPayTypes() { return array(PayType::MEMBER_MONEY); } public function onPayed($XAAs3, $cThPi, $EPwwc = array()) { goto PkK3q; HutAk: if ($KWG9l['status'] !== OrderStatus::WAIT_PAY) { return; } goto EzPHi; EzPHi: ModelUtil::update('member_money_charge_order', $XAAs3, array('status' => OrderStatus::COMPLETED)); goto FTU8d; PkK3q: $KWG9l = ModelUtil::get('member_money_charge_order', $XAAs3); goto HutAk; FTU8d: MemberMoneyUtil::change($KWG9l['memberUserId'], $KWG9l['money'], '钱包充值'); goto SJaMT; SJaMT: } public function createOrderForQuick($BnixC, $EPwwc = array()) { goto nepaj; G8F5k: $KWG9l = ModelUtil::insert('member_money_charge_order', array('status' => OrderStatus::WAIT_PAY, 'memberUserId' => $d4RRw, 'money' => $oLfec)); goto xe0ry; nepaj: BizException::throwsIf('钱包充值未开启', !modstart_config('Member_MoneyChargeEnable', false)); goto TKD9y; Jeo12: $oLfec = $BnixC['param']['money']; goto Gq_Ti; xe0ry: return Response::generateSuccessData(array('bizId' => $KWG9l['id'], 'feeTotal' => $oLfec, 'body' => '钱包充值', 'param' => array(), 'redirect' => modstart_web_url('member_money'))); goto HVdb3; TKD9y: $d4RRw = $BnixC['session']['memberUserId']; goto Jeo12; P4Cbg: BizException::throwsIf('充值金额异常', $oLfec < 0.01 || $oLfec > 1000 * 10000); goto G8F5k; Gq_Ti: BizException::throwsIfEmpty('用户ID为空', $d4RRw); goto P4Cbg; HVdb3: } }