From 23f753f688880d1538da5894b10dffccb3797c1b Mon Sep 17 00:00:00 2001 From: wyongk <937888580@qq.com> Date: Fri, 18 Dec 2020 16:24:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E4=BB=98=E5=AE=9D=E5=AE=9E=E5=90=8D?= =?UTF-8?q?=E8=AE=A4=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- alipay/Aliverify.php | 14 ++++---------- app/api/controller/Test.php | 5 ++++- 2 files changed, 8 insertions(+), 11 deletions(-) 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