With increasing smart phone adoption, m-commerce is set to explode in the next few years. However, dealing with payments is still a hassle for both consumers and developers. The PayPal Mobile Payments Library (MPL) aims to remove friction from payments and truly unleash m-commerce on the iPhone/iPad and Android platform. In this session you will learn how to integrate the PayPal Library and start accepting in-app payments for goods and services in your apps in a matter of minutes.
2. Developers Center of the Ecosystem Mobile Applications Worldwide Spending ($B) The SW ecosystem is the new differentiator App stores fueling apps sales Source: Piper Jeffrey
21. A sample pizza app that integrates the libraryWhat else you need to start coding: Test APPID from your x.com account (APP-80W284485P519543T) PayPal Sandbox account (developer.paypal.com)
23. Overview of Integration Four simple steps: Initialize the library Generate the “Pay with PayPal” button Add the payment details Wait for callback
24. 1. Initializing the Library Initialize the library with this method ppObj=PayPal.initWithAppID(this.getBaseContext(), “APP-80W284485P519543T“, PayPal.ENV_SANDBOX); Three possible environments ENV_LIVE, ENV_SANDBOX, ENV_NONE Update the Manifest <activity android:name=“com.paypal.android.MEP.PayPalActivity”> <uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
25. 2. Generate the PayPal Button Create a PayPal button with this method CheckoutButtonpayPalButton = (CheckoutButton) ppObj.getPaymentButton(PayPal.BUTTON_278x43, this, PayPal.PAYMENT_TYPE_HARD_GOODS); payPalButton.setOnClickListener(this); mainLayout.addView(payPalButton); Various payment types can be used HARD_GOODS, SERVICE, PERSONAL,
26. 3. Add the Payment Details Use the onClick method to create the new payment public void onClick (View arg0) { PayPalPaymentnewPayment = new PayPalPayment(); newPayment.setAmount (10.f); newPayment.setCurrency(“USD”); newPayment.setRecipient(“pragati.rai@paypal.com”); newPayment.setItemDescription(“bike chain”); Intent checkoutIntent = new Intent (this, PayPalActivity.class); checkoutIntent.putExtra(PayPalActivity.EXTRA_PAYMENT_INFO, newPayment); this.startActivityForResult(checkoutIntent,1); Optional methods can be used for more functionality enableDynamicAmountCalculation() setShippingEnabled() setLang()
27. 4. Handle a Callback Three types of call back responses to handle public void paymentSucceeded(String transactionID) public void paymentCancelled() public void paymentFailed(String errorID, string errorMessage)
29. Standard PayPal Infrastructure FEES - Standard accounts: 2.9% +$0.30 - Micropayments: 5% + $0.05 REPORTS Settlement Report Contains all balance-affecting daily transactions Transaction Detail Report Contains status of all transactions in a 24 hour period Superset of data contained in Settlement Report including buyer data Dispute Resolution Report Contains all new dispute cases or cases that have changed in the last 24 hours Enables reconciliation of dispute cases against money moving transactions