【发布时间】:2012-01-24 22:12:09
【问题描述】:
我一直在检查 PayPal API 并得到了这个,一个 webView 显示了一个通过 PayPal 支付的非常好的界面,问题是:我不知道如何修改它以显示几个项目(仅此示例涉及一个)并将它们显示在应用程序上(如果您使用过它,您可能已经意识到它只显示“当前购买”,我认为这还不够)。
我一直使用测试账户作为买家,但在现实生活中,我如何才能将钱存入我的账户?我的意思是,如果您看到代码和应用程序,它会显示谁支付以及相对支付多少,但它没有说明在哪里或向谁支付。
请,如果有人对此有所了解,请帮助我。
P.D:没有一个很好的教程,很遗憾。
来自 PayPal 的样本:
(在我的 ViewController 中):
(void) loadView {
[super loadView];
UIWebView *aWebView = [[UIWebView alloc] initWithFrame:CGRectMake(0, 00, 320,450)];
aWebView.scalesPageToFit = YES;
[aWebView setDelegate:self];
NSString *item = @"Gum";
NSInteger amount = 1;
NSString *itemParameter = @"itemName=";
itemParameter = [itemParameter stringByAppendingString:item];
NSString *amountParameter = @"amount=";
amountParameter = [amountParameter stringByAppendingFormat:@"%d",amount];
NSString *urlString = @"http://haifa.baluyos.net/dev/PayPal/SetExpressCheckout.php?";
urlString = [urlString stringByAppendingString:amountParameter];
urlString = [urlString stringByAppendingString:@"&"];
urlString = [urlString stringByAppendingString:itemParameter];
//Create a URL object.
NSURL *url = [NSURL URLWithString:urlString];
//URL Requst Object
NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
//load the URL into the web view.
[aWebView loadRequest:requestObj];
//[self.view addSubview:myLabel];
[self.view addSubview:aWebView];
[aWebView release];
}
【问题讨论】:
-
据我所知,Apple 不允许您提供除应用购买外的支付系统。因此,如果您提供一种使用 PayPal 支付的方式,您的应用可能会被 Apple 拒绝。
-
@Mark 我不这么认为.. 如果您愿意,您可以使用自己的支付系统,应用内购买系统是苹果让开发人员更轻松的方式,当然也是他们采取的一种方式削减.. 但如果你想在你的应用程序中使用 paypal 或任何其他支付系统,我很确定它不违反应用程序商店规则
-
基于其他线程Paypal是允许的。