承载协议 | 接口方向 | 接口URL | 数据格式 |
|---|---|---|---|
HTTPS POST | 华为钱包服务器->开发者服务器。 | 开发者在华为AGC网站上提供的回调地址。 |
|
Request Header:
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
HMSSignType | 是 | String | 签名方式。值为固定值:"SHA256WithRSA/PSS"。 |
HMSSign | 是 | String | 签名值 |
Request Body:
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
eventId | 是 | String(32) | 事件ID。 |
tagId | 是 | String(64) | 标签中的tagId。 |
eventTime | 是 | String(32) | 事件发生时间(UTC时间):"yyyy-MM-dd'T'HH:mm:ss:SSS'Z'"。 |
eventType | 是 | String(32) | 查询标签链接参数: 固定为“QUERY_TAG_PARAM”。 |
POST /walletkit/callback/notify HTTP/1.1 Content-Type: application/json;charset=utf-8 HMSSignType: SHA256WithRSA/PSS HMSSign: *** Accept: application/json;charset=utf-8 Host: partmer.host.com { "eventId": "0a1f133471c4102c8171f845919906f3", "tagId": "123", "eventTime": "2020-04-27T07:40:24.259Z", "eventType": "QUERY_TAG_PARAM" }
HTTP/1.1 200 OK Content-Type: application/json;charset=utf-8 { "returnCode": "0", "returnDesc": "success", "tagParam": "xxxx&xxxx" }
private BaseResponse callbackSp(CallbackRequest requestBody) { String priKey = "xxx"; Map<String, String> header = new HashMap<>(8); header.put("Content-Type", "application/json;charset=UTF-8"); header.put("Accept", "application/json;charset=UTF-8"); header.put("HMSSignType", "SHA256WithRSA/PSS"); String hmsSign = RSAUtils.signByRSA(ToStringUtil.signString(requestBody), priKey); header.put("HMSSign", hmsSign); HttpEntity<CallbackRequest> httpEntity = new HttpEntity(requestBody, header); return restful.postForObject(whiteCardCallbackTask.getCallbackUrl(), httpEntity, BaseResponse.class); }