SlideShare une entreprise Scribd logo
1  sur  18
Mobile Payments Workshop
Braintree V.Zero API
Jeff Prestes
About me…
@jeffprestes
github.com/jeffprestes
slideshare.net/jeffprestes
Developer Advocate
Java, PHP, JavaScript,
Android Developer
Football fan,
father and IoT Researcher
Requirements:
 Xcode 6+
 CocoaPods
 A serverside Braintree V.Zero webservice to
supply Token and process the transaction (an
example is included at our sample project)
 An device with PayPal app installed or use run
our fake wallet app if you’ll run on Simulator (an
example is included at our sample project
 API was built for iOS 7.1 platform or higher
 We use CocoaPods to manage libraries
dependencies
 Clone our example :
$ git clone
https://github.com/commercefactory/016-braintree-
one-touch-ios-objc.git
 If don’t have CocoaPads, install it with:
$ sudo gem install cocoapads
 Create a folder where you want to start your project
 Create a file called Podfile, where we’re going to
define Project’s dependencies
Content of basic Podfile for V.Zero:
platform :ios, '7.1’
pod 'Braintree', '~> 3.4.0’
pod 'AFNetworking', '~> 2.2’
 Access the folder you want to work to and install
Pod’s dependencies:
$ pod Install
 Open the project’s workspace file in XCode
 Create a ViewController and on it put the calls to our
serverside to get Token and process the payment
 Also, create an instance of Braintree DropInView
and call it where is appropriate in your App.
 See our example at
https://github.com/commercefactory/016-braintree-
one-touch-ios-objc/client/vzero/ViewController.m
It’s done!
Now, just before to run your test, make sure your
Server Side is running and you had pointed to the
correct URI into your App for it be able to get the
Token and process the payment.
Requirements
– Android 4.4+
– Android Studio is recommended
– A serverside Braintree V.Zero webservice to
supply Token and process the transaction (an
example is included at our sample project)
 We use Gradle to manage library dependency.
 We suggest you to clone our example at:
https://github.com/commercefactory/011-braintree-
android-sdk.git
 Later open your Android Studio and import the
project (File -> Import Project)
You’ll see only two dependencies are needed at
app/build.gradle file:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.braintreepayments.api:braintree:1.+'
compile 'com.loopj.android:android-async-http:1.4.4'
}
 Create an Activity to handle payment operation and
call Braintree DropIn Activity
 See an example at:
https://github.com/commercefactory/011-braintree-
android-
sdk/app/src/main/java/com/timmesserschmidt/braintr
eesdk/SDKActivity.java
Using AsyncHttpClient library create a method in your
Activity to get Braintree token from your serverside
app
client.get(SERVER_BASE + "/token", new AsyncHttpResponseHandler() {
@Override
public void onSuccess(String content) {
clientToken = content;
findViewById(R.id.btn_start).setEnabled(true);
}
});
 On onActivityResult method handle
BraintreePaymentActivity results and call your
serverside web service that will process the
payment process
 Return the payment process to your customer
It’s done!
Now, just before to run your test, make sure your
Server Side is running and you had pointed to the
correct URI into your App for it be able to get the
Token and process the payment.
Thanks.
Jeff Prestes
@jeffprestes
Slideshare.com/jeffprestes
Github.com/jeffprestes
@braintree_dev
developer.paypal.com
developers.braintreepayments.com

Contenu connexe

Plus de POSSCON

Software Defined Networking (SDN) for the Datacenter
Software Defined Networking (SDN) for the DatacenterSoftware Defined Networking (SDN) for the Datacenter
Software Defined Networking (SDN) for the DatacenterPOSSCON
 
Application Security on a Dime: A Practical Guide to Using Functional Open So...
Application Security on a Dime: A Practical Guide to Using Functional Open So...Application Security on a Dime: A Practical Guide to Using Functional Open So...
Application Security on a Dime: A Practical Guide to Using Functional Open So...POSSCON
 
Why Your Open Source Story Matters
Why Your Open Source Story MattersWhy Your Open Source Story Matters
Why Your Open Source Story MattersPOSSCON
 
How YARN Enables Multiple Data Processing Engines in Hadoop
How YARN Enables Multiple Data Processing Engines in HadoopHow YARN Enables Multiple Data Processing Engines in Hadoop
How YARN Enables Multiple Data Processing Engines in HadoopPOSSCON
 
