移动端直接拉起支付宝转账,转账到银行卡和支付宝账户
作者:互联网
文章目录
移动端直接拉起支付宝转账,转账到银行卡和支付宝账户
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<title>支付宝跳转测试</title>
</head>
<body>
<button type="button" onclick="dianji()">转账到银行卡</button>
<button type="button" onclick="dianji2()">转账支付宝</button>
<script>
var carNo = '25653213213213',//银行卡(我瞎写的)
bankAccount = '张三',//持卡人姓名
userId = '2088812636593255',//支付宝userid
function dianji(){
location.href=`alipays://platformapi/startapp?appId=09999988&actionType=toCard&sourceId=bill&cardNo={$carNo}&bankAccount={$bankAccount}&money=1.00&amount=1.00&bankMark=ABC&bankName=中国农业银行`
}
function dianji2(){
location.href="alipays://platformapi/startapp?appId=09999988&actionType=toAccount&goBack=NO&amount=0.01&userId={$userId}&memo=备注"
}
</script>
</body>
</html>
以上的userid需要去电脑端登录支付宝,并且去支付宝的个人中心,按Ctrl+U打开源代码界面,搜索2088,能找到一串2088开头的userid
标签:转账,支付宝,银行卡,userid,bankAccount,userId 来源: https://blog.csdn.net/u011591179/article/details/114519535