1
|
package com.yohoufo.user.service.impl;
|
1
|
package com.yohoufo.user.service.impl;
|
2
|
|
2
|
|
|
|
3
|
+import com.alibaba.fastjson.JSON;
|
3
|
import com.alipay.api.AlipayClient;
|
4
|
import com.alipay.api.AlipayClient;
|
4
|
import com.alipay.api.DefaultAlipayClient;
|
5
|
import com.alipay.api.DefaultAlipayClient;
|
5
|
import com.alipay.api.request.ZhimaCustomerCertificationCertifyRequest;
|
6
|
import com.alipay.api.request.ZhimaCustomerCertificationCertifyRequest;
|
|
@@ -75,9 +76,9 @@ public class ZhiMaCallUtil { |
|
@@ -75,9 +76,9 @@ public class ZhiMaCallUtil { |
75
|
//String bizContent=JSON.toJSONString(jo);
|
76
|
//String bizContent=JSON.toJSONString(jo);
|
76
|
request.setBizContent(bizContent);
|
77
|
request.setBizContent(bizContent);
|
77
|
|
78
|
|
78
|
- logger.info("zhi ma cert init begin request is {} ",request);
|
79
|
+ logger.info("zhi ma cert init begin request is {} ",JSON.toJSONString(request));
|
79
|
ZhimaCustomerCertificationInitializeResponse response = alipayClient.execute(request);
|
80
|
ZhimaCustomerCertificationInitializeResponse response = alipayClient.execute(request);
|
80
|
- logger.info("zhi ma cert init end response {}",response);
|
81
|
+ logger.info("zhi ma cert init end response {}", JSON.toJSONString(response));
|
81
|
|
82
|
|
82
|
if (response.isSuccess()) {
|
83
|
if (response.isSuccess()) {
|
83
|
logger.info("zhi ma cert init end ,call success ");
|
84
|
logger.info("zhi ma cert init end ,call success ");
|
|
@@ -120,11 +121,11 @@ public class ZhiMaCallUtil { |
|
@@ -120,11 +121,11 @@ public class ZhiMaCallUtil { |
120
|
// alipay://www.taobao.com 或者 alipays://www.taobao.com,分别对应http和https请求
|
121
|
// alipay://www.taobao.com 或者 alipays://www.taobao.com,分别对应http和https请求
|
121
|
request.setReturnUrl("yohobuyufo://www.yohobuy.com/ufo?pagename=NameAuth&");
|
122
|
request.setReturnUrl("yohobuyufo://www.yohobuy.com/ufo?pagename=NameAuth&");
|
122
|
|
123
|
|
123
|
- logger.info("zhi ma cert url begin ,request {} ",request);
|
124
|
+ logger.info("zhi ma cert url begin ,request {} ",JSON.toJSONString(request));
|
124
|
// 这里一定要使用GET模式
|
125
|
// 这里一定要使用GET模式
|
125
|
ZhimaCustomerCertificationCertifyResponse response = alipayClient.pageExecute(request, "GET");
|
126
|
ZhimaCustomerCertificationCertifyResponse response = alipayClient.pageExecute(request, "GET");
|
126
|
|
127
|
|
127
|
- logger.info("zhi ma cert url end ,response {} " ,response);
|
128
|
+ logger.info("zhi ma cert url end ,response {} " ,JSON.toJSONString(response));
|
128
|
// 从body中获取URL
|
129
|
// 从body中获取URL
|
129
|
String url = response.getBody();
|
130
|
String url = response.getBody();
|
130
|
return url;
|
131
|
return url;
|
|
@@ -159,7 +160,7 @@ public class ZhiMaCallUtil { |
|
@@ -159,7 +160,7 @@ public class ZhiMaCallUtil { |
159
|
|
160
|
|
160
|
logger.info("zhi ma result begin ,request {} ",request);
|
161
|
logger.info("zhi ma result begin ,request {} ",request);
|
161
|
response = alipayClient.execute(request);
|
162
|
response = alipayClient.execute(request);
|
162
|
- logger.info("zhi ma result end ,response {} ",response);
|
163
|
+ logger.info("zhi ma result end ,response {} ",JSON.toJSONString(response));
|
163
|
return response;
|
164
|
return response;
|
164
|
|
165
|
|
165
|
}catch (Exception e){
|
166
|
}catch (Exception e){
|