<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\PayCenter\Util; use ModStart\Core\Dao\ModelUtil; use ModStart\Core\Input\Response; use ModStart\Core\Util\RandomUtil; use ModStart\Core\Util\SerializeUtil; use ModStart\Core\Util\TimeUtil; use Module\PayCenter\Model\PayOrderQuick; use Module\PayCenter\Type\PayOrderQuickStatus; class PayOrderQuickUtil { public static function cleanHistory() { PayOrderQuick::query()->where('created_at', '<', date('Y-m-d H:i:s', time() - TimeUtil::PERIOD_DAY))->where(array('status' => PayOrderQuickStatus::CREATED))->delete(); } public static function create($g16tm, $w6bW5, $IN9gN = array()) { goto ZMZUr; EhH9E: $rhvmB = $v9Xk2['id'] . '_' . $v9Xk2['code']; goto yAgUK; Kvnia: $v9Xk2['expire'] = date('Y-m-d H:i:s', time() + TimeUtil::PERIOD_MINITE * 10); goto xnFa8; ePlAp: $RYQUX = modstart_web_full_url('api/pay/quick_watch', array('sn' => $rhvmB)); goto VD5Xg; A0N8n: $v9Xk2['session'] = SerializeUtil::jsonEncode($IN9gN, JSON_UNESCAPED_UNICODE); goto UK8rf; CBONI: return Response::generateSuccessData(array('payUrl' => $MbUgJ, 'watchUrl' => $RYQUX, 'payExpire' => $Jd4L6, 'payExpireSeconds' => $Jd4L6 - time())); goto zZKDY; xnFa8: $v9Xk2['status'] = PayOrderQuickStatus::NEW_ORDER; goto lsBEc; UK8rf: $v9Xk2 = ModelUtil::insert('pay_order_quick', $v9Xk2); goto EhH9E; lsBEc: $v9Xk2['biz'] = $g16tm; goto IMCzr; ZMZUr: $v9Xk2 = array(); goto NNaCr; IMCzr: $v9Xk2['param'] = SerializeUtil::jsonEncode($w6bW5, JSON_UNESCAPED_UNICODE); goto A0N8n; VD5Xg: $Jd4L6 = strtotime($v9Xk2['expire']); goto CBONI; sifvD: $v9Xk2['payType'] = null; goto Kvnia; yAgUK: $MbUgJ = modstart_web_full_url('pay/quick/' . $rhvmB); goto ePlAp; NNaCr: $v9Xk2['code'] = RandomUtil::string(10); goto sifvD; zZKDY: } }