1.設置沙箱環境參數
https://openhome.alipay.com/platform/appDaily.htm?tab=info
用沙箱環境提供的
appid,api(網關https://openapi.alipaydev.com/gateway.do),設置RSA2(SHA256)密鑰,這里的密鑰可用支付寶提供的密鑰生成工具
2.填寫回調地址,本地接口即可
3.下載沙箱錢包(選擇)
4.拼寫授權鏈接,用pc瀏覽器或其他打開,使用沙箱賬號,登錄
https://openauth.alipaydev.com/oauth2/publicAppAuthorize.htm?app_id=xxxxxxxx&scope=auth_user&redirect_uri=http:127.0.0.1:8000/third-user/test
注意:scope為auth_user時,支付寶小程序后台接口才可以用accesstoken換取用戶信息