SlideShare a Scribd company logo
1 of 47
Download to read offline
Developer
Painless Payments for Droids
Tim Messerschmidt
Painless Payments for Droids
Tim Messerschmidt
Log In with PayPal



   The Artist
formerly known
   as access
Log In with PayPal




   Authentication
Log In with PayPal




    Authorization
Log In with PayPal




     OAuth 2.0 &
   OpenID Connect
Log In with PayPal

           Client                          Server
1.  Open Authorization          2.  Provide a login page
    Endpoint URL                3.  Return the Authorization
4.  Check callbacks for             Token after a successful
    Authorization Token             login
5.  Request a valid Access      6.  Check Authorization Token
    Token                           & return the Access Token
7.  Retrieve user’s resources       if it’s valid
Log In with PayPal


   NAME                  Date of Birth
                                           Creation Date
               EMAIL            Language

                     Gender          Locale
   Time Zone
         Phone Number             Address
                     Verified
Painless Payments for Droids
Tim Messerschmidt
Painless Payments for Droids
Tim Messerschmidt
Painless Payments for Droids
Tim Messerschmidt
Simple Payment




                 10 €
       Sender           Receiver
Parallel Payment


                   20 €




                   10 €
       Sender
Chained Payment


                    20 €
            100 €
                           30 €


                    10 €
1 transaction
Mobile Payments Library




          Download
           the SDK
Mobile Payments Library




  API Credentials
      At x.com
Mobile Payments Library




  Sandbox APP ID:
  APP-80W284485P519543T
Mobile Payments Library




   Add The .JAR To
    Your Project
Mobile Payments Library




         Modify the
          Manifest
Mobile Payments Library


Adding the PayPal Activity:
<activity
  	android:name="com.paypal.android.MEP.PayPalActivity"	
  	android:configChanges="keyboardHidden|orientation" />


Best to be used with a translucent Theme
android:theme="@android:style/Theme.Translucent.NoTitleBar"	
  
Mobile Payments Library

DECLARING THE NEEDED PERMISSIONS:
Internet
<uses-permission
  	android:name="android.permission.INTERNET" />	

READ Phone state
<uses-permission
  	android:name="android.permission.READ_PHONE_STATE" />


Access Wifi State
<uses-permission	
  	android:name="android.permission.ACCESS_WIFI_STATE" />
Mobile Payments Library




      Initialize The
         Library
Mobile Payments Library

new Thread() {	
 	public void run() {	
 	 	instance = PayPal.getInstance();	
 	 	if (instance == null) {	
 	 	 	instance = PayPal.initWithAppID(	
 	 	 	 	context,	
 	 	 	 	ID, // YOUR APP'S ID	
 	 	 	 	PayPal.ENV_SANDBOX	
 	 	 	);	
 	 	}	
 	}	
}.start();	
  
Mobile Payments Library




         Create the
          PAYMENT
Mobile Payments Library

