How to open a specific PayPal link in the PayPal iOS app from my iOS app

佐手、 提交于 2020-01-03 20:10:28

问题


I have an http PayPal URL with some parameters that leads to a payment page for some item.
E.g. https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=foobar@fakeserver.com&item_name=Some+item&amount=2.50 leads to the page for this dummy item with parameters item_name="Some item" and amount="2.50".

All I need to do is open that page in the iOS PayPal app - from my iOS app. Just like you would open a Facebook page in the Facebook app with "fb://page?id=%@". I don't need to implement any PayPal functions in my app or get any data back from it, so I don't think I need the PayPal iOS SDK or any other API.

The PayPal app URL scheme is paypal://xxx, but I don't know what goes after it. I've been searching for a whole day now with no results whatsoever. All I know is that
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"paypal://anything"]]
opens the PayPal app, but it just shows the home/previous view. I have no idea how to open any specific page.


回答1:


Dave from PayPal here.

@user282378 you should open that URL just as it is, with its https:// URL scheme. I.e., the URL will open in Safari.

The PayPal app does indeed support a paypal:// URL scheme. However this URL scheme is intended only for certain limited PayPal usage. It is not a general-purpose scheme for use by non-PayPal apps.



来源:https://stackoverflow.com/questions/30264363/how-to-open-a-specific-paypal-link-in-the-paypal-ios-app-from-my-ios-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!