Authored by Rock Zhang

将存储的uid的session键名提取出来

... ... @@ -17,6 +17,8 @@ class NoticeController extends WebAction
const LOG_LEVEL = 2;
// 向回调通知有关调用日志
const ORDER_STATUS_LOG = '/Data/logs/pc_pay/order_status';
// 存储的UID键名
const SESSION_UID_KEY = 'payUserid';
/**
* 支付宝后台服务器返回,主要是用于补单
... ... @@ -368,7 +370,8 @@ class NoticeController extends WebAction
//判断是否登录
$uid = $this->getUid();
if (empty($uid)) { // cookie中获取为空时再从之前保存的session中获取
$uid = $this->getSession('payUserid');
$uid = $this->getSession(self::SESSION_UID_KEY);
$this->setSession(self::SESSION_UID_KEY, null);
}
$log->LogInfo('================已登录,获取到用户ID============');
... ...
... ... @@ -15,6 +15,10 @@ use LibModels\Web\Home\UserData;
*/
class PayController extends WebAction
{
// 存储的UID键名
const SESSION_UID_KEY = 'payUserid';
/**
* 订单已完成,跳到支付
*/
... ... @@ -26,7 +30,7 @@ class PayController extends WebAction
$this->go( Helpers::url('/signin.html', array('refer' => $this->server('HTTP_REFERER', SITE_MAIN))) );
}
// 将用户UID存入session中以便支付成功回调使用
$this->setSession('payUserid', $uid);
$this->setSession(self::SESSION_UID_KEY, $uid);
// 订单号
$orderCode = $this->get('order_code', $this->get('ordercode'));
... ...