Simple Payment:
PayPalPayment payment = new PayPalPayment();	
payment.setRecipient("foo@bar.com");	
payment.setCurrencyType("USD");	
payment.setPaymentType(PayPal.PAYMENT_TYPE_GOODS);	
payment.setSubtotal(new BigDecimal(”29.99"));	
	
PayPalInvoiceItem item = new PayPalInvoiceItem();	
item.setName("Hipster T-Shirt");	
item.setQuantity(1);	
item.setTotalPrice(new BigDecimal(”29.99"));	
	
PayPalInvoiceData data = new PayPalInvoiceData();	
data.add(item);	
payment.setInvoiceData(data);	
  
Mobile Payments Library

Parallel Payment:
PayPalAdvancedPayment payment = new PayPalAdvancedPayment();	
payment.setCurrencyType("USD");	
	
PayPalReceiverDetails firstReceiver =	
  	new PayPalReceiverDetails();	
firstReceiver.setRecipient("first@bar.com");	
firstReceiver.setSubtotal(new BigDecimal("10.00"));	
	
PayPalReceiverDetails secondReceiver =	
  	new PayPalReceiverDetails();	
secondReceiver.setRecipient("second@bar.com");	
secondReceiver.setSubtotal(new BigDecimal("20.00"));	
	
payment.getReceivers().add(firstReceiver);	
payment.getReceivers().add(secondReceiver);	
  
Mobile Payments Library




       Execute The
         Payment
Mobile Payments Library

GET THE INTENT:
Intent payIntent =	
 	instance.checkout(invoice, context);	
startActivityForResult(payIntent, REQUEST);	
  

Can be used with a Delegate instead
Intent payIntent =	
 	instance.checkout(	
 	 	invoice, context, delegate	
 	);	
startActivity(payIntent);	
  
Mobile Payments Library

Receive the result:
protected void onActivityResult(	
  	int requestCode, int resultCode, Intent data) {	
  	 	if (requestCode == REQUEST) {	
  	 	 	switch (resultCode) {	
  	 	 	 	case Activity.RESULT_OK:	
  	 	 	 	 	showText("Success");	
  	 	 	 	 	break;	
  	 	 	 	case Activity.RESULT_CANCELED:	
  	 	 	 	 	showText("Canceled");	
  	 	 	 	 	break;	
  	 	 	 	case PayPalActivity.RESULT_FAILURE:	
  	 	 	 	 	showText("Failure");	
  	 	 	 	 	break;	
  	 	 	}	
  	 	}	
  	}	
  
Mobile Payments Library




       Advantage:
      Intent-based
Mobile Payments Library




Use IPN to update
   your stock
Mobile Payments Library

Verify Payments:
payment.setIpnUrl("http://example.com/callback.php");	
  


                            POST
             PayPal                 Server

            Server                   PayPal
Mobile Payments Library




                  CODE
Droidcon DE 2013
Droidcon DE 2013
Droidcon DE 2013
Droidcon DE 2013
Droidcon DE 2013
Droidcon DE 2013

More Related Content

Similar to Droidcon DE 2013

2012 SVCodeCamp: In App Payments with HTML5
2012 SVCodeCamp: In App Payments with HTML52012 SVCodeCamp: In App Payments with HTML5
2012 SVCodeCamp: In App Payments with HTML5Jonathan LeBlanc
 
Monetizing your apps with PayPal API:s
Monetizing your apps with PayPal API:sMonetizing your apps with PayPal API:s
Monetizing your apps with PayPal API:sDisruptive Code
 
Monetize with PayPal X Payments Platform
Monetize with PayPal X Payments PlatformMonetize with PayPal X Payments Platform
Monetize with PayPal X Payments Platformguest72b121
 
HTML5 Gaming Payment Platforms
HTML5 Gaming Payment PlatformsHTML5 Gaming Payment Platforms
HTML5 Gaming Payment PlatformsJonathan LeBlanc
 
One Gateway for All Kinds of Payments—the Payflow Integration
One Gateway for All Kinds of Payments—the Payflow IntegrationOne Gateway for All Kinds of Payments—the Payflow Integration
One Gateway for All Kinds of Payments—the Payflow IntegrationPayPalX Developer Network
 
Barcelona Developers Conference 2011
Barcelona Developers Conference 2011Barcelona Developers Conference 2011
Barcelona Developers Conference 2011PayPal
 
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 PlatformPayPalX Developer Network
 
The Future of Progressive Web Apps - View Source conference, Berlin 2016
The Future of Progressive Web Apps - View Source conference, Berlin 2016The Future of Progressive Web Apps - View Source conference, Berlin 2016
The Future of Progressive Web Apps - View Source conference, Berlin 2016Robert Nyman
 
The Future of the Web - Cold Front conference 2016
The Future of the Web - Cold Front conference 2016The Future of the Web - Cold Front conference 2016
The Future of the Web - Cold Front conference 2016Robert Nyman
 
Paypal REST api ( Japanese version )
Paypal REST api ( Japanese version )Paypal REST api ( Japanese version )
Paypal REST api ( Japanese version )Yoshi Sakai
 
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
 
Active Merchant
Active MerchantActive Merchant
Active MerchantJohn Ward
 
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
 
PayPal Dev Con 2009 Driving Business
PayPal Dev Con 2009 Driving BusinessPayPal Dev Con 2009 Driving Business
PayPal Dev Con 2009 Driving BusinessAduci
 
Seedhack 2012 FIn Tech
Seedhack 2012 FIn TechSeedhack 2012 FIn Tech
Seedhack 2012 FIn TechPayPal
 
Integration of payment gateways using Paypal account
Integration of payment gateways using Paypal account Integration of payment gateways using Paypal account
Integration of payment gateways using Paypal account Phenom People
 
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
 

Similar to Droidcon DE 2013 (20)

2012 SVCodeCamp: In App Payments with HTML5
2012 SVCodeCamp: In App Payments with HTML52012 SVCodeCamp: In App Payments with HTML5
2012 SVCodeCamp: In App Payments with HTML5
 
Hacking with PayPal
Hacking with PayPalHacking with PayPal
Hacking with PayPal
 
Monetizing your apps with PayPal API:s
Monetizing your apps with PayPal API:sMonetizing your apps with PayPal API:s
Monetizing your apps with PayPal API:s
 
Monetize with PayPal X Payments Platform
Monetize with PayPal X Payments PlatformMonetize with PayPal X Payments Platform
Monetize with PayPal X Payments Platform
 
HTML5 Gaming Payment Platforms
HTML5 Gaming Payment PlatformsHTML5 Gaming Payment Platforms
HTML5 Gaming Payment Platforms
 
One Gateway for All Kinds of Payments—the Payflow Integration
One Gateway for All Kinds of Payments—the Payflow IntegrationOne Gateway for All Kinds of Payments—the Payflow Integration
One Gateway for All Kinds of Payments—the Payflow Integration
 
Barcelona Developers Conference 2011
Barcelona Developers Conference 2011Barcelona Developers Conference 2011
Barcelona Developers Conference 2011
 
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
 
The Future of Progressive Web Apps - View Source conference, Berlin 2016
The Future of Progressive Web Apps - View Source conference, Berlin 2016The Future of Progressive Web Apps - View Source conference, Berlin 2016
The Future of Progressive Web Apps - View Source conference, Berlin 2016
 
The Future of the Web - Cold Front conference 2016
The Future of the Web - Cold Front conference 2016The Future of the Web - Cold Front conference 2016
The Future of the Web - Cold Front conference 2016
 
Paypal REST api ( Japanese version )
Paypal REST api ( Japanese version )Paypal REST api ( Japanese version )
Paypal REST api ( Japanese version )
 
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
 
Active Merchant
Active MerchantActive Merchant
Active Merchant
 
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
 
PayPal Dev Con 2009 Driving Business
PayPal Dev Con 2009 Driving BusinessPayPal Dev Con 2009 Driving Business
PayPal Dev Con 2009 Driving Business
 
Seedhack 2012 FIn Tech
Seedhack 2012 FIn TechSeedhack 2012 FIn Tech
Seedhack 2012 FIn Tech
 
Integration of payment gateways using Paypal account
Integration of payment gateways using Paypal account Integration of payment gateways using Paypal account
Integration of payment gateways using Paypal account
 
Payments Anywhere with PayPal
Payments Anywhere with PayPalPayments Anywhere with PayPal
Payments Anywhere with PayPal
 
Using the GSMA OneAPI Gateway
Using the GSMA OneAPI GatewayUsing the GSMA OneAPI Gateway
Using the GSMA OneAPI Gateway
 
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
 

More from PayPal

PayPal's Private Cloud @ Scale
PayPal's Private Cloud @ ScalePayPal's Private Cloud @ Scale
PayPal's Private Cloud @ ScalePayPal
 
Kraken Front-Trends
Kraken Front-TrendsKraken Front-Trends
Kraken Front-TrendsPayPal
 
Kraken
KrakenKraken
KrakenPayPal
 
Death To Passwords Droid Edition
Death To Passwords Droid EditionDeath To Passwords Droid Edition
Death To Passwords Droid EditionPayPal
 
Future Of Payments
Future Of PaymentsFuture Of Payments
Future Of PaymentsPayPal
 
The web can do that better - My adventure with HTML5 Vide, WebRTC and Shared ...
The web can do that better - My adventure with HTML5 Vide, WebRTC and Shared ...The web can do that better - My adventure with HTML5 Vide, WebRTC and Shared ...
The web can do that better - My adventure with HTML5 Vide, WebRTC and Shared ...PayPal
 
Death To Passwords
Death To PasswordsDeath To Passwords
Death To PasswordsPayPal
 
KrakenJS
KrakenJSKrakenJS
KrakenJSPayPal
 
Battle Hack London Intro
Battle Hack London IntroBattle Hack London Intro
Battle Hack London IntroPayPal
 
Authentication for Droids
Authentication for DroidsAuthentication for Droids
Authentication for DroidsPayPal
 
Concrete indentity really getting to know your users
Concrete indentity   really getting to know your usersConcrete indentity   really getting to know your users
Concrete indentity really getting to know your usersPayPal
 
Online Identity: Getting to know your users
Online Identity: Getting to know your usersOnline Identity: Getting to know your users
Online Identity: Getting to know your usersPayPal
 
Mobile payments at Droidcon Eastern Europe
Mobile payments at Droidcon Eastern EuropeMobile payments at Droidcon Eastern Europe
Mobile payments at Droidcon Eastern EuropePayPal
 
Reinvigorating Stagnant Innovation Through Your Developer Network
Reinvigorating Stagnant Innovation Through Your Developer NetworkReinvigorating Stagnant Innovation Through Your Developer Network
Reinvigorating Stagnant Innovation Through Your Developer NetworkPayPal
 
The Profitable Startup
The Profitable StartupThe Profitable Startup
The Profitable StartupPayPal
 
Startup Highway Workshop
Startup Highway WorkshopStartup Highway Workshop
Startup Highway WorkshopPayPal
 
Berlin Battle hack presentation
Berlin Battle hack presentationBerlin Battle hack presentation
Berlin Battle hack presentationPayPal
 
From Good To Great
From Good To GreatFrom Good To Great
From Good To GreatPayPal
 
Hack & Tell
Hack & TellHack & Tell
Hack & TellPayPal
 
Payments for the REST of us
Payments for the REST of usPayments for the REST of us
Payments for the REST of usPayPal
 

More from PayPal (20)

PayPal's Private Cloud @ Scale
PayPal's Private Cloud @ ScalePayPal's Private Cloud @ Scale
PayPal's Private Cloud @ Scale
 
Kraken Front-Trends
Kraken Front-TrendsKraken Front-Trends
Kraken Front-Trends
 
Kraken
KrakenKraken
Kraken
 
Death To Passwords Droid Edition
Death To Passwords Droid EditionDeath To Passwords Droid Edition
Death To Passwords Droid Edition
 
Future Of Payments
Future Of PaymentsFuture Of Payments
Future Of Payments
 
The web can do that better - My adventure with HTML5 Vide, WebRTC and Shared ...
The web can do that better - My adventure with HTML5 Vide, WebRTC and Shared ...The web can do that better - My adventure with HTML5 Vide, WebRTC and Shared ...
The web can do that better - My adventure with HTML5 Vide, WebRTC and Shared ...
 
Death To Passwords
Death To PasswordsDeath To Passwords
Death To Passwords
 
KrakenJS
KrakenJSKrakenJS
KrakenJS
 
Battle Hack London Intro
Battle Hack London IntroBattle Hack London Intro
Battle Hack London Intro
 
Authentication for Droids
Authentication for DroidsAuthentication for Droids
Authentication for Droids
 
Concrete indentity really getting to know your users
Concrete indentity   really getting to know your usersConcrete indentity   really getting to know your users
Concrete indentity really getting to know your users
 
Online Identity: Getting to know your users
Online Identity: Getting to know your usersOnline Identity: Getting to know your users
Online Identity: Getting to know your users
 
Mobile payments at Droidcon Eastern Europe
Mobile payments at Droidcon Eastern EuropeMobile payments at Droidcon Eastern Europe
Mobile payments at Droidcon Eastern Europe
 
Reinvigorating Stagnant Innovation Through Your Developer Network
Reinvigorating Stagnant Innovation Through Your Developer NetworkReinvigorating Stagnant Innovation Through Your Developer Network
Reinvigorating Stagnant Innovation Through Your Developer Network
 
The Profitable Startup
The Profitable StartupThe Profitable Startup
The Profitable Startup
 
Startup Highway Workshop
Startup Highway WorkshopStartup Highway Workshop
Startup Highway Workshop
 
Berlin Battle hack presentation
Berlin Battle hack presentationBerlin Battle hack presentation
Berlin Battle hack presentation
 
From Good To Great
From Good To GreatFrom Good To Great
From Good To Great
 
Hack & Tell
Hack & TellHack & Tell
Hack & Tell
 
Payments for the REST of us
Payments for the REST of usPayments for the REST of us
Payments for the REST of us
 

Recently uploaded

Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
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
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
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
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
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
 
"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
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
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
 

Recently uploaded (20)

Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
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?
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
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
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
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
 
"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...
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
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
 

Droidcon DE 2013

  • 1.
  • 3. Painless Payments for Droids Tim Messerschmidt
  • 4. Painless Payments for Droids Tim Messerschmidt
  • 5. Log In with PayPal The Artist formerly known as access
  • 6. Log In with PayPal Authentication
  • 7. Log In with PayPal Authorization
  • 8. Log In with PayPal OAuth 2.0 & OpenID Connect
  • 9. Log In with PayPal Client Server 1.  Open Authorization 2.  Provide a login page Endpoint URL 3.  Return the Authorization 4.  Check callbacks for Token after a successful Authorization Token login 5.  Request a valid Access 6.  Check Authorization Token Token & return the Access Token 7.  Retrieve user’s resources if it’s valid
  • 10. Log In with PayPal NAME Date of Birth Creation Date EMAIL Language Gender Locale Time Zone Phone Number Address Verified
  • 11. Painless Payments for Droids Tim Messerschmidt
  • 12. Painless Payments for Droids Tim Messerschmidt
  • 13.
  • 14. Painless Payments for Droids Tim Messerschmidt
  • 15.
  • 16.
  • 17.
  • 18.
  • 19. Simple Payment 10 € Sender Receiver
  • 20. Parallel Payment 20 € 10 € Sender
  • 21. Chained Payment 20 € 100 € 30 € 10 € 1 transaction
  • 22.
  • 23. Mobile Payments Library Download the SDK
  • 24. Mobile Payments Library API Credentials At x.com
  • 25. Mobile Payments Library Sandbox APP ID: APP-80W284485P519543T
  • 26. Mobile Payments Library Add The .JAR To Your Project
  • 27. Mobile Payments Library Modify the Manifest
  • 28. Mobile Payments Library Adding the PayPal Activity: <activity android:name="com.paypal.android.MEP.PayPalActivity" android:configChanges="keyboardHidden|orientation" /> Best to be used with a translucent Theme android:theme="@android:style/Theme.Translucent.NoTitleBar"  
  • 29. Mobile Payments Library DECLARING THE NEEDED PERMISSIONS: Internet <uses-permission android:name="android.permission.INTERNET" /> READ Phone state <uses-permission android:name="android.permission.READ_PHONE_STATE" /> Access Wifi State <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
  • 30. Mobile Payments Library Initialize The Library
  • 31. Mobile Payments Library new Thread() { public void run() { instance = PayPal.getInstance(); if (instance == null) { instance = PayPal.initWithAppID( context, ID, // YOUR APP'S ID PayPal.ENV_SANDBOX ); } } }.start();  
  • 32. Mobile Payments Library Create the PAYMENT
  • 33. Mobile Payments Library Simple Payment: PayPalPayment payment = new PayPalPayment(); payment.setRecipient("foo@bar.com"); payment.setCurrencyType("USD"); payment.setPaymentType(PayPal.PAYMENT_TYPE_GOODS); payment.setSubtotal(new BigDecimal(”29.99")); PayPalInvoiceItem item = new PayPalInvoiceItem(); item.setName("Hipster T-Shirt"); item.setQuantity(1); item.setTotalPrice(new BigDecimal(”29.99")); PayPalInvoiceData data = new PayPalInvoiceData(); data.add(item); payment.setInvoiceData(data);  
  • 34. Mobile Payments Library Parallel Payment: PayPalAdvancedPayment payment = new PayPalAdvancedPayment(); payment.setCurrencyType("USD"); PayPalReceiverDetails firstReceiver = new PayPalReceiverDetails(); firstReceiver.setRecipient("first@bar.com"); firstReceiver.setSubtotal(new BigDecimal("10.00")); PayPalReceiverDetails secondReceiver = new PayPalReceiverDetails(); secondReceiver.setRecipient("second@bar.com"); secondReceiver.setSubtotal(new BigDecimal("20.00")); payment.getReceivers().add(firstReceiver); payment.getReceivers().add(secondReceiver);  
  • 35. Mobile Payments Library Execute The Payment
  • 36. Mobile Payments Library GET THE INTENT: Intent payIntent = instance.checkout(invoice, context); startActivityForResult(payIntent, REQUEST);   Can be used with a Delegate instead Intent payIntent = instance.checkout( invoice, context, delegate ); startActivity(payIntent);  
  • 37. Mobile Payments Library Receive the result: protected void onActivityResult( int requestCode, int resultCode, Intent data) { if (requestCode == REQUEST) { switch (resultCode) { case Activity.RESULT_OK: showText("Success"); break; case Activity.RESULT_CANCELED: showText("Canceled"); break; case PayPalActivity.RESULT_FAILURE: showText("Failure"); break; } } }  
  • 38. Mobile Payments Library Advantage: Intent-based
  • 39. Mobile Payments Library Use IPN to update your stock
  • 40. Mobile Payments Library Verify Payments: payment.setIpnUrl("http://example.com/callback.php");   POST PayPal Server Server PayPal