<?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($SgTr3, $coASI, $qOrzw = array()) { goto v_jyV; Zr9Wy: MemberMoneyUtil::change($HsIf6['memberUserId'], $HsIf6['money'], '钱包充值'); goto otzs5; LUX6B: if ($HsIf6['status'] !== OrderStatus::WAIT_PAY) { return; } goto FBEeZ; v_jyV: $HsIf6 = ModelUtil::get('member_money_charge_order', $SgTr3); goto LUX6B; FBEeZ: ModelUtil::update('member_money_charge_order', $SgTr3, array('status' => OrderStatus::COMPLETED)); goto Zr9Wy; otzs5: } public function createOrderForQuick($tdo8n, $qOrzw = array()) { goto cGWg1; vD4Ko: return Response::generateSuccessData(array('bizId' => $HsIf6['id'], 'feeTotal' => $MgvDM, 'body' => '钱包充值', 'param' => array(), 'redirect' => modstart_web_url('member_money'))); goto V2t9T; yVe6n: $MgvDM = $tdo8n['param']['money']; goto oEjHk; vZIJS: $HsIf6 = ModelUtil::insert('member_money_charge_order', array('status' => OrderStatus::WAIT_PAY, 'memberUserId' => $KJqKC, 'money' => $MgvDM)); goto vD4Ko; obh28: BizException::throwsIf('充值金额异常', $MgvDM < 0.01 || $MgvDM > 1000 * 10000); goto vZIJS; cGWg1: BizException::throwsIf('钱包充值未开启', !modstart_config('Member_MoneyChargeEnable', false)); goto eVOr1; eVOr1: $KJqKC = $tdo8n['session']['memberUserId']; goto yVe6n; oEjHk: BizException::throwsIfEmpty('用户ID为空', $KJqKC); goto obh28; V2t9T: } }