Coder Social home page Coder Social logo

malvernbright / android-paypal-example Goto Github PK

View Code? Open in Web Editor NEW

This project forked from omaralisaid/android-paypal-example

0.0 0.0 0.0 1.38 MB

Mini E-commerce android application that uses PayPal gateway with Node.js backend to verify payments and Firebase as database to store products , sales and payment information .

License: Apache License 2.0

Java 92.71% JavaScript 7.29%

android-paypal-example's Introduction

ScreenShots

PayPal Android Example

Mini E-commerce android application that uses PayPal gateway with Node.js backend to verify payments and Firebase as database to store products , sales and payment information .

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

  • git
  • npm install
  • node.js
  • facebook app to get facebook_app_id .
  • firebase account .
  • PayPal Account .
  • Heroku account if u want to deploy live .

Installing

  • clone the project then navigate to server folder and execute
npm install

this command will install the required libraries that will be used for our Node.js back-end .

  • assuming you already created firebase project :-

    • Import database.json file in project folder to your firebase project database.
    • Enable Facebook Authentication from firebase project dashboard .
    • Generate New Private Key :
      Project Setting -> SERVICE ACCOUNTS -> Firebase Admin SDK -> GENERATE NEW PRIVATE KEY
      this will create and download .json file containing the required credentials for firebase admin .
    • Copy the downloaded file into node_modules folder.
  • go to PayPal developer :-

    • create new App to get the client_id and client_secret
    • create two accounts ( Business - Personal ) to be used for testing .
  • open index.js file and do the necessary changes .

Running the tests

  • first step is to run our server locally so navigate to server folder and execute
node index.js

if everything works as expected you should see a log messages says

Magic happens on port 5000
  • open Android Studio and import the Android project then go to strings.xml and Config.java file and do the nessecary changes .

  • add google-services.json file of your firebase project to the android app folder .

  • when you come to the part where u should enter paypal login info to complete the buying process , login with the personl account previously created for testing then login to paypal sandbox with the Business account to see the transactions .

  • That's it you did it :)

Dependencies

Developed By

License

Copyright 2017 Omar Ali

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.

android-paypal-example's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.