Can I use PayPal in iPhone / iPad apps?

I am working on an application through which I want to sell tickets for events.

Can I use PayPal for this purpose, and Apple will approve the application using another that StoreKit Framework.

I searched this topic, but I cannot find any possible solution.

Some searches claim that paypal can be used, while another says that Apple never approves the application using a payment gateway other than inAppPurchase.

Please help me!

+4
source share
5 answers

Despite the existence of an API that exists to integrate Paypal on the iPhone, but according to Apple's recommendations, he does not approve such applications for his AppStore. See Chapter 11.3 of the Apple Rules here https://developer.apple.com/appstore/resources/approval/guidelines.html

+1
source

Yes ... You can use PayPal with your application. You can see the full documentation at the link below ....

https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/library_documentation#mobile

Add the following code to your .h file

#import "PayPal.h" #import "PayPalList.h" typedef enum PaymentStatuses { PAYMENTSTATUS_SUCCESS, PAYMENTSTATUS_FAILED, PAYMENTSTATUS_CANCELED, } PaymentStatus; 

Implement this delegate method "PayPalPaymentDelegate"

 PayPalList *payPalList; PaymentStatus status; 

Add the following code to your .m file

 #import "PayPalPayment.h" #import "PayPalAdvancedPayment.h" #import "PayPalAmounts.h" #import "PayPalReceiverAmounts.h" #import "PayPalAddress.h" #import "PayPalInvoiceItem.h" #define SPACING 3. - (void)ButtonWithType:(PayPalButtonType)type withAction:(SEL)action { UIButton *btnPayWithPayPal = [[PayPal getInstance] getPayButtonWithTarget:self andAction:action andButtonType:type]; CGRect frame; frame.origin.x = 60; frame.origin.y = 315; frame.size.width = 304; frame.size.height = 40; btnPayWithPayPal.frame = frame; [self.view addSubview:btnPayWithPayPal]; } - (void)viewDidLoad { [self ButtonWithType:BUTTON_194x37 withAction:@selector(simplePayment)]; } #pragma mark - #pragma mark PayPalPaymentDelegate methods - (void)paymentSuccessWithKey:(NSString *)payKey andStatus:(PayPalPaymentStatus)paymentStatus { status = PAYMENTSTATUS_SUCCESS; } - (void)paymentFailedWithCorrelationID:(NSString *)correlationID andErrorCode:(NSString *)errorCode andErrorMessage:(NSString *)errorMessage { status = PAYMENTSTATUS_FAILED; } - (void)paymentCanceled { status = PAYMENTSTATUS_CANCELED; } - (void)paymentLibraryExit { UIAlertView *alert = nil; switch (status) { case PAYMENTSTATUS_SUCCESS: break; case PAYMENTSTATUS_FAILED: alert = [[UIAlertView alloc] initWithTitle:@"Order failed" message:@"Your order failed. Touch \"Pay with PayPal\" to try again." delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil]; break; case PAYMENTSTATUS_CANCELED: alert = [[UIAlertView alloc] initWithTitle:@"Order canceled" message:@"You canceled your order. Touch \"Pay with PayPal\" to try again." delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil]; break; } [alert show]; [alert release]; } - (PayPalAmounts *)adjustAmountsForAddress:(PayPalAddress const *)inAddress andCurrency:(NSString const *)inCurrency andAmount:(NSDecimalNumber const *)inAmount andTax:(NSDecimalNumber const *)inTax andShipping:(NSDecimalNumber const *)inShipping andErrorCode:(PayPalAmountErrorCode *)outErrorCode { //do any logic here that would adjust the amount based on the shipping address PayPalAmounts *newAmounts = [[[PayPalAmounts alloc] init] autorelease]; newAmounts.currency = @"USD"; newAmounts.payment_amount = (NSDecimalNumber *)inAmount; //change tax based on the address /*if ([inAddress.state isEqualToString:@"CA"]) { newAmounts.tax = [NSDecimalNumber decimalNumberWithString:[NSString stringWithFormat:@"%.2f",[inAmount floatValue] * .1]]; } else { newAmounts.tax = [NSDecimalNumber decimalNumberWithString:[NSString stringWithFormat:@"%.2f",[inAmount floatValue] * .08]]; } newAmounts.shipping = (NSDecimalNumber *)inShipping;*/ //if you need to notify the library of an error condition, do one of the following //outErrorCode = AMOUNT_ERROR_SERVER; //outErrorCode = AMOUNT_ERROR_OTHER; return newAmounts; } #pragma mark - #pragma mark Actions triggered by Pay with PayPal buttons - (void)simplePayment { //optional, set shippingEnabled to TRUE if you want to display shipping //options to the user, default: TRUE [PayPal getInstance].shippingEnabled = TRUE; //optional, set dynamicAmountUpdateEnabled to TRUE if you want to compute //shipping and tax based on the user address choice, default: FALSE [PayPal getInstance].dynamicAmountUpdateEnabled = TRUE; //optional, choose who pays the fee, default: FEEPAYER_EACHRECEIVER [PayPal getInstance].feePayer = FEEPAYER_EACHRECEIVER; //for a payment with a single recipient, use a PayPalPayment object PayPalPayment *payment = [[[PayPalPayment alloc] init] autorelease]; payment.recipient = [NSString stringWithFormat:@"%@",payPalList.strRecipientPayPalId]; payment.paymentCurrency = [NSString stringWithFormat:@"%@",e_commerceAppDelegate.strProductCurrency]; payment.merchantName = [NSString stringWithFormat:@"%@",payPalList.strPayPalMerchantName]; payment.ipnUrl = [NSString stringWithFormat:@"%@",payPalList.strIpnUrl]; //subtotal of all items, without tax and shipping payment.subTotal = [NSDecimalNumber decimalNumberWithString:stringsubtotal]; //invoiceData is a PayPalInvoiceData object which contains tax, shipping, and a list of PayPalInvoiceItem objects payment.invoiceData = [[[PayPalInvoiceData alloc] init] autorelease]; //invoiceItems is a list of PayPalInvoiceItem objects //NOTE: sum of totalPrice for all items must equal payment.subTotal //NOTE: example only shows a single item, but you can have more than one payment.invoiceData.invoiceItems = [NSMutableArray array]; PayPalInvoiceItem *item = [[[PayPalInvoiceItem alloc] init] autorelease]; item.totalPrice = payment.subTotal; //int i=0; for(i=0 ; i<[e_commerceAppDelegate.cartList count] ; i++) { cart = (Cart*)[e_commerceAppDelegate.cartList objectAtIndex:i]; item.name = cart.proName; item.itemCount = [NSNumber numberWithInteger:cart.quantity]; NSString *itemSingPrice = [NSString stringWithFormat:@"%.2f",cart.price]; item.itemPrice = [NSDecimalNumber decimalNumberWithString:itemSingPrice]; NSString *itemSubTotal = [NSString stringWithFormat:@"%.2f",cart.quantity*cart.price]; item.totalPrice = [NSDecimalNumber decimalNumberWithString:itemSubTotal]; [payment.invoiceData.invoiceItems addObject:item]; item = [[[PayPalInvoiceItem alloc] init] autorelease]; } NSScanner* scanner = [NSScanner localizedScannerWithString:e_commerceAppDelegate.strDeliveryCharges]; NSDecimal decimal; [scanner scanDecimal:&decimal]; NSDecimalNumber *decimalNumber = [NSDecimalNumber decimalNumberWithDecimal:decimal]; payment.invoiceData.totalShipping = decimalNumber; [[PayPal getInstance] checkoutWithPayment:payment]; } 

