0

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];
}
Toto
  • 89,455
  • 62
  • 89
  • 125
Roberto
  • 155
  • 4
  • 13
  • As far as I know Apple doesn't allow you to provide payment systems other than in app purchases. So if you would provide a way to pay using PayPal your app will probably be rejected by Apple. – Mark Dec 21 '11 at 02:25
  • @Mark i dont think so .. you can use your own payment systems if you wish, the in app purchase system is apples way of making it easier for the devs and ofcourse a way for them to take a cut.. but if you want to have paypal or any other payment system in your app im pretty sure its not against app store rules – Daniel Dec 21 '11 at 03:03
  • Based on other threads Paypal is allowed. – Roberto Dec 21 '11 at 20:03

1 Answers1

2

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

Roberto
  • 155
  • 4
  • 13
  • Hi Roberto, I am facing the same issue. I want to use this library for donation and payment purpose. But I am not getting that how to get it done. Please guide me .... Thanks – Omer Waqas Khan Jul 29 '12 at 11:45
  • what part are you stuck in? I may help you . I have my project quite advanced. Explain a bit. – Roberto Aug 19 '12 at 13:45