|
|
package com.yohoufo.user.service.impl;
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alipay.api.AlipayClient;
|
|
|
import com.alipay.api.DefaultAlipayClient;
|
|
|
import com.alipay.api.request.ZhimaCustomerCertificationCertifyRequest;
|
...
|
...
|
@@ -75,9 +76,9 @@ public class ZhiMaCallUtil { |
|
|
//String bizContent=JSON.toJSONString(jo);
|
|
|
request.setBizContent(bizContent);
|
|
|
|
|
|
logger.info("zhi ma cert init begin request is {} ",request);
|
|
|
logger.info("zhi ma cert init begin request is {} ",JSON.toJSONString(request));
|
|
|
ZhimaCustomerCertificationInitializeResponse response = alipayClient.execute(request);
|
|
|
logger.info("zhi ma cert init end response {}",response);
|
|
|
logger.info("zhi ma cert init end response {}", JSON.toJSONString(response));
|
|
|
|
|
|
if (response.isSuccess()) {
|
|
|
logger.info("zhi ma cert init end ,call success ");
|
...
|
...
|
@@ -120,11 +121,11 @@ public class ZhiMaCallUtil { |
|
|
// alipay://www.taobao.com 或者 alipays://www.taobao.com,分别对应http和https请求
|
|
|
request.setReturnUrl("yohobuyufo://www.yohobuy.com/ufo?pagename=NameAuth&");
|
|
|
|
|
|
logger.info("zhi ma cert url begin ,request {} ",request);
|
|
|
logger.info("zhi ma cert url begin ,request {} ",JSON.toJSONString(request));
|
|
|
// 这里一定要使用GET模式
|
|
|
ZhimaCustomerCertificationCertifyResponse response = alipayClient.pageExecute(request, "GET");
|
|
|
|
|
|
logger.info("zhi ma cert url end ,response {} " ,response);
|
|
|
logger.info("zhi ma cert url end ,response {} " ,JSON.toJSONString(response));
|
|
|
// 从body中获取URL
|
|
|
String url = response.getBody();
|
|
|
return url;
|
...
|
...
|
@@ -159,7 +160,7 @@ public class ZhiMaCallUtil { |
|
|
|
|
|
logger.info("zhi ma result begin ,request {} ",request);
|
|
|
response = alipayClient.execute(request);
|
|
|
logger.info("zhi ma result end ,response {} ",response);
|
|
|
logger.info("zhi ma result end ,response {} ",JSON.toJSONString(response));
|
|
|
return response;
|
|
|
|
|
|
}catch (Exception e){
|
...
|
...
|
|