Google Summer of Code
Google Summer of CodeGoogle Summer of Code
Google Summer of CodePOSSCON
 
Introduction to Hadoop
Introduction to HadoopIntroduction to Hadoop
Introduction to HadoopPOSSCON
 
How to Use Cryptography Properly: The Common Mistakes People Make When Using ...
How to Use Cryptography Properly: The Common Mistakes People Make When Using ...How to Use Cryptography Properly: The Common Mistakes People Make When Using ...
How to Use Cryptography Properly: The Common Mistakes People Make When Using ...POSSCON
 
Cyber Security and Open Source
Cyber Security and Open SourceCyber Security and Open Source
Cyber Security and Open SourcePOSSCON
 
Intro to AngularJS
Intro to AngularJSIntro to AngularJS
Intro to AngularJSPOSSCON
 
Docker 101: An Introduction
Docker 101: An IntroductionDocker 101: An Introduction
Docker 101: An IntroductionPOSSCON
 
Graph the Planet!
Graph the Planet!Graph the Planet!
Graph the Planet!POSSCON
 
Software Freedom Licensing: What You Must Know
Software Freedom Licensing: What You Must KnowSoftware Freedom Licensing: What You Must Know
Software Freedom Licensing: What You Must KnowPOSSCON
 
Contributing to an Open Source Project 101
Contributing to an Open Source Project 101Contributing to an Open Source Project 101
Contributing to an Open Source Project 101POSSCON
 
Messaging Standards and Systems - AMQP & RabbitMQ
Messaging Standards and Systems - AMQP & RabbitMQMessaging Standards and Systems - AMQP & RabbitMQ
Messaging Standards and Systems - AMQP & RabbitMQPOSSCON
 
Converged Infrastructure with Sanoid
Converged Infrastructure with SanoidConverged Infrastructure with Sanoid
Converged Infrastructure with SanoidPOSSCON
 
Guide to the Open Source Desktop
Guide to the Open Source DesktopGuide to the Open Source Desktop
Guide to the Open Source DesktopPOSSCON
 
Introduction to OpenNMS
Introduction to OpenNMSIntroduction to OpenNMS
Introduction to OpenNMSPOSSCON
 
Backing Up Android
Backing Up AndroidBacking Up Android
Backing Up AndroidPOSSCON
 

Plus de POSSCON (18)

Software Defined Networking (SDN) for the Datacenter
Software Defined Networking (SDN) for the DatacenterSoftware Defined Networking (SDN) for the Datacenter
Software Defined Networking (SDN) for the Datacenter
 
Application Security on a Dime: A Practical Guide to Using Functional Open So...
Application Security on a Dime: A Practical Guide to Using Functional Open So...Application Security on a Dime: A Practical Guide to Using Functional Open So...
Application Security on a Dime: A Practical Guide to Using Functional Open So...
 
Why Your Open Source Story Matters
Why Your Open Source Story MattersWhy Your Open Source Story Matters
Why Your Open Source Story Matters
 
How YARN Enables Multiple Data Processing Engines in Hadoop
How YARN Enables Multiple Data Processing Engines in HadoopHow YARN Enables Multiple Data Processing Engines in Hadoop
How YARN Enables Multiple Data Processing Engines in Hadoop
 
Google Summer of Code
Google Summer of CodeGoogle Summer of Code
Google Summer of Code
 
Introduction to Hadoop
Introduction to HadoopIntroduction to Hadoop
Introduction to Hadoop
 
How to Use Cryptography Properly: The Common Mistakes People Make When Using ...
How to Use Cryptography Properly: The Common Mistakes People Make When Using ...How to Use Cryptography Properly: The Common Mistakes People Make When Using ...
How to Use Cryptography Properly: The Common Mistakes People Make When Using ...
 
Cyber Security and Open Source
Cyber Security and Open SourceCyber Security and Open Source
Cyber Security and Open Source
 
Intro to AngularJS
Intro to AngularJSIntro to AngularJS
Intro to AngularJS
 
Docker 101: An Introduction
Docker 101: An IntroductionDocker 101: An Introduction
Docker 101: An Introduction
 
Graph the Planet!
Graph the Planet!Graph the Planet!
Graph the Planet!
 
Software Freedom Licensing: What You Must Know
Software Freedom Licensing: What You Must KnowSoftware Freedom Licensing: What You Must Know
Software Freedom Licensing: What You Must Know
 
