notifyAssociationResult
万里汇收到交易信息上传(submitTradeOrder)请求、处理请求后,会调用本接口发送结果通知。
接口结构
万里汇接口报文结构包括:请求头和请求体。
请求体参数
字段名  | 数据类型  | 是否必填  | 描述  | 
notifyRequestId  | 字符串  | 是  | 万里汇定义的交易信息上传结果通知编号 更多信息: 
  | 
extRequestId  | 字符串  | 是  | 集成商指定的交易信息上传请求编号 更多信息: 
  | 
associationResult  | Result 对象  | 是  | 交易信息上传结果  | 
notificationType  | 字符串  | 否  | 标识风控审核结果或交易单关联结果的维度。 可选值为以下之一: 
  | 
referenceOrderNo  | 字符串  | 否(有使用条件)  | 集成商提交的订单参考编号。 当notificationType =  更多信息: 
  | 
请求处理
在请求报文中:
associationResult.resultCode:代表交易信息上传结果,具体参见结果码 AssociationResult 部分。
- 注:集成商调用 submitTradeOrder 接口后,万里汇后续订单创建、订单关联和审核订单操作均为异步操作。上述异步任务过程中,由于订单或者入帐单变化(如入帐单已退款)导致的执行失败,无法通过重试恢复。集成商需更新订单信息、更换reqeustId,重新调用 submitTradeOrder 接口进行交易信息上传。
 
在收到万里汇的请求之后,电商端需要向万里汇发送响应信息,以确认信息已收到。
发送响应信息前,需要正确加签。
头信息包括:
响应头参数  | 是否必填  | 范例  | 
Signature  | 是  | Signature: algorithm=RSA256, keyVersion=2, signature=****  | 
Content-Type  | 是  | Content-Type: application/json; charset=UTF-8  | 
Client-Id  | 是  | Client-Id: ****  | 
Response-Time  | 是  | Response-Time: 2019-04-04T12:08:56+08:00  | 
范例响应体:
{
  "result":{
     "resultStatus":"S",
     "resultCode":"SUCCESS",
     "resultMessage":"success"
  }
}如果电商端不向万里汇发送响应信息,万里汇会重新发送请求通知。万里汇重发通知的规则为:
- 重试总数:7次
 - 两次重发请求之间的间隔:2分钟,10分钟,10分钟,1小时,2小时,6小时,15小时
 
响应参数
字段名  | 数据类型  | 是否必填  | 描述  | 
result  | Result 对象  | 是  | 代表接口调用结果  | 
结果码
AssociationResult.resultCode
resultCode  | resultStatus  | resultMessage  | resultMessage中文含义  | 处理建议  | 
ASSOCIATION_FAILED  | F  | Invalid parameter exists (wrong data type, wrong data length, or unspecified parameter).  | 参数异常,包括字段类型或字段长度异常,字段未填充  | 修改订单或关联信息,更换订单 reqeustId,发起重试。  | 
Invalid amount parameter exists.  | 参数金额异常  | 修改订单或关联信息,更换订单 reqeustId,发起重试。  | ||
tradeType values are inconsistent for trade orders.  | 参数贸易类型不一致  | 修改订单或关联信息,更换订单 reqeustId,发起重试。  | ||
Abnormal collection order.  | 入账单状态异常  | 已退款的入账单无法发起订单批量同步和订单关联。 确认该入账单处于入账成功状态。  | ||
 Access denied.  | 没有操作权限  | 无法进行订单批量同步和订单关联。联系万里汇技术支持,咨询具体原因。  | ||
tradeType of trade order is not supported.  | 订单贸易类型不支持  | 该类型订单无法进行交易信息上传和订单关联。 联系万里汇技术支持,咨询具体原因。  | ||
 Abnormal trade order exists.  | 订单状态异常  | 订单状态异常,联系万里汇技术支持,咨询具体原因。  | ||
