...
|
...
|
@@ -72,19 +72,22 @@ public class CustomsSupportService { |
|
|
|
|
|
try{
|
|
|
AlipayCustomsResponse alipayCustomsResponse = crossBorderService.customsOpenApi(buyerOrder.getOrderCode(),
|
|
|
ordersPay.getSerialNo(), ordersPay.getAmount().doubleValue(), zhimaCert.getCertName(), zhimaCert.getCertNo());
|
|
|
ordersPay.getSerialNo(), buyerOrder.getAmount().doubleValue(), zhimaCert.getCertName(), zhimaCert.getCertNo());
|
|
|
|
|
|
String identityCheck = null;
|
|
|
String errorCode = null;
|
|
|
String resultCode = null;
|
|
|
|
|
|
// response/alipay 结构不一定存在
|
|
|
if (alipayCustomsResponse.getResponse() != null && alipayCustomsResponse.getResponse().getAlipay() != null){
|
|
|
identityCheck = alipayCustomsResponse.getResponse().getAlipay().getIdentity_check();
|
|
|
errorCode = alipayCustomsResponse.getResponse().getAlipay().getDetail_error_code();
|
|
|
resultCode = alipayCustomsResponse.getResponse().getAlipay().getResult_code();
|
|
|
}
|
|
|
|
|
|
// 推送失败 || 下单人和支付人不一致
|
|
|
if ("F".equalsIgnoreCase(alipayCustomsResponse.getIs_success()) || "F".equalsIgnoreCase(identityCheck)){
|
|
|
// 推送失败(验签错误) || result_code=FAIL || 下单人和支付人不一致
|
|
|
if ("F".equalsIgnoreCase(alipayCustomsResponse.getIs_success()) || "FAIL".equalsIgnoreCase(resultCode)
|
|
|
|| "F".equalsIgnoreCase(identityCheck)){
|
|
|
|
|
|
String error = StringUtils.isEmpty(errorCode) ? alipayCustomsResponse.getError() : errorCode;
|
|
|
|
...
|
...
|
|