2012

6 January 2011 PayPal Mobile Express Checkout Library Developer Guide and Reference
Programming Flow with the PayPal Button on Your Mobile Website
Place the PayPal button on your mobile website if your checkout process begins and ends with
pages on your mobile website. In this programming flow, you embed your entire web based
checkout implementation in a web view.
1. Fetch a device token from the library, just before you open a web view of your mobile
Express Checkout implementation.
Include a PayPalListener that receives device tokens.
2. Open a web view of a page or routine on your mobile web server that begins your checkout
process.
Include the device token as a URL parameter when you open the web view, along with the
item details in the shopping cart.
3. Monitor the web view for a redirect from your web server to a well-known URL that signals
the checkout process on your mobile website is complete.
Methods in the Mobile Express Checkout Library
fetchDeviceReferenceTokenWithAppID Method
The fetchDeviceReferenceTokenWithAppID method returns a device token. You must
create a class that implements PayPalListener and then use an instance of it for
fetchDeviceReferenceTokenWithAppID. The receivedDeviceReferenceToken
function of that receives device tokens. Include the device token as the &drt parameter in the
URL when your redirect the buyer’s mobile browser to PayPal. Device tokens expire after 45
minutes.
In your programming flow, fetch the device token just before you get the PayPal button.