Skip to main content

1-移动端-加密URL对接

1.方案说明#

科技公司通过带有加密参数的URL跳转到京东健康购物商城;京东健康对参数验证以及解密后会展示相应页面;
跳转URL:https://xxx&lpzfParam=加密后的密文
url前缀(XXX):京东提供;每个渠道一个专属url;
完整url示例

https://pro.m.jd.com/jdhdyf/active/2FSCPNgiFDY3xwKU3d2AzsDmorLp/index.html?utm_source=kong&utm_medium=tuiguang&utm_campaign=t_1003188492_100003&activityPlace=1597979905901&channelNo=10114717431431169&lpzfParam=密文 

加密秘钥:京东下发;
加密算法:AES [AES/CBC/PKCS5Padding] 
加密算法说明文档(SDK请参考附录文件):  https://open.healthjd.com/docs/接入指南/开放平台-加解密说明

2.业务参数#

该内容需要加密成密文,然后作为lpzfParam的参数值传入京东健康

字段名字段描述必填类型备注
cardNo渠道卡号String[50]唯一且只能同一个人使用
cardType渠道卡类型String[50]根据业务场景,多类卡片则需传入
cardType2渠道卡类型2String[50]根据业务场景,多类卡片则需传入
userId渠道用户IDString[60]渠道平台唯一用户标识
token渠道tokenString[256]选填
userName用户姓名String[50]
userPhone用户电话String[50]
timestamp时间戳(10分钟有效)String[20]格式:yyyy-MM-dd HH:mm:ss
requestId接口请求IDString[32]每次请求都不可重复

3.参数示例#

3.1 业务参数加密前(标准JSON格式)#

{"cardNo":"N10034103234321","cardType":"SUB0001","userId":"U00001","token":"XXXXXXX","userName":"张三","userPhone":"13322232288","timestamp":"2022-01-11 22:23:11","requestId":"20211123190910342323"}

3.2 业务参数加密后#

示例:(加密逻辑请参考:https://open.healthjd.com/docs/接入指南/开放平台-加解密说明 )

MLyyPLAYrtsMYptk4K0xwKzHLcGFwn1g9VqSu/xYlHL8lHsZQOQ/QYDT/j4grYn2e9gcwUjsBHQlw1SclLacXshHV2V6pGPHiuJxWwlweFQEIZUWXdVmHQ4t+UxRYGfGsxVD/1hByhzvL3mmk4au8LOYTehH8vmFUZPebsn/zb+Ftxer3bQL/g2FRj8N/MUSNfp30YuJXRdNMRbeeBKUS8/wJ04XKR5YEJwFdjFJw50uzjYPBrVj1erGAl1ULa2b8eIwAyGHsC3zJRZZ2Usn/7aF4L5O+0FPzZ4vbN5yWy10BIrFdQBecVBWPBVyoy/wxdHh9rJ9V+98T7mDLcRItiFUZNYN5JfMtRlwKziPjtxRTJTGe8kKreNPZ4yHHLj7Qqz3k6VTsjhF8ah/G8Lrrw==

3.3 密文urlEncode编码#

编码后示例(密文存在网络特殊字符,需要进行urlEncode编码):

MLyyPLAYrtsMYptk4K0xwKzHLcGFwn1g9VqSu%2FxYlHL8lHsZQOQ%2FQYDT%2Fj4grYn2e9gcwUjsBHQlw1SclLacXshHV2V6pGPHiuJxWwlweFQEIZUWXdVmHQ4t%2BUxRYGfGsxVD%2F1hByhzvL3mmk4au8LOYTehH8vmFUZPebsn%2Fzb%2BFtxer3bQL%2Fg2FRj8N%2FMUSNfp30YuJXRdNMRbeeBKUS8%2FwJ04XKR5YEJwFdjFJw50uzjYPBrVj1erGAl1ULa2b8eIwAyGHsC3zJRZZ2Usn%2F7aF4L5O%2B0FPzZ4vbN5yWy10BIrFdQBecVBWPBVyoy%2FwxdHh9rJ9V%2B98T7mDLcRItiFUZNYN5JfMtRlwKziPjtxRTJTGe8kKreNPZ4yHHLj7Qqz3k6VTsjhF8ah%2FG8Lrrw%3D%3D

3.4 带加密参数的完整H5链接(H5环境可直接跳转)#

完整请求链接示例

https://pro.m.jd.com/jdhdyf/active/2FSCPNgiFDY3xwKU3d2AzsDmorLp/index.html?utm_source=kong&utm_medium=tuiguang&utm_campaign=t_1003188492_100003&activityPlace=1597979905901&channelNo=10114717431431169&lpzfParam=MLyyPLAYrtsMYptk4K0xwKzHLcGFwn1g9VqSu%2FxYlHL8lHsZQOQ%2FQYDT%2Fj4grYn2e9gcwUjsBHQlw1SclLacXshHV2V6pGPHiuJxWwlweFQEIZUWXdVmHQ4t%2BUxRYGfGsxVD%2F1hByhzvL3mmk4au8LOYTehH8vmFUZPebsn%2Fzb%2BFtxer3bQL%2Fg2FRj8N%2FMUSNfp30YuJXRdNMRbeeBKUS8%2FwJ04XKR5YEJwFdjFJw50uzjYPBrVj1erGAl1ULa2b8eIwAyGHsC3zJRZZ2Usn%2F7aF4L5O%2B0FPzZ4vbN5yWy10BIrFdQBecVBWPBVyoy%2FwxdHh9rJ9V%2B98T7mDLcRItiFUZNYN5JfMtRlwKziPjtxRTJTGe8kKreNPZ4yHHLj7Qqz3k6VTsjhF8ah%2FG8Lrrw%3D%3D

3.5 小程序方案(若是小程序环境需以下处理)#

小程序APPID:wx862d8e26109609cb
小程序名称:京东健康
小程序页面路径: pages/login/wv-common/wv-common?h5_url=将带加密参数的完整H5链接整体encode后拼接到这里