/** * 生成随即数码并生成图片 * */ public function GetVerifyCode($name) { header("Cache-Control: no-cache, must-revalidate"); header("Pragma: no-cache"); header("content-type: image/png"); $randnum = $this->_randomCode(5); WeFlex_Session::Set($name, $randnum); $image = @imagecreate(55, 20); $background_color = imagecolorallocate($image, 250, 250, 250); $gray_color = imagecolorallocate($image, 100, 100, 100); imagestring($image, 18, 5, 5, $randnum, $gray_color); imagepng($image); imagedestroy($image); }
public function payOrder($orderId, $params = null) { $orderEntity = $this->_getOrder($orderId); $param = $this->_generPaypalParam($orderEntity); try { $rtn = $this->_paypal->pay($param); //pay key WeFlex_Session::Set("paypal-adaptive-pay-key", $rtn["payKey"]); WeFlex_Session::Set("order_id", $orderId); $this->_logAdaptive($orderId, $rtn["payKey"]); $this->_paypal->redirect($rtn); } catch (Exception $ex) { $this->_logErrorPayment($orderId, TCVM_Payment_Imple::PAYMENT_PAYPAL_ADAPTIVE, $ex->getMessage()); throw $ex; } return $rtn; }
private function _setSession($user) { $userStr = serialize($user); WeFlex_Session::Set(self::SESSION_NAME_SPACE, $userStr); }
private function _setShippingSession($data) { WeFlex_Session::Set(self::SESSION_SHIPPING, serialize($data)); }
protected function _setSession($user) { $userStr = serialize($user); WeFlex_Session::Set(self::SESSION_KEY, $userStr); }
/** * if user accept, it will request a access token * */ public function afterAuthority() { $this->_accessToken = $this->_consumer->getAccessToken($_GET, unserialize(WeFlex_Session::Get(self::SESSION_REQUEST_TOKEN))); WeFlex_Session::Set(self::SESSION_ACCESS_TOKEN, serialize($this->_accessToken)); return $this->_accessToken; }
private function _setSession($step, $data) { $cartSession = $this->_getSession(); $cartSession[$step] = $data; WeFlex_Session::Set(self::SESSION_CART, $cartSession); }