SlideShare una empresa de Scribd logo
1 de 6
“iOS and Android Mobile application Development Company in India” www.letsnurture.com
How to Integrate Paypal for Mobile
Payment
“iOS and Android Mobile application Development Company in India” www.letsnurture.com
Integrate Paypal for Mobile Payment
Follow Simple steps describe below.
Note:
1. include PayPal_MPL.jar in your Project you will get this library from sample
attached here.
2.Obtain an AppID (for testing purposes, use the PayPal Sandbox AppID).
Test id is APP-80W284485P519543T
3.Specify the PayPal environment you're addressing (for
example, ENV_SANDBOX or ENV_LIVE) and the business' PayPal Account
as the receiver.
4.Calculate the price of the item(s) or service to be purchased and input that
value into your MPL call.
5.Set the Payment Type (for example, PAYMENT_TYPE_SERVICE or
PAYMENT_TYPE_PERSONAL).
6. Make the MPL payment call.
When you make the call, the customer is presented with an in-app
PayPal log in screen and the payment processing is completed within your app
(there is no browser or webview involved).
7.When the payment flow is complete, MPL returns control to your app.
“iOS and Android Mobile application Development Company in India” www.letsnurture.com
Step 1:
Add the necessary PayPal header files to your project. Declare both
INTERNET and READ_PHONE_STATE permissions in the activity declared
in your app's manifest file, like this:
add this permission and activity into menifest file of your project.
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<activity
android:name="com.paypal.android.MEP.PayPalActivity"
android:configChanges="keyboardHidden|orientation"
android:theme="@android:style/Theme.Translucent.NoTitleBar" />
Step 2:
To add the library .jar file to an eclipse project that you can find it from project
attached here .
Step 3:
Initialize the library with the initWithAppID method. The following code sets
the required values needed to initialize the library, as well as setting some
optional values. Note that the environment is set to ENV_SANDBOX (the
PayPal Sandbox) and the static Sandbox AppID is hard-coded into the call. You
can also set the environment to ENV_LIVE or ENV_NONE.
When you make app live chane Enviroment to ENV_LIVE and supply live
app-id.
“iOS and Android Mobile application Development Company in India” www.letsnurture.com
// change it with live app id
ppObj = PayPal.getInstance();
if (ppObj == null) {
ppObj = PayPal.initWithAppID(MainActivity.this.getBaseContext(),
"APP-80W284485P519543T", PayPal.ENV_SANDBOX);
}
// true = transaction requires shipping
ppObj.setShippingEnabled(true);
here if we want to use feature of shipping the we just enable
setShippingEnabled(true);
Step 4: Create the payment.
Clicking the PayPal button initiates the checkout call, which can include
different payment parameters and optional criteria for shipping, tax, languages,
and type of payments.
// Create a basic PayPal payment
PayPalPayment newPayment = new PayPalPayment();
char val[] = { '5', '0' };
BigDecimal obj_0 = new BigDecimal("50");
// Set the payment amount, excluding tax and shipping costs
newPayment.setSubtotal(new BigDecimal("50"));
// Set the currency type
newPayment.setCurrencyType("USD");
// Set the recipient for the payment (can be a phone number)
newPayment.setRecipient("rahul@letsnurture.com");
“iOS and Android Mobile application Development Company in India” www.letsnurture.com
// newPayment.setMerchantName("Company Name");
Intent paypalIntent = ppObj.checkout(newPayment,
MainActivity.this);
MainActivity.this.startActivityForResult(paypalIntent, 1);
Step 5:
Add a delegate to handle the response returned by the library.
The handler will call one of three types (paymentSucceeded, paymentCanceled,
paymentFailed) based on the result. Here's an example callback:
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
switch (resultCode) {
case Activity.RESULT_OK:
// The payment succeeded
String payKey = data.getStringExtra(PayPalActivity.EXTRA_PAY_KEY);
if (payKey != null) {
Toast.makeText(getApplicationContext(),"Successfullly Buy an item.", Toast.LENGTH_LONG).show();
}
// // Tell the user their payment succeeded
Log.e("Result success", "Result success-true //" + payKey);
break;
case Activity.RESULT_CANCELED:
// The payment was canceled Tell the user their payment was canceled
Log.e("Result cancled", "Result cancled-true");
break;
case PayPalActivity.RESULT_FAILURE:
// The payment failed -- we get the error from the EXTRA_ERROR_ID
// and EXTRA_ERROR_MESSAGE
String errorID = data.getStringExtra(PayPalActivity.EXTRA_ERROR_ID);
String errorMessage = data .getStringExtra(PayPalActivity.EXTRA_ERROR_MESSAGE);
“iOS and Android Mobile application Development Company in India” www.letsnurture.com
Log.e("Result failed", "Result failed-true");
Toast.makeText(getApplicationContext(), errorMessage,
Toast.LENGTH_LONG).show();
// Tell the user their payment was failed.
break;
}
}

