Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ios9 can't trigger payOrder's callback #2

Closed
justwezzz opened this issue Sep 29, 2015 · 7 comments
Closed

ios9 can't trigger payOrder's callback #2

justwezzz opened this issue Sep 29, 2015 · 7 comments

Comments

@justwezzz
Copy link

ios9 can't trigger payOrder's callback,i try to add
<key>LSApplicationQueriesSchemes</key> <array> <string>alipay</string> </array>
to info.plist , but not work.

@charleyw
Copy link
Owner

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.

@justwezzz
Copy link
Author

your code is missing😨

@charleyw
Copy link
Owner

Updated, do you speak Chinese?

@charleyw
Copy link
Owner

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.

@justwezzz
Copy link
Author

好的,我有空去试试,感谢。(其实chinglish挺带感的)

@pluswave
Copy link

可以支付,但是有这个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"

@charleyw
Copy link
Owner

这个是因为更新了ios9之后ios9的url scheme使用有变化。我之后会push更新后的版本

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants