Table of Contents
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.
-
Clone the repo
git clone https://github.com/HeitorLouzeiro/webhook-mercadopago.git
-
Access the project folder in terminal/cmd
cd webhook-mercadopago
-
Create a virtualenv with Python 3.9.0.
python -m venv venv
-
Activate virtualenv.
- Ubunto
source venv/bin/activate
- MacOs
source venv/bin/activate
- Windows
venv\scripts\activate
-
Install as dependencies.
pip install -r requirements.txt
-
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
-
Run the migrations.
python manage.py migrate
-
Create a Superuser.
python manage.py createsuperuser
-
Run the application.
python manage.py runserver 127.0.0.1:80
-
Start serve ngrok (another terminal in the same file folder with active virtual environment).
ngrok http 80
-
configuring notification URL.
- Copy the link that ngrok generated.
- Paste the URL into the Mercado Pago webhook * always leave /notification at the end for the correct connection route.
https://you-url-ngrok/notification
- 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).
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!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/Improvements
) - Commit your Changes (
git commit -m 'Add my new Enhancements'
) - Push to the Branch (
git push origin feature/Improvements
) - Open a Pull Request
We thank the following people who contributed to this project:
Heitor Louzeiro |
Distributed under the MIT License. See LICENSE for more information.
Project Link: https://github.com/HeitorLouzeiro/webhook-mercadopago