支付宝刷脸完善

This commit is contained in:
张雪 2025-06-17 15:46:22 +08:00
parent 5a411843b5
commit 1634084aea
1 changed files with 5 additions and 0 deletions

View File

@ -69,9 +69,11 @@ public class AliScanFaceServiceImpl implements IAliScanFaceService {
String json = params.toJSONString(); String json = params.toJSONString();
String service_code = AliFaceConstants.SMILEVERIFYNIN_V1; //调用的组件编码:初始化 String service_code = AliFaceConstants.SMILEVERIFYNIN_V1; //调用的组件编码:初始化
Result<Object> startServiceIniResult = this.startServiceIni(json, service_code); Result<Object> startServiceIniResult = this.startServiceIni(json, service_code);
log.info("[AliScanFaceServiceImpl][aliFacePay][72][调用ABCP调用刷脸的结果] {}", startServiceIniResult.toString());
if (startServiceIniResult.isSuccess()) { if (startServiceIniResult.isSuccess()) {
Map<String, String> res = (Map<String, String>) startServiceIniResult.getResult(); Map<String, String> res = (Map<String, String>) startServiceIniResult.getResult();
String ftoken = res.get("ftoken"); String ftoken = res.get("ftoken");
log.info("[AliScanFaceServiceImpl][aliFacePay][76][调用ABCP调用刷脸的结果的ftoken] {}", ftoken.toString());
/** /**
* 2调用后端的支付宝统一收单交易支付接口存入hisPay * 2调用后端的支付宝统一收单交易支付接口存入hisPay
@ -80,12 +82,15 @@ public class AliScanFaceServiceImpl implements IAliScanFaceService {
JSONObject serverParams = (JSONObject) JSON.toJSON(aliOrderVo); JSONObject serverParams = (JSONObject) JSON.toJSON(aliOrderVo);
String url = serverUrl + "openapi/aliPayOrderApi/createOrder"; String url = serverUrl + "openapi/aliPayOrderApi/createOrder";
log.info("[AliScanFaceServiceImpl][aliFacePay][85][调用后端的支付宝统一收单交易支付接口路径] {}", serverUrl);
log.info("[AliScanFaceServiceImpl][aliFacePay][85][调用后端的支付宝统一收单交易支付接口参数] {}", serverParams.toJSONString());
String req = HttpRequest.post(url) String req = HttpRequest.post(url)
.header(Header.CONTENT_TYPE, ContentType.JSON.toString(CharsetUtil.CHARSET_UTF_8)) .header(Header.CONTENT_TYPE, ContentType.JSON.toString(CharsetUtil.CHARSET_UTF_8))
.body(serverParams.toJSONString()) .body(serverParams.toJSONString())
.execute() .execute()
.body(); .body();
JSONObject serverResult = JSONObject.parseObject(req); JSONObject serverResult = JSONObject.parseObject(req);
log.info("[AliScanFaceServiceImpl][aliFacePay][93][调用后端的支付宝统一收单交易支付接口结果] {}", serverResult.toString());
return Result.ok(serverResult); return Result.ok(serverResult);
} else { } else {