简体   繁体   中英

paypal integration for android and iOS, possible?

in our apps, (versions for both OS), we want to allow the user to pay for subscription. my app is being developed in Titanium for iOS, and native for android.

can i integrate paypal payments from them?? is posible?

or the solutions is redirect to a web-app (in safari mobile) to make payment, and then redirect to app?? i dont know if we can implement this as a "native" experience, using titanium+addons and paypal mobile sdk api.

if someone have experience, please show me some light....

Using anything apart from Google Wallet as an in app Payment system on Android is a breach of the Google terms of service, so no

This is the Resolution for Paypal (Sandbox) Error "589023" in iPhone Application

-(void)payWithPayPal{

PayPal *payPal=[PayPal getPayPalInst];

payPal.shippingEnabled = FALSE;

payPal.dynamicAmountUpdateEnabled = NO;

payPal.feePayer = FEEPAYER_EACHRECEIVER;

PayPalPayment *payment = [[[PayPalPayment alloc] init] autorelease];

payment.recipient = @"adn.reddy@witinnovation.com";//mail id of the paypal account

payment.paymentCurrency = @"USD";

payment.description = @"Payment Discription here...";

payment.merchantName =@"Y S Rajashekar Reddy]; 

payment.invoiceData = [[[PayPalInvoiceData alloc] init] autorelease];

payment.invoiceData.invoiceItems = [NSMutableArray array];   

PayPalInvoiceItem *item = [[PayPalInvoiceItem alloc] init];


item.totalPrice=[NSDecimalNumber decimalNumberWithString:[NSString stringWithFormat:@"%.2f", 126.34545]]; // If u give xxx.xx , no need to give the %.2f , u can give directly %f

    item.name = @"Any Name";

    item.itemId = @"Item ID";


    [payment.invoiceData.invoiceItems addObject:item];

    [item release];
}



payment.subTotal = [NSDecimalNumber decimalNumberWithString:[NSString stringWithFormat:@"%.2f",126.34545]]; //Total and Subtotal must be equal

payment.invoiceData.totalTax = [NSDecimalNumber decimalNumberWithString:[NSString stringWithFormat:@"%.2f",3.34]];

NSLog(@"Total Tax is :%@",[payment.invoiceData.totalTax stringValue]);

[payPal checkoutWithPayment:payment];
}

Here the total and subtotal and Tax allows only two digits after the.(dot) Ex: (234.xx). So by using the %.2f to work perfectly.

yes, it is possible to integrate PayPal mechanism in iOS. Click here to see code for integrating PayPal in iOS Paypal integration in iOS

Yes,paypal integration is possible in android as well as iPhone.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM