2012

PayPal Mobile Express Checkout Library Developer Guide and Reference January 2011 9
- (void)fetchDeviceReferenceTokenWithAppID:(NSString const *)inAppID
forEnvironment:(PayPalEnvironment)env
withDelegate:(id<DeviceReferenceTokenDelegate>)del;
Parameter
Description
inAppId:
(Required) PayPal Application ID from X.com. For the Sandbox
environment, use APP-80W284485P519543T.
env:
(Optional) Which PayPal servers the library uses
Allowable values are:
ENV_LIVE
ENV_SANDBOX
ENV_NONE
NOTE: The ENV_LIVE environment does not support simulators.
del:
(Required) Your delegate function that receives device tokens
getPayButtonWithTarget Method
If you place the PayPal button in your mobile application, get an instance from the Mobile
Express Checkout Library. This method returns a UIButton that you place on your mobile
application screen. If you need to move the button, because your application supports rotation for
example, change the button frame. The target parameter sets which UIViewController
receives delegate callbacks. If data is invalid, you receive an alert from the UIAlertViews.
- (UIButton *)getPayButtonWithTarget:(NSObject const *)target
andAction:(SEL)action andButtonType:(PayPalButtonType)inButtonType;
Parameter
Description
target:
(Required) The UIViewController that is the delegate for callbacks
action:
(Required) Your method that responds to the PayPal button click
buttonType:
(Required) Size and appearance of the PayPal button
Allowable values are:
BUTTON_152x33
BUTTON_194x37
BUTTON_278x43
BUTTON_294x43
getInstance Method
The library provides a singleton instance of the PayPal object. Use the getInstance method to
set and access runtime properties of the library. For example, use the value of the
paymentsEnabled property to determine whether your attempt to fetch a device token was
successful.