mirror of
https://gitee.com/zoujingli/WeChatDeveloper.git
synced 2025-04-06 03:58:03 +08:00
[更新]修改支付宝支付及项目配置
This commit is contained in:
parent
d8a3b73f58
commit
fed0e83057
1
.gitignore
vendored
1
.gitignore
vendored
@ -4,4 +4,5 @@
|
|||||||
/vendor
|
/vendor
|
||||||
/Cache
|
/Cache
|
||||||
/Test/cert
|
/Test/cert
|
||||||
|
/nbproject
|
||||||
/composer.lock
|
/composer.lock
|
@ -196,8 +196,8 @@ abstract class BasicAliPay
|
|||||||
protected function getResult($options)
|
protected function getResult($options)
|
||||||
{
|
{
|
||||||
$this->applyData($options);
|
$this->applyData($options);
|
||||||
$data = json_decode(Tools::get($this->gateway, $this->options->get()), true);
|
|
||||||
$method = str_replace('.', '_', $this->options['method']) . '_response';
|
$method = str_replace('.', '_', $this->options['method']) . '_response';
|
||||||
|
$data = json_decode(Tools::get($this->gateway, $this->options->get()), true);
|
||||||
if (!isset($data[$method]['code']) || $data[$method]['code'] !== '10000') {
|
if (!isset($data[$method]['code']) || $data[$method]['code'] !== '10000') {
|
||||||
throw new \WeChat\Exceptions\InvalidResponseException(
|
throw new \WeChat\Exceptions\InvalidResponseException(
|
||||||
"Error: " .
|
"Error: " .
|
||||||
|
@ -148,10 +148,12 @@ class BasicWeChat
|
|||||||
try {
|
try {
|
||||||
return Tools::json2arr(Tools::get($url));
|
return Tools::json2arr(Tools::get($url));
|
||||||
} catch (InvalidResponseException $e) {
|
} catch (InvalidResponseException $e) {
|
||||||
if (!$this->isTry && in_array($e->getCode(), ['40014', '40001', '41001', '42001'])) {
|
if (isset($this->currentMethod['method']) && empty($this->isTry)) {
|
||||||
$this->delAccessToken();
|
if (in_array($e->getCode(), ['40014', '40001', '41001', '42001'])) {
|
||||||
$this->isTry = true;
|
$this->delAccessToken();
|
||||||
return call_user_func_array([$this, $this->currentMethod['method']], $this->currentMethod['arguments']);
|
$this->isTry = true;
|
||||||
|
return call_user_func_array([$this, $this->currentMethod['method']], $this->currentMethod['arguments']);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
throw new InvalidResponseException($e->getMessage(), $e->getCode());
|
throw new InvalidResponseException($e->getMessage(), $e->getCode());
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user