Más contenido relacionado

La actualidad más candente

Getting started with Stripe
Getting started with StripeGetting started with Stripe
Getting started with StripeTechMagic
 
PayU Biz Product Deck (1)
PayU Biz Product Deck (1)PayU Biz Product Deck (1)
PayU Biz Product Deck (1)ICICI Bank
 
Monetizing your Applications with PayPal X Payments Platform
Monetizing your Applications withPayPal X Payments PlatformMonetizing your Applications withPayPal X Payments Platform
Monetizing your Applications with PayPal X Payments Platformguest72b121
 
Express checkout ecs & ecm
Express checkout ecs & ecmExpress checkout ecs & ecm
Express checkout ecs & ecmrpawluszek
 
Cool New Advances in PayPal Express Checkout
Cool New Advances in PayPal Express CheckoutCool New Advances in PayPal Express Checkout
Cool New Advances in PayPal Express CheckoutPayPalX Developer Network
 
Captchabot pay cards
Captchabot pay cardsCaptchabot pay cards
Captchabot pay cardscaptchabot
 
Adaptive Payments: Changing How We Pay with PIN, Pre-approved and Split Payments
Adaptive Payments: Changing How We Pay with PIN, Pre-approved and Split PaymentsAdaptive Payments: Changing How We Pay with PIN, Pre-approved and Split Payments
Adaptive Payments: Changing How We Pay with PIN, Pre-approved and Split PaymentsPayPalX Developer Network
 
Adobe flex + pay pal x = monetization of ria
Adobe flex + pay pal x = monetization of riaAdobe flex + pay pal x = monetization of ria
Adobe flex + pay pal x = monetization of riaganeshX
 
Accept and Disburse Payments from within OmegaCube ERP
Accept and Disburse Payments from within OmegaCube ERPAccept and Disburse Payments from within OmegaCube ERP
Accept and Disburse Payments from within OmegaCube ERPOmegaCube Technologies
 
Srikanth Nandiraju: Monetize Your Mobile Apps Using Titanium Commerce Mobile
Srikanth Nandiraju: Monetize Your Mobile Apps Using Titanium Commerce MobileSrikanth Nandiraju: Monetize Your Mobile Apps Using Titanium Commerce Mobile
Srikanth Nandiraju: Monetize Your Mobile Apps Using Titanium Commerce MobileAxway Appcelerator
 
The recurring nightmare - Rosa Gutierrez - Codemotion Amsterdam 2016
The recurring nightmare  - Rosa Gutierrez - Codemotion Amsterdam 2016The recurring nightmare  - Rosa Gutierrez - Codemotion Amsterdam 2016
The recurring nightmare - Rosa Gutierrez - Codemotion Amsterdam 2016Codemotion
 
Startup Highway Workshop
Startup Highway WorkshopStartup Highway Workshop
Startup Highway WorkshopPayPal
 
Celtrino PayMe for Suppliers
Celtrino PayMe for SuppliersCeltrino PayMe for Suppliers
Celtrino PayMe for SuppliersPayMe
 
PayMe Overview
PayMe OverviewPayMe Overview
PayMe OverviewPayMe
 

La actualidad más candente (19)

Stripe SCA
Stripe SCAStripe SCA
Stripe SCA
 
Getting started with Stripe
Getting started with StripeGetting started with Stripe
Getting started with Stripe
 
QuayPay - Summary
QuayPay - SummaryQuayPay - Summary
QuayPay - Summary
 
PayU Biz Product Deck (1)
PayU Biz Product Deck (1)PayU Biz Product Deck (1)
PayU Biz Product Deck (1)
 
Monetizing your Applications with PayPal X Payments Platform
Monetizing your Applications withPayPal X Payments PlatformMonetizing your Applications withPayPal X Payments Platform
Monetizing your Applications with PayPal X Payments Platform
 
Express checkout ecs & ecm
Express checkout ecs & ecmExpress checkout ecs & ecm
Express checkout ecs & ecm
 
