Skip to content

HeitorLouzeiro/webhook-mercadopago

Repository files navigation

Contributors Forks Stargazers Issues MIT License LinkedIn


Webhook Mercado Pago



Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Usage
  3. Getting Started
  4. Roadmap
  5. Contributing
  6. Collaborators
  7. License
  8. Contact
  9. Acknowledgments

About The Project

This Django project is an integration implementation with the Mercado Pago payments service, allowing the creation of payments and their monitoring. All information related to payments is stored securely in a database, along with notifications that Mercado Pago makes on the website.

(back to top)

Built With

  • Python
  • Django
  • SQLite
  • Bootstrap
  • HTML
  • CSS

(back to top)

Usage

1.Home Page.

Home Page

2.Page payment.

Payment

(back to top)

Prerequisites

Getting Started

Installation

  1. Clone the repo

    git clone https://github.com/HeitorLouzeiro/webhook-mercadopago.git
  2. Access the project folder in terminal/cmd

    cd webhook-mercadopago
  3. Create a virtualenv with Python 3.9.0.

    python -m venv venv
  4. Activate virtualenv.

    • Ubunto
    source venv/bin/activate
    • MacOs
    source venv/bin/activate
    • Windows
     venv\scripts\activate
  5. Install as dependencies.

     pip install -r requirements.txt
  6. Configure an instance with .env.

     cp .env-example .env

    or

    Copy the env-example to a new file called .env and then open it and change the variable values ​​if necessary

  7. Run the migrations.

     python manage.py migrate
  8. Create a Superuser.

     python manage.py createsuperuser
  9. Run the application.

     python manage.py runserver 127.0.0.1:80
  10. Start serve ngrok (another terminal in the same file folder with active virtual environment).

  ngrok http 80
  1. configuring notification URL.

    • Copy the link that ngrok generated.

    Ngrok terminal

    • Paste the URL into the Mercado Pago webhook

      Webhook mercado pago

      * always leave /notification at the end for the correct connection route.
        https://you-url-ngrok/notification
    • Also modify the url_notification in views.

      url notification

    • Step by step.

      gif step by step

(back to top)

Roadmap

  • Home Page.
  • Payments Page.
  • Create payment.
  • Webhook connection.
  • Update payment status.
  • URL notification.

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/Improvements)
  3. Commit your Changes (git commit -m 'Add my new Enhancements')
  4. Push to the Branch (git push origin feature/Improvements)
  5. Open a Pull Request

(back to top)

Collaborators

We thank the following people who contributed to this project:

Foto do Heitor Louzeiro no GitHub
Heitor Louzeiro

(back to top)

License

Distributed under the MIT License. See LICENSE for more information.

(back to top)

Contact

Project Link: https://github.com/HeitorLouzeiro/webhook-mercadopago

(back to top)

About

This repository was created for learning webhook with mercado pago

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published