贝宝API:如何在我的应用程序将其集成? IOS5 [英] PayPal API : How to integrate it in my App? IOS5

查看:129
本文介绍了贝宝API:如何在我的应用程序将其集成? IOS5的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在围绕贝宝API检查和得到这个,展现了相当不错的接口,通过贝宝支付网页视图,事情是:我不知道如何只修改它,以示几个项目(该样本涉及一个),并在应用中展示它们(如果​​您使用它,你可能已经意识到这只是说目前购买,我认为这是不够的)。

我一直在使用作为买家的测试帐户,但在现实生活中,我怎么能得到的钱到我的帐户?我的意思是,如果你看到code和应用,它说谁支付和相对多少,但它并没有说在哪里或谁。

请,如果有人知道一些事情帮助我。

Pd积:有没有关于它的一个很好的教程,可惜

从贝宝的例子:

(在我的ViewController):

 (无效){的loadView
    [超级的loadView]    一个UIWebView * aWebView = [[UIWebView的页头] initWithFrame:方法CGRectMake(0,00,320450);
    aWebView.scalesPageToFit = YES;
    [aWebView setDelegate:个体经营];    * NSString的项目= @胶;
    NSInteger的量= 1;    * NSString的itemParameter = @ITEMNAME =;
    itemParameter = [itemParameter stringByAppendingString:项目];    * NSString的amountParameter = @金额=;
    amountParameter = [amountParameter stringByAppendingFormat:@%D,数量];    * NSString的urlString = @http://haifa.baluyos.net/dev/PayPal/SetEx$p$pssCheckout.php?
    urlString = [urlString stringByAppendingString:amountParameter];
    urlString = [urlString stringByAppendingString:@&放大器;];
    urlString = [urlString stringByAppendingString:itemParameter];    //创建一个URL对象。
    NSURL * URL = [NSURL URLWithString:urlString];    // URL Requst对象
    *的NSURLRequest = requestObj [的NSURLRequest requestWithURL:URL]    //网址加载到网络视图。
    [aWebView的loadRequest:requestObj];    //[self.view addSubview:myLabel];
    [self.view addSubview:aWebView];
    [aWebView发布]
}


解决方案

我通过自己的MPL库,这是我发现的最有意思的集成贝宝在我的应用程序。看来我没有在PayPal网站有意识的样子(我觉得这仍然是pretty混乱虽然)。

MPL - >简单付款应用程序 - >复制和放大器;粘贴 - >修改它 - >正常工作

如果有一个人因为失去了,因为我是(和我)让知道,将发布一些code。

感谢

I have been checking around the PayPal API and got this, a webView displaying a quite nice interface to pay through PayPal, the thing is : I don´t know how to modify it in order to show several items (this sample only involves one) and display them on the app ( if you have used it you may have realized it only says "current purchase" and I think it is not enough ).

I have been using testing accounts as a buyer but in the real life , how can I get the money to my account? I mean , if you see the code, and the app, it says Who pays and relatively how much but it does not say where or to whom.

Please, if somebody knows something about it help me out.

P.D: There is not a good tutorial about it, a shame.

A sample from a PayPal:

(in my 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];
}

解决方案

I have integrated PayPal in my app through their MPL library, which I found the most interesting. It seems I did not have a conscious look at the PayPal website ( I still find it pretty confusing though ).

MPL -> Simple Payment App -> Copy&paste -> Modifying it -> WORKS FINE.

if there is someone as lost as I was ( and am ) let know and will post some code.

Thanks

这篇关于贝宝API:如何在我的应用程序将其集成? IOS5的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