Cool New Advances in PayPal Express Checkout
Cool New Advances in PayPal Express CheckoutCool New Advances in PayPal Express Checkout
Cool New Advances in PayPal Express Checkout
 
Captchabot pay cards
Captchabot pay cardsCaptchabot pay cards
Captchabot pay cards
 
Adaptive Payments: Changing How We Pay with PIN, Pre-approved and Split Payments
Adaptive Payments: Changing How We Pay with PIN, Pre-approved and Split PaymentsAdaptive Payments: Changing How We Pay with PIN, Pre-approved and Split Payments
Adaptive Payments: Changing How We Pay with PIN, Pre-approved and Split Payments
 
Payumoney
PayumoneyPayumoney
Payumoney
 
Adobe flex + pay pal x = monetization of ria
Adobe flex + pay pal x = monetization of riaAdobe flex + pay pal x = monetization of ria
Adobe flex + pay pal x = monetization of ria
 
Accept and Disburse Payments from within OmegaCube ERP
Accept and Disburse Payments from within OmegaCube ERPAccept and Disburse Payments from within OmegaCube ERP
Accept and Disburse Payments from within OmegaCube ERP
 
Srikanth Nandiraju: Monetize Your Mobile Apps Using Titanium Commerce Mobile
Srikanth Nandiraju: Monetize Your Mobile Apps Using Titanium Commerce MobileSrikanth Nandiraju: Monetize Your Mobile Apps Using Titanium Commerce Mobile
Srikanth Nandiraju: Monetize Your Mobile Apps Using Titanium Commerce Mobile
 
Razorpay
RazorpayRazorpay
Razorpay
 
The recurring nightmare - Rosa Gutierrez - Codemotion Amsterdam 2016
The recurring nightmare  - Rosa Gutierrez - Codemotion Amsterdam 2016The recurring nightmare  - Rosa Gutierrez - Codemotion Amsterdam 2016
The recurring nightmare - Rosa Gutierrez - Codemotion Amsterdam 2016
 
Startup Highway Workshop
Startup Highway WorkshopStartup Highway Workshop
Startup Highway Workshop
 
Epay-conclusion
Epay-conclusionEpay-conclusion
Epay-conclusion
 
Celtrino PayMe for Suppliers
Celtrino PayMe for SuppliersCeltrino PayMe for Suppliers
Celtrino PayMe for Suppliers
 
PayMe Overview
PayMe OverviewPayMe Overview
PayMe Overview
 

Destacado

Accept PayPal in 5 Minutes or Less Using Button Manager and Button Manager API
Accept PayPal in 5 Minutes or Less Using Button Manager and Button Manager APIAccept PayPal in 5 Minutes or Less Using Button Manager and Button Manager API
Accept PayPal in 5 Minutes or Less Using Button Manager and Button Manager APIPayPalX Developer Network
 
футуризм минеева а. 11а
футуризм минеева а. 11афутуризм минеева а. 11а
футуризм минеева а. 11аkryljanauki
 
тест за 5 класс по литературе
тест за 5 класс по литературетест за 5 класс по литературе
тест за 5 класс по литературеkryljanauki
 
Operations Management briefing
Operations Management briefingOperations Management briefing
Operations Management briefingSandeep Premnath
 
November Public Meetings
November Public MeetingsNovember Public Meetings
November Public MeetingsMatt Mansell
 
ประสบการณ์การเรียนรู้
ประสบการณ์การเรียนรู้ประสบการณ์การเรียนรู้
ประสบการณ์การเรียนรู้Na Tak
 
Google calendar integration in iOS app
Google calendar integration in iOS appGoogle calendar integration in iOS app
Google calendar integration in iOS appKetan Raval
 
Big data cloudcomputing
Big data cloudcomputingBig data cloudcomputing
Big data cloudcomputingKetan Raval
 
Marshall Cassidy : VOCALSpin : Ugly Like Me
Marshall Cassidy : VOCALSpin : Ugly Like MeMarshall Cassidy : VOCALSpin : Ugly Like Me
Marshall Cassidy : VOCALSpin : Ugly Like MeVOCAL SPIN
 
Business Process Outsourcing OPS405
Business Process Outsourcing OPS405Business Process Outsourcing OPS405
Business Process Outsourcing OPS405kahogan62
 
First thing every morning
First thing every morningFirst thing every morning
First thing every morningNa Tak
 
Bicycle’s at your service
Bicycle’s at your serviceBicycle’s at your service
Bicycle’s at your servicepistolpete86
 
