ios - Paypal API : How to integrate it in my App? IOS5

标签 ios api paypal

我一直在检查 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/

相关文章:

azure - 如何使用 Microsoft 图表和 PowerShell 过滤登录并获取特定用户的身份验证要求?

reactjs - PayPal 仅显示部分启用资金值的付款选项

ios - 是否可以获取表格 View 滚动方向并获取最底部单元格的索引路径?

ios - 在 UIPickerView 中更改选定行的颜色,滚动时也是如此

php - 从访问 token 获取 Facebook 用户(PHP SDK 3.0.1)

javascript - 在另一个数组中的数组中搜索对象的最佳/最有效方法是什么?

testing - 在不更改代码的情况下对 Paypal DoExpressCheckoutPayment 进行负面测试

paypal - 如何访问 Paypal Express Checkout 的响应?

javascript - Cordova/Phonegap oauth.io 弹出窗口未显示

ios - 启用分页功能的 ScrollView 从左到右滚动 - iOS