The Real Time Communication project is a part of the Python Developer formation at Rocketseat. The primary goal is to create and practice Websockets in payment methods, enabling real-time updates on pages as soon as the payment gateway confirms transactions.
-
QR Code Payment Creation: The system allows users to create payments that generate a QR Code, facilitating seamless transactions.
-
Real-time Communication with Websockets: The system keeps track of user actions using Websockets. Once a payment is completed, real-time communication updates the payment status in the database to "paid." Users are then automatically redirected to the confirmation payment page, ensuring a smooth and efficient payment experience.
For this first version, Insomnia was used to make the requests, but you can use any other API client that you prefer.
- Payment confirmation
To run this application, ensure you Python installed on your machine. Follow these steps:
-
Navigate to Project Folder:
- Open your terminal/command prompt and navigate to the project folder.
-
Install Dependencies:
-
Before starting the application, install the required dependencies by running the following command:
pip install -r requirements.txt
-
-
Configure Python Environment:
-
After installing the dependencies, open a Python shell by running the following command:
flask shell
-
Once in the Python shell, run the following commands to configure the database:
db.drop_all() db.create_all() db.session.commit()
-
-
Start the Application:
- After configuring the Python environment, run the following command to start the application:
python app.py
- After configuring the Python environment, run the following command to start the application:
-
Access the endpoint:
- Once both the application and the database are running, you can access the project at
http://localhost:5000
in your web browser.
- Once both the application and the database are running, you can access the project at
-
Frontend Application:
- Once both the application is running the
/payment
and/confirmation_payment
can be acces at browser.
- Once both the application is running the