Instagram extension setup in Magento framework
Instagram extension setup in Magento frameworkInstagram extension setup in Magento framework
Instagram extension setup in Magento frameworkKetan Raval
 
Advanced Social Media Techniques in Higher Education
Advanced Social Media Techniques in Higher EducationAdvanced Social Media Techniques in Higher Education
Advanced Social Media Techniques in Higher EducationChristopher Rice
 
Marshall Cassidy-my-dream-girl-lyrics
Marshall Cassidy-my-dream-girl-lyricsMarshall Cassidy-my-dream-girl-lyrics
Marshall Cassidy-my-dream-girl-lyricsVOCAL SPIN
 
материал к тесту 6 класс
материал к тесту 6 классматериал к тесту 6 класс
материал к тесту 6 классkryljanauki
 
Marshall Cassidy-ugly-like-me-lyrics
Marshall Cassidy-ugly-like-me-lyricsMarshall Cassidy-ugly-like-me-lyrics
Marshall Cassidy-ugly-like-me-lyricsVOCAL SPIN
 
О компании
О компанииО компании
О компанииfotoman111
 

Destacado (20)

Payments Anywhere with PayPal
Payments Anywhere with PayPalPayments Anywhere with PayPal
Payments Anywhere with PayPal
 
Accept PayPal in 5 Minutes or Less Using Button Manager and Button Manager API
Accept PayPal in 5 Minutes or Less Using Button Manager and Button Manager APIAccept PayPal in 5 Minutes or Less Using Button Manager and Button Manager API
Accept PayPal in 5 Minutes or Less Using Button Manager and Button Manager API
 
футуризм минеева а. 11а
футуризм минеева а. 11афутуризм минеева а. 11а
футуризм минеева а. 11а
 
тест за 5 класс по литературе
тест за 5 класс по литературетест за 5 класс по литературе
тест за 5 класс по литературе
 
Operations Management briefing
Operations Management briefingOperations Management briefing
Operations Management briefing
 
November Public Meetings
November Public MeetingsNovember Public Meetings
November Public Meetings
 
ประสบการณ์การเรียนรู้
ประสบการณ์การเรียนรู้ประสบการณ์การเรียนรู้
ประสบการณ์การเรียนรู้
 
Google calendar integration in iOS app
Google calendar integration in iOS appGoogle calendar integration in iOS app
Google calendar integration in iOS app
 
Big data cloudcomputing
Big data cloudcomputingBig data cloudcomputing
Big data cloudcomputing
 
Marshall Cassidy : VOCALSpin : Ugly Like Me
Marshall Cassidy : VOCALSpin : Ugly Like MeMarshall Cassidy : VOCALSpin : Ugly Like Me
Marshall Cassidy : VOCALSpin : Ugly Like Me
 
Business Process Outsourcing OPS405
Business Process Outsourcing OPS405Business Process Outsourcing OPS405
Business Process Outsourcing OPS405
 
лекція № 4
лекція № 4лекція № 4
лекція № 4
 
First thing every morning
First thing every morningFirst thing every morning
First thing every morning
 
Bicycle’s at your service
Bicycle’s at your serviceBicycle’s at your service
Bicycle’s at your service
 
Instagram extension setup in Magento framework
Instagram extension setup in Magento frameworkInstagram extension setup in Magento framework
Instagram extension setup in Magento framework
 
Advanced Social Media Techniques in Higher Education
Advanced Social Media Techniques in Higher EducationAdvanced Social Media Techniques in Higher Education
Advanced Social Media Techniques in Higher Education
 
Marshall Cassidy-my-dream-girl-lyrics
Marshall Cassidy-my-dream-girl-lyricsMarshall Cassidy-my-dream-girl-lyrics
Marshall Cassidy-my-dream-girl-lyrics
 
материал к тесту 6 класс
материал к тесту 6 классматериал к тесту 6 класс
материал к тесту 6 класс
 
Marshall Cassidy-ugly-like-me-lyrics
Marshall Cassidy-ugly-like-me-lyricsMarshall Cassidy-ugly-like-me-lyrics
Marshall Cassidy-ugly-like-me-lyrics
 
О компании
О компанииО компании
О компании
 

Similar a Integrate PayPal Mobile Payment in 5 Steps

AI: Mobile Apps That Understands Your Intention When You Typed
AI: Mobile Apps That Understands Your Intention When You TypedAI: Mobile Apps That Understands Your Intention When You Typed
AI: Mobile Apps That Understands Your Intention When You TypedMarvin Heng
 
