Online Book Reader

Home Category

PayPal APIs_ Up and Running_ A Developer's Guide - Michael Balderas [41]

By Root 143 0

echo "Pay API call failed. ";

echo "Detailed Error Message: " . $ErrorMsg;

echo "Error Code: " . $ErrorCode;

echo "Error Severity: " . $ErrorSeverity;

echo "Error Domain: " . $ErrorDomain;

echo "Error Category: " . $ErrorCategory;

}

?>

Chapter 5. PayPal Mobile Express Checkout


The latest wave of development focuses on creating applications and commerce interfaces for the mobile market. At the Innovate 2010 Developer Conference, PayPal announced the release of Mobile Express Checkout (MEC), which is built on the existing Express Checkout API. Mobile Express Checkout allows for fast development, especially if you already have an Express Checkout-based solution. In addition to Mobile Express Checkout, PayPal provides development libraries, or Mobile Payment Libraries (MPL), for both the iPhone and Android platforms. Table 5-1, also provided by Bill Day at https://www.x.com/docs/DOC-3035, outlines the standard PayPal APIs and their mobile equivalents.

Table 5-1. Standard PayPal APIs and mobile equivalents

PayPal APIs you use today Use this for native mobile development Use this for mobile web development

Express Checkout MEC library for iOS MEC

Adaptive Payments MPL N/A

Website Payments Standard MPL N/A

MPL is a native application development option, and it is especially useful if you are targeting apps on iOS- or Android-based devices that have no backend commerce infrastructure to interface with. MPL also supports some PayPal technologies currently not addressed by MEC, such as Adaptive Payments.

To fully utilize the capabilities of Mobile Express Checkout and the development libraries, you should be familiar with mobile website programming, the Name-Value Pair API, and additionally the platform you are developing on if integrating with a mobile application. It should also be noted that iOS uses Objective-C, and so knowledge of this language is a plus. Let’s look at the MEC flow first.

Mobile Express Checkout Flow


The MEC flow, shown in Figure 5-1, has the following steps:

The customer clicks the “Checkout with PayPal” button on your site.

The customer logs into PayPal.

The customer reviews the transaction on PayPal and submits payment.

The customer receives an order confirmation.

Figure 5-1. Mobile Express Checkout flow

As you can see, Mobile Express Checkout functions identically to Express Checkout, but MEC has several design and implementation best practices to consider, which are outlined next.

Mobile Express Checkout Best Practices


Just as with Express Checkout, shortcut placement for MEC is key. Customers can enter into MEC from either the Shopping Cart (where users see the items they are purchasing) or the Payments page (where they are asked to provide all their billing and payment information). The recommendations and requirements when entering from the Shopping Cart are as follows:

“Checkout with PayPal” buttons should be used.

You must use approved, hosted PayPal buttons.

You cannot resize any PayPal-supplied images.

The checkout button should take the customer directly to PayPal.

It should take no more then two pages after the PayPal pages to complete the payment.

The recommended flows are Shopping Cart→Login→Review→Confirmation, or Shopping Cart→Login→Review→Additional Review with Submit→Confirmation.

If you are entering into MEC from the Payments page, the recommendations and requirements are as follows:

The PayPal Payment Mark should be used.

You must use approved, hosted PayPal marks.

You cannot resize any PayPal-supplied images.

Radio buttons should have at least a 44 pixel spacing to enable easy selection on touch-enabled devices.

If your customer has already set up a billing agreement through Express Checkout online, the “Checkout with PayPal” button should contain her email address. Doing so helps to personalize the transaction. If there is no billing agreement set up, the basic “Checkout with PayPal” button should be used.

Mobile Express Checkout Library for iOS


PayPal provides

Return Main Page Previous Page Next Page

®Online Book Reader