"399190910000387", //商户编号 "ordNo"=> time(), //商户订单号 //下面三个至少传一个 "origOrderNo"=> "", //原商户订单号 "origUuid"=> "", //原交易科技公司订单号 "origSxfUuid"=> "", //正交易落单号 "amt"=> "88.88", //正交易落单号 // "notifyUrl"=> "", //回调推送地址,用来接收科技公司的异步推送 "refundReason"=> "退货", //退货原因 "extend"=> "" //备用 ]; $reqBean = [ "orgId" =>"26680846", "reqData"=>$array, "reqId" => time(), "signType" => "RSA", "timestamp" => date("Y-m-d h:i:s"), "version" => "1.0", ]; $signContent = $aopClient->generateSign($reqBean,$privateKey); $sign =["sign" => $signContent]; $reqStr = array_merge($reqBean, $sign); $reqStr = json_encode($reqStr,320); $requestUrl = 'https://openapi-test.tianquetech.com/order/refund'; $resp = $aopClient->curl($requestUrl, $reqStr); $result = json_decode($resp,320); print_r($result); $signResult = $result["sign"]; // result.remove("sign"); unset($result["sign"]); // String resultStr = RSASignature.getOrderContent(result); //sign /// String resultSign = RSASignature.encryptBASE64(RSASignature.sign(signContent, privateKey)); $signContent = $aopClient->getSignContent($result); $verify = $aopClient->verify($signContent, $signResult,$sxfPublic); //组装加密串 if ($verify) { echo("验签成功"); }else{ echo("验签失败"); } ?>