Mobile 2.0 Open Ideas WorkShop: Building Social Media Enabled Apps on Android
Mobile 2.0 Open Ideas WorkShop: Building Social Media Enabled Apps on AndroidMobile 2.0 Open Ideas WorkShop: Building Social Media Enabled Apps on Android
Mobile 2.0 Open Ideas WorkShop: Building Social Media Enabled Apps on AndroidAlberto Ruibal
 
Volley lab btc_bbit
Volley lab btc_bbitVolley lab btc_bbit
Volley lab btc_bbitCarWash1
 
Leture5 exercise onactivities
Leture5 exercise onactivitiesLeture5 exercise onactivities
Leture5 exercise onactivitiesmaamir farooq
 
Lecture exercise on activities
Lecture exercise on activitiesLecture exercise on activities
Lecture exercise on activitiesmaamir farooq
 
Abandoned carts
Abandoned cartsAbandoned carts
Abandoned cartsNetmera
 
How to convert custom plsql to web services-Soap OR Rest
How to convert custom plsql to web services-Soap OR RestHow to convert custom plsql to web services-Soap OR Rest
How to convert custom plsql to web services-Soap OR Restshravan kumar chelika
 
Microsoft identity platform and device authorization flow to use azure servic...
Microsoft identity platform and device authorization flow to use azure servic...Microsoft identity platform and device authorization flow to use azure servic...
Microsoft identity platform and device authorization flow to use azure servic...Sunil kumar Mohanty
 
Creation of simple application using - step by step
Creation of simple application using - step by stepCreation of simple application using - step by step
Creation of simple application using - step by steppriya Nithya
 
Parsing in ios to create an app
Parsing in ios to create an appParsing in ios to create an app
Parsing in ios to create an appHeaderLabs .
 
Tang doanh thu quang cao di dong
Tang doanh thu quang cao di dongTang doanh thu quang cao di dong
Tang doanh thu quang cao di dongDuc Canh Tran
 
Exercises broadcast receiver,incoming phone call
Exercises broadcast receiver,incoming phone callExercises broadcast receiver,incoming phone call
Exercises broadcast receiver,incoming phone callmaamir farooq
 
Micro services from scratch - Part 1
Micro services from scratch - Part 1Micro services from scratch - Part 1
Micro services from scratch - Part 1Azrul MADISA
 
Implementation of Push Notification in React Native Android app using Firebas...
Implementation of Push Notification in React Native Android app using Firebas...Implementation of Push Notification in React Native Android app using Firebas...
Implementation of Push Notification in React Native Android app using Firebas...naseeb20
 
CSC139 Chapter 9 Lab Assignments (1) Classes and Obj.docx
CSC139 Chapter 9 Lab Assignments (1) Classes and Obj.docxCSC139 Chapter 9 Lab Assignments (1) Classes and Obj.docx
CSC139 Chapter 9 Lab Assignments (1) Classes and Obj.docxruthannemcmullen
 
Hands on SPA development
Hands on SPA developmentHands on SPA development
Hands on SPA developmentShawn Constance
 

Similar a Integrate PayPal Mobile Payment in 5 Steps (20)

AI: Mobile Apps That Understands Your Intention When You Typed
AI: Mobile Apps That Understands Your Intention When You TypedAI: Mobile Apps That Understands Your Intention When You Typed
AI: Mobile Apps That Understands Your Intention When You Typed
 
Mobile 2.0 Open Ideas WorkShop: Building Social Media Enabled Apps on Android
Mobile 2.0 Open Ideas WorkShop: Building Social Media Enabled Apps on AndroidMobile 2.0 Open Ideas WorkShop: Building Social Media Enabled Apps on Android
Mobile 2.0 Open Ideas WorkShop: Building Social Media Enabled Apps on Android
 
Volley lab btc_bbit
Volley lab btc_bbitVolley lab btc_bbit
Volley lab btc_bbit
 
Wave Workshop
Wave WorkshopWave Workshop
Wave Workshop
 
Leture5 exercise onactivities
Leture5 exercise onactivitiesLeture5 exercise onactivities
Leture5 exercise onactivities
 
Lecture exercise on activities
Lecture exercise on activitiesLecture exercise on activities
Lecture exercise on activities
 
Abandoned carts
Abandoned cartsAbandoned carts
Abandoned carts
 
How to convert custom plsql to web services-Soap OR Rest
How to convert custom plsql to web services-Soap OR RestHow to convert custom plsql to web services-Soap OR Rest
How to convert custom plsql to web services-Soap OR Rest
 
