Skip to content
This repository has been archived by the owner on Aug 16, 2022. It is now read-only.

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

Notifications You must be signed in to change notification settings

braintreedev/sample-11-braintree-android-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 

Repository files navigation

This repo is on a path to being archived, checkout our other resources in github.com/paypal

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
  • Change the SERVER_BASE url to your server's url
  • 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

Packages

No packages published

Contributors 3

  •  
  •  
  •