簡體   English   中英

PayPal API:如何將其集成到我的應用程序中? IOS5

[英]PayPal API : How to integrate it in my App? IOS5

我一直在檢查PayPal API並得到這個,一個webView顯示一個非常好的界面,通過PayPal支付,事情是:我不知道如何修改它,以顯示幾個項目(此示例只涉及一個)並在應用程序上顯示它們(如果您已經使用它,您可能已經意識到它只是說“當前購買”,我認為這還不夠)。

我一直在使用測試帳戶作為買家,但在現實生活中,我如何將錢存入我的帳戶? 我的意思是,如果你看到代碼和應用程​​序,它會說誰支付和相對多少,但它沒有說明在哪里或向誰。

如果有人知道它可以幫助我,請。

PD:關於它沒有一個好的教程,這是一種恥辱。

來自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 - >簡單付款應用程序 - >復制和粘貼 - >修改它 - >工作精細。

如果有人像我一樣迷失(和我),請告知並發布一些代碼。

謝謝

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM