add clear

This commit is contained in:
as2252258@163.com
2019-09-04 14:08:01 +08:00
parent c9d0f86620
commit 09776fc906
2 changed files with 22 additions and 19 deletions
+1 -1
View File
@@ -151,7 +151,7 @@ class Recharge extends Miniprogarampage
$this->request->setCallback(function ($data) { $this->request->setCallback(function ($data) {
$array = Help::toArray($data); $array = Help::toArray($data);
if ($array['result_code'] != 'SUCCESS') { if ($array['result_code'] != 'SUCCESS') {
$data = ['code' => 500, 'message' => $array['err_code_des']]; $data = ['code' => $array['err_code'], 'message' => $array['err_code_des']];
} else { } else {
$data = ['code' => 0, 'message' => '支付成功']; $data = ['code' => 0, 'message' => '支付成功'];
} }
+3
View File
@@ -91,6 +91,9 @@ class Result
public function isResultsOK() public function isResultsOK()
{ {
if (!is_numeric($this->code)) {
return false;
}
return $this->code == 0; return $this->code == 0;
} }