I haven’t been able to get this working and all of the sample code seems deprecated. I’ve been able to update a lot of constants, but does anyone have any sample. I have a Sandbox App ID. So far I’ve added the library, :
@interface PaymentViewController ()
@property (weak, nonatomic) IBOutlet UIButton *paypalButton;
@end
- (void)viewDidLoad {
[super viewDidLoad];
// 1. spawn a new thread to initialize the paypal library
// TODO: spawn a new thread
[PayPal initializeWithAppID:SANDBOX_APP_ID forEnvironment:ENV_SANDBOX];
// 2. generate the 'pay with paypal' button
self.paypalButton = [[PayPal getInstance] getPayButtonWithTarget:self
andAction:@selector(payWithPayPal)
andButtonType:BUTTON_278x43
andButtonText:BUTTON_TEXT_PAY];
}
// 3. add the payment details
// 4. wait for callback
Yes. I just got it working on iOS 5 with ARC.