|
@@ -72,19 +72,22 @@ public class CustomsSupportService { |
|
@@ -72,19 +72,22 @@ public class CustomsSupportService { |
72
|
|
72
|
|
73
|
try{
|
73
|
try{
|
74
|
AlipayCustomsResponse alipayCustomsResponse = crossBorderService.customsOpenApi(buyerOrder.getOrderCode(),
|
74
|
AlipayCustomsResponse alipayCustomsResponse = crossBorderService.customsOpenApi(buyerOrder.getOrderCode(),
|
75
|
- ordersPay.getSerialNo(), ordersPay.getAmount().doubleValue(), zhimaCert.getCertName(), zhimaCert.getCertNo());
|
75
|
+ ordersPay.getSerialNo(), buyerOrder.getAmount().doubleValue(), zhimaCert.getCertName(), zhimaCert.getCertNo());
|
76
|
|
76
|
|
77
|
String identityCheck = null;
|
77
|
String identityCheck = null;
|
78
|
String errorCode = null;
|
78
|
String errorCode = null;
|
|
|
79
|
+ String resultCode = null;
|
79
|
|
80
|
|
80
|
// response/alipay 结构不一定存在
|
81
|
// response/alipay 结构不一定存在
|
81
|
if (alipayCustomsResponse.getResponse() != null && alipayCustomsResponse.getResponse().getAlipay() != null){
|
82
|
if (alipayCustomsResponse.getResponse() != null && alipayCustomsResponse.getResponse().getAlipay() != null){
|
82
|
identityCheck = alipayCustomsResponse.getResponse().getAlipay().getIdentity_check();
|
83
|
identityCheck = alipayCustomsResponse.getResponse().getAlipay().getIdentity_check();
|
83
|
errorCode = alipayCustomsResponse.getResponse().getAlipay().getDetail_error_code();
|
84
|
errorCode = alipayCustomsResponse.getResponse().getAlipay().getDetail_error_code();
|
|
|
85
|
+ resultCode = alipayCustomsResponse.getResponse().getAlipay().getResult_code();
|
84
|
}
|
86
|
}
|
85
|
|
87
|
|
86
|
- // 推送失败 || 下单人和支付人不一致
|
|
|
87
|
- if ("F".equalsIgnoreCase(alipayCustomsResponse.getIs_success()) || "F".equalsIgnoreCase(identityCheck)){
|
88
|
+ // 推送失败(验签错误) || result_code=FAIL || 下单人和支付人不一致
|
|
|
89
|
+ if ("F".equalsIgnoreCase(alipayCustomsResponse.getIs_success()) || "FAIL".equalsIgnoreCase(resultCode)
|
|
|
90
|
+ || "F".equalsIgnoreCase(identityCheck)){
|
88
|
|
91
|
|
89
|
String error = StringUtils.isEmpty(errorCode) ? alipayCustomsResponse.getError() : errorCode;
|
92
|
String error = StringUtils.isEmpty(errorCode) ? alipayCustomsResponse.getError() : errorCode;
|
90
|
|
93
|
|