我一直在检查 PayPal API 并得到这个,一个显示通过 PayPal 支付的非常好的界面的 webView,问题是:我不知道如何修改它以显示多个项目(仅此示例涉及一个)并将它们显示在应用程序上(如果您使用过它,您可能已经意识到它只说“当前购买”,我认为这还不够)。
我一直在使用测试账户作为买家,但在现实生活中,我怎样才能把钱打到我的账户上?我的意思是,如果您看到代码和应用程序,它会说明谁付款以及相对多少,但它没有说明在哪里或向谁付款。
请知道的 friend 帮帮我。
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];
}
最佳答案
我已经通过他们的 MPL 库将 PayPal 集成到我的应用程序中,我发现这是最有趣的。似乎我没有有意识地查看 PayPal 网站(尽管我仍然觉得它很困惑)。
MPL -> 简单支付应用程序 -> 复制和粘贴 -> 修改它 -> 工作正常。
如果有人和我一样迷路(现在),请告知并发布一些代码。
谢谢
关于ios - Paypal API : How to integrate it in my App? IOS5,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8584063/