|
@@ -501,7 +501,7 @@ class Wechat
|
|
|
*/
|
|
|
public function getRevScanInfo(){
|
|
|
if (isset($this->_receive['ScanCodeInfo'])){
|
|
|
- if (!is_array($this->_receive['SendPicsInfo'])) {
|
|
|
+ if (!is_array($this->_receive['ScanCodeInfo'])) {
|
|
|
$array=(array)$this->_receive['ScanCodeInfo'];
|
|
|
$this->_receive['ScanCodeInfo']=$array;
|
|
|
}else {
|
|
@@ -1208,7 +1208,7 @@ class Wechat
|
|
|
if (!$appid) $appid = $this->appid;
|
|
|
if ($jsapi_ticket) { //手动指定token,优先使用
|
|
|
$this->jsapi_ticket = $jsapi_ticket;
|
|
|
- return $this->access_token;
|
|
|
+ return $this->jsapi_ticket;
|
|
|
}
|
|
|
$authname = 'wechat_jsapi_ticket'.$appid;
|
|
|
if ($rs = $this->getCache($authname)) {
|
|
@@ -3210,18 +3210,18 @@ class Prpcrypt
|
|
|
{
|
|
|
public $key;
|
|
|
|
|
|
+ function __construct($k) {
|
|
|
+ $this->key = base64_decode($k . "=");
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
- * 兼容老版本php构造函数
|
|
|
+ * 兼容老版本php构造函数,不能在 __construct() 方法前边,否则报错
|
|
|
*/
|
|
|
function Prpcrypt($k)
|
|
|
{
|
|
|
$this->key = base64_decode($k . "=");
|
|
|
}
|
|
|
|
|
|
- function __construct($k) {
|
|
|
- $this->key = base64_decode($k . "=");
|
|
|
- }
|
|
|
-
|
|
|
/**
|
|
|
* 对明文进行加密
|
|
|
* @param string $text 需要加密的明文
|