无意间看到的一片文章,就是这个里边这个思路真是感叹,所谓的黑魔法都是看透了技术的本质!下面是连接👉https://www.jianshu.com/p/8930b4496023
就像在咱们iOS中要想唤起其他的app,是通过url scheme实现的比如微信的weixin://,所以各种需要唤起其他app的支付,分享的本质就是拼接出一个三方平台的app内定的url scheme,所以就像上边文章说的,生死看淡,不服就干!!!要什么SDK
//生成URLscheme
NSString *str = [NSString stringWithFormat:@"weixin://app/%@/pay/?nonceStr=%@&package=Sign%%3DWXPay&partnerId=%@&prepayId=%@&timeStamp=%@&sign=%@&signType=SHA1",appid,nonceStr,partnerId,prepayId,[NSString stringWithFormat:@"%d",[timeStamp intValue] ],sign];
//通过openURL的方法唤起支付界面
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:str]];
还有就是他这个,抓微信url scheme的思路,一下点醒梦中人!!!还有就是微信他这url scheme 万一变了,额~~
以下几个可以自测试试看:(微信可能换了url scheme或者加参数判断吧,也就第一个唤醒好使,😓)
weixin://
"weixin://dl/stickers"
"weixin://dl/games"
"weixin://dl/moments"
"weixin://dl/add"
"weixin://dl/shopping"
"weixin://dl/groupchat"
"weixin://dl/scan"
"weixin://dl/profile"
"weixin://dl/settings"
"weixin://dl/general"
"weixin://dl/help"
"weixin://dl/notifications"
"weixin://dl/terms"
"weixin://dl/chat"
"weixin://dl/features"
"weixin://dl/clear"
"weixin://dl/feedback"
"weixin://dl/faq"
"weixin://dl/recommendation"
"weixin://dl/groups"
"weixin://dl/tags"
"weixin://dl/officialaccounts"
"weixin://dl/posts"
"weixin://dl/favorites"
"weixin://dl/privacy"
"weixin://dl/security"
"weixin://dl/wallet"
"weixin://dl/businessPay"
"weixin://dl/businessPay/"
"weixin://dl/wechatout"
"weixin://dl/protection"
"weixin://dl/card"
"weixin://dl/about"
"weixin://dl/blacklist"
"weixin://dl/textsize"
"weixin://dl/sight"
"weixin://dl/languages"
"weixin://dl/chathistory"
"weixin://dl/bindqq"
"weixin://dl/bindmobile"
"weixin://dl/bindemail"
"weixin://dl/securityassistant"
"weixin://dl/broadcastmessage"
"weixin://dl/setname"
"weixin://dl/myQRcode"
"weixin://dl/myaddress"
"weixin://dl/hidemoments"
"weixin://dl/blockmoments"
"weixin://dl/stickersetting"
"weixin://dl/log"
"weixin://dl/wechatoutcoupon"
"weixin://dl/login/phone_view"
"weixin://dl/login/common_view"
"weixin://dl/businessPay"
"weixin://dl/businessTempSession/"
"weixin://dl/businessGame/detail/"
"weixin://dl/businessGame/detail"
"weixin://dl/businessGame/library/"
"weixin://dl/businessGame/library"
"weixin://dl/businessWebview/link/"
"weixin://dl/businessWebview/link"
"weixin://dl/business/tempsession/"
"weixin://dl/businessTempSession/"
"weixin://dl/business"
"weixin://dl/wechatout"
"weixin://dl/update_newest_version"
"weixin://dl/moments"
"weixin://dl/recommendation"
支付宝跳过开启动画打开扫码和付款码的 url scheme 分别是
alipayqr://platformapi/startapp?saId=10000007
alipayqr://platformapi/startapp?saId=20000056
网友评论