Microsoft identity platform and device authorization flow to use azure servic...
Microsoft identity platform and device authorization flow to use azure servic...Microsoft identity platform and device authorization flow to use azure servic...
Microsoft identity platform and device authorization flow to use azure servic...
 
Creation of simple application using - step by step
Creation of simple application using - step by stepCreation of simple application using - step by step
Creation of simple application using - step by step
 
Parsing in ios to create an app
Parsing in ios to create an appParsing in ios to create an app
Parsing in ios to create an app
 
Tang doanh thu quang cao di dong
Tang doanh thu quang cao di dongTang doanh thu quang cao di dong
Tang doanh thu quang cao di dong
 
Android app development guide for freshers by ace web academy
Android app development guide for freshers  by ace web academyAndroid app development guide for freshers  by ace web academy
Android app development guide for freshers by ace web academy
 
E-Bazaar
E-BazaarE-Bazaar
E-Bazaar
 
2nd--mac ver
2nd--mac ver2nd--mac ver
2nd--mac ver
 
Exercises broadcast receiver,incoming phone call
Exercises broadcast receiver,incoming phone callExercises broadcast receiver,incoming phone call
Exercises broadcast receiver,incoming phone call
 
Micro services from scratch - Part 1
Micro services from scratch - Part 1Micro services from scratch - Part 1
Micro services from scratch - Part 1
 
Implementation of Push Notification in React Native Android app using Firebas...
Implementation of Push Notification in React Native Android app using Firebas...Implementation of Push Notification in React Native Android app using Firebas...
Implementation of Push Notification in React Native Android app using Firebas...
 
CSC139 Chapter 9 Lab Assignments (1) Classes and Obj.docx
CSC139 Chapter 9 Lab Assignments (1) Classes and Obj.docxCSC139 Chapter 9 Lab Assignments (1) Classes and Obj.docx
CSC139 Chapter 9 Lab Assignments (1) Classes and Obj.docx
 
Hands on SPA development
Hands on SPA developmentHands on SPA development
Hands on SPA development
 

Más de Ketan Raval

Amazon Alexa Auto Software Development Kit (SDK)
Amazon Alexa Auto Software Development Kit (SDK)Amazon Alexa Auto Software Development Kit (SDK)
Amazon Alexa Auto Software Development Kit (SDK)Ketan Raval
 
Proximity Marketing Solutions enhancing Businesses leveraging iBeacon SDK Int...
Proximity Marketing Solutions enhancing Businesses leveraging iBeacon SDK Int...Proximity Marketing Solutions enhancing Businesses leveraging iBeacon SDK Int...
Proximity Marketing Solutions enhancing Businesses leveraging iBeacon SDK Int...Ketan Raval
 
Zero ui future is here
Zero ui   future is hereZero ui   future is here
Zero ui future is hereKetan Raval
 
Android n and beyond
Android n and beyondAndroid n and beyond
Android n and beyondKetan Raval
 
IoT and Future of Connected world
IoT and Future of Connected worldIoT and Future of Connected world
IoT and Future of Connected worldKetan Raval
 
#Instagram API Get visibility you always wanted
#Instagram API   Get visibility you always wanted#Instagram API   Get visibility you always wanted
#Instagram API Get visibility you always wantedKetan Raval
 
Keynote - Devfest 2015 organized by GDG Ahmedabad
Keynote - Devfest 2015 organized by GDG AhmedabadKeynote - Devfest 2015 organized by GDG Ahmedabad
Keynote - Devfest 2015 organized by GDG AhmedabadKetan Raval
 
Android notifications
Android notificationsAndroid notifications
Android notificationsKetan Raval
 
How to make your Mobile App HIPPA Compliant
How to make your Mobile App HIPPA CompliantHow to make your Mobile App HIPPA Compliant
How to make your Mobile App HIPPA CompliantKetan Raval
 
3 d touch a true game changer
3 d touch a true game changer3 d touch a true game changer
3 d touch a true game changerKetan Raval
 
OBD Mobile App - Fault Codes, Driving Behaviour and Fuel Economy
OBD Mobile App - Fault Codes, Driving Behaviour and Fuel EconomyOBD Mobile App - Fault Codes, Driving Behaviour and Fuel Economy
OBD Mobile App - Fault Codes, Driving Behaviour and Fuel EconomyKetan Raval
 
Vehicle to vehicle communication using gps
Vehicle to vehicle communication using gpsVehicle to vehicle communication using gps
Vehicle to vehicle communication using gpsKetan Raval
 
