Closed justwezzz closed 8 years ago
you may should using following.
<key>CFBundleURLSchemes</key>
<array>
<string>demoScheme</string>
</array>
And also you should not use alipay as your scheme, since it's for alipay. You should define another string for your application.
And then you can call:
window.alipay.pay({
tradeNo: tradeNo,
subject: "测试标题",
body: "我是测试内容",
price: 0.02,
fromUrlScheme: "demoScheme://afterPaymentSuccess",
notifyUrl: "http://your.server.notify.url"
});
it will open the url in demoScheme(here the name you should define for your application) application.
your code is missing😨
Updated, do you speak Chinese?
You can try to use this plugin to configure your application scheme. https://github.com/EddyVerbruggen/Custom-URL-scheme
I'm using this one in my application.
好的,我有空去试试,感谢。(其实chinglish挺带感的)
可以支付,但是有这个LOG,不是到是否有关系
2015-10-20 17:20:34.636 paytest[2712:1681712] -canOpenURL: failed for URL: "alipay://" - error: "This app is not allowed to query for scheme alipay"
2015-10-20 17:20:34.649 paytest[2712:1681712] -canOpenURL: failed for URL: "cydia://" - error: "This app is not allowed to query for scheme cydia"
2015-10-20 17:20:34.653 paytest[2712:1681712] -canOpenURL: failed for URL: "safepay://" - error: "This app is not allowed to query for scheme safepay"
这个是因为更新了ios9之后ios9的url scheme使用有变化。我之后会push更新后的版本
ios9 can't trigger payOrder's callback,i try to add `LSApplicationQueriesSchemes