The number of associated trade orders exceeds limit.  | 订单关联条数超过上限  | 修改订单同步条数,更换订单reqeustId,发起重试。  | ||
The intended association amount is incorrect.  | 关联金额异常  | 修改订单关联金额,更换订单reqeustId,发起重试。 注:不可修改已上传成功的订单金额  | ||
tradeType values are inconsistent for partial associations of the same collection order.  | 订单再次部分关联时和历史关联订单贸易类型不一致  | 修改订单类型后,更换订单reqeustId,发起重试。  | ||
An internal system error has occurred. Do not retry.  | 系统内部异常,请勿重试  | 联系万里汇技术支持以解决该问题。  | ||
ORDER_SUBMISSION_FAILED  | F  | Invalid parameter exists (wrong data type, wrong data length, or unspecified parameter).  | 参数异常,包括字段类型或字段长度异常,字段未填充  | 修改订单或关联信息,更换订单 reqeustId,发起重试。  | 
Invalid amount parameter exists.  | 参数金额异常  | 修改订单或关联信息,更换订单 reqeustId,发起重试。  | ||
tradeType values are inconsistent for trade orders.  | 参数贸易类型不一致  | 修改订单或关联信息,更换订单 reqeustId,发起重试。  | ||
Abnormal collection order.  | 入账单状态异常  | 已退款的入账单无法发起订单批量同步和订单关联。 确认该入账单处于入账成功状态。  | ||
 Access denied.  | 没有操作权限  | 无法进行订单批量同步和订单关联。联系万里汇技术支持,咨询具体原因。  | ||
tradeType of trade order is not supported.  | 订单贸易类型不支持  | 该类型订单无法进行交易信息上传和订单关联。 联系万里汇技术支持,咨询具体原因。  | ||
 Abnormal trade order exists.  | 订单状态异常  | 订单状态异常,联系万里汇技术支持,咨询具体原因。  | ||
The number of associated trade orders exceeds limit.  | 订单关联条数超过上限  | 修改订单同步条数,更换订单reqeustId,发起重试。  | ||
The intended association amount is incorrect.  | 关联金额异常  | 修改订单关联金额,更换订单reqeustId,发起重试。 注:不可修改已上传成功的订单金额  | ||
tradeType values are inconsistent for partial associations of the same collection order.  | 订单再次部分关联时和历史关联订单贸易类型不一致  | 修改订单类型后,更换订单reqeustId,发起重试。  | ||
An internal system error has occurred. Do not retry.  | 系统内部异常,请勿重试  | 联系万里汇技术支持以解决该问题。  | ||
VERIFICATION_DENIED  | F  | The verification has been denied.  | 审核结果拒绝  | 本次订单同步失败,无法通过修改订单内容再次重试。 联系万里汇技术支持以解决该问题。  | 
ADDITIONAL_FILE_NEEDED  | F  | Additional file is needed for the verification.  | 审核结果需补件  | 本次订单同步需要补件。登录WF网站,人工补充材料。  | 
VERIFICATION_PASSED  | S  | The verification has passed.  | 审核结果通过  | 
Result.resultCode
resultCode  | resultStatus  | resultMessage  | 
SUCCESS  | S  | Success  | 
PROCESS_FAIL  | F  | A general business failure occurred. Do not retry.  | 
PARAM_ILLEGAL  | F  | Illegal parameters exist. For example, a non-numeric input, or an invalid date.  | 
INVALID_API  | F  | The called API is invalid or not active.  | 
INVALID_CLIENT  | F  | The client is invalid.  | 
INVALID_SIGNATURE  | F  | The signature is invalid.  | 
METHOD_NOT_SUPPORTED  | F  | The server does not implement the requested HTTP method.  | 
UNKNOWN_EXCEPTION  | U  | The API call is failed, which is caused by unknown reasons.  | 
示例代码
请求体范例
{
  "associationResult": {
    "resultCode": "*****",
    "resultMessage": "****",
    "resultStatus": "S"
  },
  "extRequestId": "****",
  "notifyRequestId": "****"
}响应体范例
{
  "result": {
    "resultStatus": "S",
    "resultCode": "SUCCESS",
    "resultMessage": "success."
  }
}