From the links you can get an idea about PayPal

https://www.x.com/community/ppx/xspaces/mobile/mep

https://www.x.com/docs/DOC-2532

https://cms.paypal.com/cms_content/US/en_US/files/developer/IPNGuide.pdf

https://cms.paypal.com/cms_content/US/en_US/files/developer/PP_MPL_Developer_Guide_and_Reference_Android.pdf

https://www.x.com/thread/45094

https://www.x.com/message/193751#193751

http://googlecheckout.blogspot.com/2010/06/pay-on-go-with-android-payment.html

https://chrome.google.com/webstore/detail/omomllobcfbllglbhpmafongpckhdcdn

Thanx ....

+16
source

Well, I think it depends.

Although I was sure that Apple would not allow anything other than In-App-Purchases, I do know at least one application in the German application store that allows you to buy movie theater tickets in the application. They offer credit card payments and a number of other services; IAP is not even available.

They somehow got into the store, so I suggest you talk to Apple in advance and find out if they approve of your business model or not.

Perhaps they approve of other payment methods if the purchase consists of 100% of the objects or services of the real world and does not change the behavior or contents of the application itself.

0
source

No, you can’t. The store review guide that every iOS application must meet in order to pass Apple clearly states: - you are not allowed to use a β€œsystem other than the application purchase API (IAP) to purchase content, functionality or services” for payment (11.2) - not permitted "we [e] IAP to acquire physical goods or goods and services used outside the application"

Indeed, for this purpose there is an API from Paypal , but, as mentioned above, applications using it will not pass the Overview.

0
source

Perhaps, but the Appstore will not allow the use of the PayPal API, as far as I know. The way to do this is to send the user to a website that will process the payment. You can use the PHP API here.

-1
source

All Articles