Skip to content

madgeeklabs/011-braintree-android-sdk

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Using the Braintree Client SDK for Android

This is an example of the Braintree v.zero Client SDK for processing both PayPal and credit card payments in Android applications. It comes with a minimal backened example written in Node.js that shows how to generate client tokens and how to process the payment method nonce.

Technology

This demo uses

The sample backend is written in Node.js and uses:

  • Node 0.10.26 or higher
  • The Express web framework
  • The Braintree Node SDK
  • ngrok as tunnel for your localhost
    • This makes development easier since you can deploy your app to your localhost and still access it on other machines.

Running the demo (Phone / Emulator)

  • Import the project into your Android Studio IDE
  • Let Gradle synchronize all dependencies
  • Build the app and deploy it to your emulator / phone
  • Once the app started it will try to get the client token from your backend
  • Click on Start SDK
  • Select your payment method:
    • (PayPal) Fill in the following credentials:
    • (Credit Card) Fill in the following credentials:
      • Amount: 100.00
      • Number: 4111 1111 1111 1111
      • CVV: 123
      • Expiration date: 11/2020
  • Click on Pay - $10.00
  • You will receive a message that says "Payment done"

Running the demo (Backend)

  • Run npm install to install all dependencies
  • Run npm start to start the app
  • Use ngrok to create a tunnel for your localhost
    • IMPORTANT: Make sure to edit SERVER_BASE in the SDKActivity of the Android app

Live demo

A live demo can be found here. Please make sure to follow the instructions in order to download and install the Android apk file accordingly.

Useful links

About

An Android app that uses Braintree's Client SDK for PayPal and credit card payments

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 43.7%
  • JavaScript 38.7%
  • Groovy 16.0%
  • CSS 1.6%