Obd how to guide
Obd how to guideObd how to guide
Obd how to guideKetan Raval
 
Garmin api integration
Garmin api integrationGarmin api integration
Garmin api integrationKetan Raval
 
Beacon The Google Way
Beacon The Google WayBeacon The Google Way
Beacon The Google WayKetan Raval
 
Edge detection iOS application
Edge detection iOS applicationEdge detection iOS application
Edge detection iOS applicationKetan Raval
 
All about Apple Watchkit
All about Apple WatchkitAll about Apple Watchkit
All about Apple WatchkitKetan Raval
 
How to upload application on iTune store
How to upload application on iTune storeHow to upload application on iTune store
How to upload application on iTune storeKetan Raval
 
Beta testing guidelines for developer
Beta testing guidelines for developerBeta testing guidelines for developer
Beta testing guidelines for developerKetan Raval
 

Más de Ketan Raval (20)

Amazon Alexa Auto Software Development Kit (SDK)
Amazon Alexa Auto Software Development Kit (SDK)Amazon Alexa Auto Software Development Kit (SDK)
Amazon Alexa Auto Software Development Kit (SDK)
 
Proximity Marketing Solutions enhancing Businesses leveraging iBeacon SDK Int...
Proximity Marketing Solutions enhancing Businesses leveraging iBeacon SDK Int...Proximity Marketing Solutions enhancing Businesses leveraging iBeacon SDK Int...
Proximity Marketing Solutions enhancing Businesses leveraging iBeacon SDK Int...
 
Keynote 2016
Keynote 2016Keynote 2016
Keynote 2016
 
Zero ui future is here
Zero ui   future is hereZero ui   future is here
Zero ui future is here
 
Android n and beyond
Android n and beyondAndroid n and beyond
Android n and beyond
 
IoT and Future of Connected world
IoT and Future of Connected worldIoT and Future of Connected world
IoT and Future of Connected world
 
#Instagram API Get visibility you always wanted
#Instagram API   Get visibility you always wanted#Instagram API   Get visibility you always wanted
#Instagram API Get visibility you always wanted
 
Keynote - Devfest 2015 organized by GDG Ahmedabad
Keynote - Devfest 2015 organized by GDG AhmedabadKeynote - Devfest 2015 organized by GDG Ahmedabad
Keynote - Devfest 2015 organized by GDG Ahmedabad
 
Android notifications
Android notificationsAndroid notifications
Android notifications
 
How to make your Mobile App HIPPA Compliant
How to make your Mobile App HIPPA CompliantHow to make your Mobile App HIPPA Compliant
How to make your Mobile App HIPPA Compliant
 
3 d touch a true game changer
3 d touch a true game changer3 d touch a true game changer
3 d touch a true game changer
 
OBD Mobile App - Fault Codes, Driving Behaviour and Fuel Economy
OBD Mobile App - Fault Codes, Driving Behaviour and Fuel EconomyOBD Mobile App - Fault Codes, Driving Behaviour and Fuel Economy
OBD Mobile App - Fault Codes, Driving Behaviour and Fuel Economy
 
Vehicle to vehicle communication using gps
Vehicle to vehicle communication using gpsVehicle to vehicle communication using gps
Vehicle to vehicle communication using gps
 
Obd how to guide
Obd how to guideObd how to guide
Obd how to guide
 
Garmin api integration
Garmin api integrationGarmin api integration
Garmin api integration
 
Beacon The Google Way
Beacon The Google WayBeacon The Google Way
Beacon The Google Way
 
Edge detection iOS application
Edge detection iOS applicationEdge detection iOS application
Edge detection iOS application
 
All about Apple Watchkit
All about Apple WatchkitAll about Apple Watchkit
All about Apple Watchkit
 
How to upload application on iTune store
How to upload application on iTune storeHow to upload application on iTune store
How to upload application on iTune store
 
Beta testing guidelines for developer
Beta testing guidelines for developerBeta testing guidelines for developer
Beta testing guidelines for developer
 

Último

Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 

Último (20)

Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 

