1. 获取产品调用token信息
请求URL:
https://openapi.unionpay.com/upapi/captcha/token?app_id=[value]&app_secret=[value]
应答JSON报文体:
{ “respCd”:“0000” “respMsg”:“成功” “token”:”fsddfssseessseee”, “expire_in”:7200 }
2. 注册应用
请求URL:
https://openapi.unionpay.com/upapi/captcha/regapp?token=[token]&sign=[sign]&ts=[ts]
请求JSON报文体:
{ "busAppId":"329f055063d990a22ddd53", “appId”:”up_jvcvcwl92f_yiizqm” }
应答JSON报文体:
{ “respCd”:”0000”, “respMsg”:”成功”, }
3. 初始化session
请求URL:
https://openapi.unionpay.com/upapi/captcha/initses?token=[token]&sign=[sign]&ts=[ts]
请求JSON报文体:
{ "busAppId":"329f055063d990a22ddd53", "appId":"up_jvcvcwl92f_yiizqm", "capType":"4", "userId":"XXXXX", "expiration":"30" }
应答JSON报文体:
{ “respCd”:”0000”, “respMsg”:”成功”, “data”: { "sesId":"0e31a62d8fc64ac79502e28df5557ec4" } }
4. 二次验证
请求URL:
https://openapi.unionpay.com/upapi/captcha/ensure?token=[token]&sign=[sign]&ts=[ts]
请求JSON报文体:
{ "sesId":"aUX2ds_xaQut03A", "token":"61cf50fb61ad7fda4446c6513b4a3930", "busAppId":"329f055063d990a22ddd53", "appId":"up_jvcvcwl92f_yiizqm" }
应答JSON报文体:
{ “respCd”:”0000”, “respMsg”:”成功” }