charleyw / cordova-plugin-alipay

Cordova支付宝插件,cordova alipay plugin
175 stars 75 forks source link

ios9 can't trigger payOrder's callback #2

Closed justwezzz closed 8 years ago

justwezzz commented 8 years ago

ios9 can't trigger payOrder's callback,i try to add `LSApplicationQueriesSchemes

alipay ` to info.plist , but not work.
charleyw commented 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.

justwezzz commented 8 years ago

your code is missing😨

charleyw commented 8 years ago

Updated, do you speak Chinese?

charleyw commented 8 years ago

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 commented 8 years ago

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

pluswave commented 8 years ago

可以支付,但是有这个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 commented 8 years ago

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