Integrate PayPal Mobile Payment in 5 Steps

  • 1. “iOS and Android Mobile application Development Company in India” www.letsnurture.com How to Integrate Paypal for Mobile Payment
  • 2. “iOS and Android Mobile application Development Company in India” www.letsnurture.com Integrate Paypal for Mobile Payment Follow Simple steps describe below. Note: 1. include PayPal_MPL.jar in your Project you will get this library from sample attached here. 2.Obtain an AppID (for testing purposes, use the PayPal Sandbox AppID). Test id is APP-80W284485P519543T 3.Specify the PayPal environment you're addressing (for example, ENV_SANDBOX or ENV_LIVE) and the business' PayPal Account as the receiver. 4.Calculate the price of the item(s) or service to be purchased and input that value into your MPL call. 5.Set the Payment Type (for example, PAYMENT_TYPE_SERVICE or PAYMENT_TYPE_PERSONAL). 6. Make the MPL payment call. When you make the call, the customer is presented with an in-app PayPal log in screen and the payment processing is completed within your app (there is no browser or webview involved). 7.When the payment flow is complete, MPL returns control to your app.
  • 3. “iOS and Android Mobile application Development Company in India” www.letsnurture.com Step 1: Add the necessary PayPal header files to your project. Declare both INTERNET and READ_PHONE_STATE permissions in the activity declared in your app's manifest file, like this: add this permission and activity into menifest file of your project. <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.READ_PHONE_STATE" /> <activity android:name="com.paypal.android.MEP.PayPalActivity" android:configChanges="keyboardHidden|orientation" android:theme="@android:style/Theme.Translucent.NoTitleBar" /> Step 2: To add the library .jar file to an eclipse project that you can find it from project attached here . Step 3: Initialize the library with the initWithAppID method. The following code sets the required values needed to initialize the library, as well as setting some optional values. Note that the environment is set to ENV_SANDBOX (the PayPal Sandbox) and the static Sandbox AppID is hard-coded into the call. You can also set the environment to ENV_LIVE or ENV_NONE. When you make app live chane Enviroment to ENV_LIVE and supply live app-id.
  • 4. “iOS and Android Mobile application Development Company in India” www.letsnurture.com // change it with live app id ppObj = PayPal.getInstance(); if (ppObj == null) { ppObj = PayPal.initWithAppID(MainActivity.this.getBaseContext(), "APP-80W284485P519543T", PayPal.ENV_SANDBOX); } // true = transaction requires shipping ppObj.setShippingEnabled(true); here if we want to use feature of shipping the we just enable setShippingEnabled(true); Step 4: Create the payment. Clicking the PayPal button initiates the checkout call, which can include different payment parameters and optional criteria for shipping, tax, languages, and type of payments. // Create a basic PayPal payment PayPalPayment newPayment = new PayPalPayment(); char val[] = { '5', '0' }; BigDecimal obj_0 = new BigDecimal("50"); // Set the payment amount, excluding tax and shipping costs newPayment.setSubtotal(new BigDecimal("50")); // Set the currency type newPayment.setCurrencyType("USD"); // Set the recipient for the payment (can be a phone number) newPayment.setRecipient("rahul@letsnurture.com");
  • 5. “iOS and Android Mobile application Development Company in India” www.letsnurture.com // newPayment.setMerchantName("Company Name"); Intent paypalIntent = ppObj.checkout(newPayment, MainActivity.this); MainActivity.this.startActivityForResult(paypalIntent, 1); Step 5: Add a delegate to handle the response returned by the library. The handler will call one of three types (paymentSucceeded, paymentCanceled, paymentFailed) based on the result. Here's an example callback: @Override public void onActivityResult(int requestCode, int resultCode, Intent data) { switch (resultCode) { case Activity.RESULT_OK: // The payment succeeded String payKey = data.getStringExtra(PayPalActivity.EXTRA_PAY_KEY); if (payKey != null) { Toast.makeText(getApplicationContext(),"Successfullly Buy an item.", Toast.LENGTH_LONG).show(); } // // Tell the user their payment succeeded Log.e("Result success", "Result success-true //" + payKey); break; case Activity.RESULT_CANCELED: // The payment was canceled Tell the user their payment was canceled Log.e("Result cancled", "Result cancled-true"); break; case PayPalActivity.RESULT_FAILURE: // The payment failed -- we get the error from the EXTRA_ERROR_ID // and EXTRA_ERROR_MESSAGE String errorID = data.getStringExtra(PayPalActivity.EXTRA_ERROR_ID); String errorMessage = data .getStringExtra(PayPalActivity.EXTRA_ERROR_MESSAGE);
  • 6. “iOS and Android Mobile application Development Company in India” www.letsnurture.com Log.e("Result failed", "Result failed-true"); Toast.makeText(getApplicationContext(), errorMessage, Toast.LENGTH_LONG).show(); // Tell the user their payment was failed. break; } }