diff --git a/alipay/Aliverify.php b/alipay/Aliverify.php index e9dcb66..36695f2 100644 --- a/alipay/Aliverify.php +++ b/alipay/Aliverify.php @@ -64,17 +64,11 @@ class Aliverify $data['certify_id'] = $certify_id; $tosign=json_encode($data); $request->setBizContent($tosign); - $result = $aop->pageExecute ($request,"get"); + $result = $aop->pageExecute($request,"GET"); - var_dump($result); - - $responseNode = str_replace(".", "_", $request->getApiMethodName()) . "_response"; - $resultCode = $result->$responseNode->code; - if(!empty($resultCode)&&$resultCode == 10000){ - echo "成功"; - } else { - echo "失败"; - } + $res['certifyId'] = $certify_id; + $res['url'] = $result; + return $res; } else { echo "失败"; } diff --git a/app/api/controller/Test.php b/app/api/controller/Test.php index 21dd711..3195903 100644 --- a/app/api/controller/Test.php +++ b/app/api/controller/Test.php @@ -11,7 +11,10 @@ class Test public function aliverify() { - Aliverify::initVerify(); + $data = Aliverify::initVerify(); + $data = $data; + echo json_encode($data); + die; } } \ No newline at end of file