eee
This commit is contained in:
+18
-1
@@ -25,7 +25,24 @@ class Account extends SmallProgram
|
||||
$param['js_code'] = $code;
|
||||
$param['grant_type'] = 'authorization_code';
|
||||
|
||||
return $this->get('/sns/jscode2session', $param);
|
||||
return $this->get('api.q.qq.com', '/sns/jscode2session', $param);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $code
|
||||
* @return Result
|
||||
*/
|
||||
public function appLogin(string $code): Result
|
||||
{
|
||||
$param['appid'] = $this->payConfig->appId;
|
||||
$param['secret'] = $this->payConfig->appSecret;
|
||||
$param['js_code'] = $code;
|
||||
$param['grant_type'] = 'authorization_code';
|
||||
|
||||
$this->host = 'graph.qq.com';
|
||||
|
||||
return $this->get('api.q.qq.com', '/user/get_user_info', $param);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+1
-1
@@ -51,7 +51,7 @@ class Recharge extends SmallProgram
|
||||
$this->orderNo = $orderNo;
|
||||
$this->data['openid'] = $openId;
|
||||
|
||||
return $this->post($this->uniformer, $this->builder(), 'application/xml');
|
||||
return $this->post('api.q.qq.com', $this->uniformer, $this->builder(), 'application/xml');
|
||||
}
|
||||
|
||||
|
||||
|
||||
+7
-8
@@ -299,11 +299,10 @@ class Redhat extends SmallProgram
|
||||
{
|
||||
$client = new Client('api.qpay.qq.com', 443, true);
|
||||
$client->withHeader(['Content-Type' => 'application/x-www-form-urlencoded']);
|
||||
$client->withSslKeyFile($this->payConfig->getSslKey());
|
||||
$client->withSslCertFile($this->payConfig->getSslCert());
|
||||
$client->withCa($this->payConfig->getSslCa());
|
||||
$proxyHost = $this->getConfig()->getProxyHost();
|
||||
$proxyPort = $this->getConfig()->getProxyPort();
|
||||
$client->withSslKeyFile($this->payConfig->pay->wx->mchKey);
|
||||
$client->withSslCertFile($this->payConfig->pay->wx->mchCert);
|
||||
$proxyHost = $this->payConfig->getProxyHost();
|
||||
$proxyPort = $this->payConfig->getProxyPort();
|
||||
if (!empty($proxyHost) && $proxyPort > 0) {
|
||||
$client->withProxyHost($proxyHost)->withProxyPort($proxyPort);
|
||||
}
|
||||
@@ -332,15 +331,15 @@ class Redhat extends SmallProgram
|
||||
public function searchByOrderNo($listid, $orderNo = null): Result
|
||||
{
|
||||
$requestParam['nonce_str'] = Help::random(31);
|
||||
$requestParam['mch_id'] = $this->payConfig->getMchId();
|
||||
$requestParam['mch_id'] = $this->payConfig->pay->wx->mchId;
|
||||
$requestParam['listid'] = $listid;
|
||||
if (!empty($orderNo)) {
|
||||
$requestParam['mch_billno'] = $orderNo;
|
||||
}
|
||||
$requestParam['sign'] = $this->builderSign($requestParam);
|
||||
$client = new Client('qpay.qq.com', 443, true);
|
||||
$proxyHost = $this->getConfig()->getProxyHost();
|
||||
$proxyPort = $this->getConfig()->getProxyPort();
|
||||
$proxyHost = $this->payConfig->getProxyHost();
|
||||
$proxyPort = $this->payConfig->getProxyPort();
|
||||
if (!empty($proxyHost) && $proxyPort > 0) {
|
||||
$client->withProxyHost($proxyHost)->withProxyPort($proxyPort);
|
||||
}
|
||||
|
||||
+3
-3
@@ -35,7 +35,7 @@ class SecCheck extends SmallProgram
|
||||
'form-data[filename]' => $path,
|
||||
'form-data[content-type]' => $real_path->getMimeType()
|
||||
];
|
||||
return $this->upload($path, $data);
|
||||
return $this->upload('api.q.qq.com', $this->_url, $data);
|
||||
}
|
||||
|
||||
|
||||
@@ -48,9 +48,9 @@ class SecCheck extends SmallProgram
|
||||
if (empty($content)) {
|
||||
return $this->sendError('文件不存在', 404);
|
||||
}
|
||||
$url = '/' . ltrim($this->_url, '/') . $this->payConfig->getAccessToken();
|
||||
$url = '/' . ltrim($this->_msgUrl, '/') . $this->payConfig->getAccessToken();
|
||||
|
||||
return $this->post($url, ['appid' => $this->payConfig->appId, 'content' => $content]);
|
||||
return $this->post('api.q.qq.com', $url, ['appid' => $this->payConfig->appId, 'content' => $content]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ class Token extends SmallProgram
|
||||
'appid' => $this->payConfig->appId,
|
||||
'secret' => $this->payConfig->appSecret
|
||||
];
|
||||
return $this->get('/api/getToken', $query);
|
||||
return $this->get('api.q.qq.com', '/api/getToken', $query);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user