Contributing to an Open Source Project 101
Contributing to an Open Source Project 101Contributing to an Open Source Project 101
Contributing to an Open Source Project 101
 
Messaging Standards and Systems - AMQP & RabbitMQ
Messaging Standards and Systems - AMQP & RabbitMQMessaging Standards and Systems - AMQP & RabbitMQ
Messaging Standards and Systems - AMQP & RabbitMQ
 
Converged Infrastructure with Sanoid
Converged Infrastructure with SanoidConverged Infrastructure with Sanoid
Converged Infrastructure with Sanoid
 
Guide to the Open Source Desktop
Guide to the Open Source DesktopGuide to the Open Source Desktop
Guide to the Open Source Desktop
 
Introduction to OpenNMS
Introduction to OpenNMSIntroduction to OpenNMS
Introduction to OpenNMS
 
Backing Up Android
Backing Up AndroidBacking Up Android
Backing Up Android
 

Dernier

The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
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
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
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
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
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
 
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
 
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
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
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
 
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
 
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
 
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
 
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
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
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
 

Dernier (20)

The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
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
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
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
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
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
 
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
 
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
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
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
 
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
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
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
 
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
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
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
 

Building your Make Money Machine: Learning How to Build an Internet of Things Powered Candy Machine Using Free and Open Source Software

  • 1. Mobile Payments Workshop Braintree V.Zero API Jeff Prestes
  • 2. About me… @jeffprestes github.com/jeffprestes slideshare.net/jeffprestes Developer Advocate Java, PHP, JavaScript, Android Developer Football fan, father and IoT Researcher
  • 3. Requirements:  Xcode 6+  CocoaPods  A serverside Braintree V.Zero webservice to supply Token and process the transaction (an example is included at our sample project)  An device with PayPal app installed or use run our fake wallet app if you’ll run on Simulator (an example is included at our sample project
  • 4.  API was built for iOS 7.1 platform or higher  We use CocoaPods to manage libraries dependencies  Clone our example : $ git clone https://github.com/commercefactory/016-braintree- one-touch-ios-objc.git
  • 5.  If don’t have CocoaPads, install it with: $ sudo gem install cocoapads  Create a folder where you want to start your project  Create a file called Podfile, where we’re going to define Project’s dependencies
  • 6. Content of basic Podfile for V.Zero: platform :ios, '7.1’ pod 'Braintree', '~> 3.4.0’ pod 'AFNetworking', '~> 2.2’
  • 7.  Access the folder you want to work to and install Pod’s dependencies: $ pod Install  Open the project’s workspace file in XCode
  • 8.  Create a ViewController and on it put the calls to our serverside to get Token and process the payment  Also, create an instance of Braintree DropInView and call it where is appropriate in your App.  See our example at https://github.com/commercefactory/016-braintree- one-touch-ios-objc/client/vzero/ViewController.m
  • 9. It’s done! Now, just before to run your test, make sure your Server Side is running and you had pointed to the correct URI into your App for it be able to get the Token and process the payment.
  • 10. Requirements – Android 4.4+ – Android Studio is recommended – A serverside Braintree V.Zero webservice to supply Token and process the transaction (an example is included at our sample project)
  • 11.  We use Gradle to manage library dependency.  We suggest you to clone our example at: https://github.com/commercefactory/011-braintree- android-sdk.git  Later open your Android Studio and import the project (File -> Import Project)
  • 12. You’ll see only two dependencies are needed at app/build.gradle file: dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.braintreepayments.api:braintree:1.+' compile 'com.loopj.android:android-async-http:1.4.4' }
  • 13.  Create an Activity to handle payment operation and call Braintree DropIn Activity  See an example at: https://github.com/commercefactory/011-braintree- android- sdk/app/src/main/java/com/timmesserschmidt/braintr eesdk/SDKActivity.java
  • 14. Using AsyncHttpClient library create a method in your Activity to get Braintree token from your serverside app client.get(SERVER_BASE + "/token", new AsyncHttpResponseHandler() { @Override public void onSuccess(String content) { clientToken = content; findViewById(R.id.btn_start).setEnabled(true); } });
  • 15.  On onActivityResult method handle BraintreePaymentActivity results and call your serverside web service that will process the payment process  Return the payment process to your customer
  • 16. It’s done! Now, just before to run your test, make sure your Server Side is running and you had pointed to the correct URI into your App for it be able to get the Token and process the payment.
  • 17.