Developer's Guide

10 August 2012 PayPal Mobile Payments Developer Guide and Reference – iOS Edition
Parameter Description
PayPalApplicationId:
(Required) PayPal Application ID from X.com. For the Sandbox
environment, you should use APP-80W284485P519543T.
env:
(Optional) Sets the PayPal server to Live, Sandbox, or None. Allowable
values are:
ENV_LIVE (does not support simulators)
ENV_SANDBOX
ENV_NONE
For details of the different servers, see “Enumerated Values in the
Mobile Payments Library.”
getPayButtonWithTarget Method
You must get the Pay with PayPal payment button from the Mobile Payments Library. Use this
method, which returns a
UIButton, to place the button on your page. If you need to move the
button, when your application supports rotation for example, change the button frame. The target
parameter sets the delegate property of the PayPal object, which receives the
PayPalPaymentDelegate callbacks. If invalid data is entered, you receive an alert in a
UIAlertView.
See an example of placing the
Pay button in Placing the Pay with PayPal Button.
-(UIButton *)getPayButtonWithTarget:(const
id<PayPalPaymentDelegate>)target andAction:(SEL)action
andButtonType:(PayPalButtonType)buttonType
andButtonText:(PayPalButtonText)buttonTextType;
Parameter Description
target:
(Required) The
PayPalPaymentDelegate that is the delegate for
callbacks.
action:
(Required) Called when a buyer taps the Pay with PayPal button.
buttonType:
(Required) Size and appearance of the Pay with PayPal buttons.
Allowable values are:
BUTTON_152x33
BUTTON_194x37
BUTTON_278x43
BUTTON_294x43
For images of the different button types, see “Enumerated Values in the
Mobile Payments Library.”