找回密码
 立即注册

HTML页面引用JS 唤起支付宝授权登录

[复制链接]
发表于 2020-5-27 15:58:18 | 显示全部楼层 |阅读模式
苹果上架

发起支付宝APP登录
alipayLogin 支付宝登录
  1. jsBridge.alipayLogin({
  2.   //必须,字符串类型,授权请求参数
  3.   //构造方法:https://opendocs.alipay.com/open/218/105327
  4.   authInfo: "apiname=com.alipay.account.auth&....&sign=......"
  5. }, function(succ, result) {
  6.   if (succ) {
  7.     alert(JSON.stringify(result));
  8.   } else {
  9.     alert("登录失败或取消了登录\n" + JSON.stringify(result));
  10.   }
  11. });
  12. /*
  13. 回调参数 succ 为 true 表示授权成功,result 示例:
  14. {
  15.   resultStatus: "9000",
  16.   result: "success=true&auth_code=d9d1b5acc26e461dbfcb6974c8ff5E64&result_code=200&user_id=2088003646494707",
  17.   memo  : ""
  18. }
  19. • result 即为授权信息,请提交到您的服务器,调用支付宝服务器端接口获取 access_token 和用户信息,服务器端SDK:https://opendocs.alipay.com/open/54/103419 ;
  20. • resultStatus 状态码说明:https://opendocs.alipay.com/open/218/105327#%E7%8A%B6%E6%80%81%E7%A0%81%20result_status%20%E8%AF%B4%E6%98%8E

  21. */
复制代码







回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|一门开发者社区 ( 蜀ICP备17005078号-4 )

GMT+8, 2025-4-2 07:01 , Processed in 0.106650 second(s), 18 queries .

Powered by Discuz! X3.5

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表