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 MobileSrikanth Nandiraju
 

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

WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate AgentsRyan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate AgentsRyan Mahoney
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
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
 
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
 
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
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
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
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????blackmambaettijean
 

Recently uploaded (20)

WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate AgentsRyan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
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
 
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
 
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
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
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
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????
 

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