Giter VIP home page Giter VIP logo

renato79 / braintree-flask-python-integration Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 2.0 7.27 MB

I created this application with Python / Flask framework to demostrate how you can integrate BrainTree payment gateway in your app or website by using Python SDK and BrainTree API. Braintree is a PayPal Service and a full-stack payments platform that makes it easy to accept payments in your app or website. All kinds of organisations can use Braintree to accept payments in mobile apps and websites.

Home Page: http://braintree-flask-integration.herokuapp.com

Python 23.44% CSS 15.29% HTML 61.16% Procfile 0.10%
payment python flask braintree braintree-payment-gateway braintree-payment braintree-sdk braintree-api paypal-checkout paypal payment-integration payment-gateway payment-methods payment-processing payment-service webpaymentapi credit-card ecommerce-payment-solution paymentmethods creaditcard

braintree-flask-python-integration's Introduction

PayPal BrainTree Integration with Flask Framework

View the live project here.

Official documentation.

I created this application with Python / Flask framework to demostrate how you can integrate BrainTree payment gateway in your app or website by using Python SDK and BrainTree API.

Braintree is a PayPal Service and a full-stack payments platform that makes it easy to accept payments in your app or website. All kinds of organizations can use Braintree to accept payments in mobile apps and websites.

Technologies Used

Features included in this project/webapp:

  • Braintree Python SDK using SandBox for testing

  • Enter a new transaction (Process a Sandbox payment)

  • Show transaction details

  • List all transactions (VISA only)

  • List includes: Date, Transcaction ID, Amount, Status, Response Code, Response Text, Payment Method, Action

  • Actions you can take on a transaction: Void a transaction, refund a transaction, void a refund

Languages Used

Frameworks and Libraries

You will need to use your own Merchant ID, Public Key, Private Key to interact with your Sandbox BrainTree account. Go to Sandbox, click on Settings at the top right (the gear icon), click on API, your account's details are right there. Replace these details in gateway/__ init__.py

How to complete a test transaction in this webapp

  • Testing CC - Documentation: You can choose any credit card listed on the Testing webpage. Be aware that each test amount listed on the webpage will trigger the associated authorization response. Also be aware that my "Transaction List" page includes only payments issued by VISA, then choose a VISA CC if you would like to see your transaction details and interact with it.

Tips and deployment

How to set up your Python and Flask development environment

  • Install Flask: Follow these steps (just a few lines) to create a virtual environment and install Flask

  • Install the requirements:

pip3 install -r requirements.txt
  • Flask Quickstart: Check this documentation if you are not familiar with Flask, this will be very helpful.

How to Fork and Clone

Forking the GitHub Repository

By forking the GitHub Repository we make a copy of the original repository on our GitHub account to view and/or make changes without affecting the original repository by using the following steps...

  1. Log in to GitHub and locate the GitHub Repository
  2. At the top of the Repository (not top of page) just above the "Settings" Button on the menu, locate the "Fork" Button.
  3. You should now have a copy of the original repository in your GitHub account.

Making a Local Clone

  1. Log in to GitHub and locate the GitHub Repository
  2. Under the repository name, click "Clone or download".
  3. To clone the repository using HTTPS, under "Clone with HTTPS", copy the link.
  4. Open Git Bash
  5. Change the current working directory to the location where you want the cloned directory to be made.
  6. Type git clone, and then paste the URL you copied in Step 3.
$ git clone https://github.com/Renato79/braintree-flask-python-integration/
  1. Press Enter. Your local clone will be created.
$ git clone https://github.com/Renato79/braintree-flask-python-integration/
> Cloning into `CI-Clone`...
> remote: Counting objects: 10, done.
> remote: Compressing objects: 100% (8/8), done.
> remove: Total 10 (delta 1), reused 10 (delta 1)
> Unpacking objects: 100% (10/10), done.

Click Here to retrieve pictures for some of the buttons and more detailed explanations of the above process.

braintree-flask-python-integration's People

Contributors

renato79 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

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.