An implementation of integrating PayPal and Stripe payment gateways into a Flask-based web application for American Bank of Commerce.
The project aims to enhance the payment capabilities of American Bank of Commerce (ABC) by integrating PayPal and Stripe payment gateways into its online banking platform. This integration enables ABC's customers to securely make transactions using these popular payment methods. The project involves requirement gathering, gateway integration, and thorough testing.
- PayPal Integration: Allows users to make payments using the PayPal payment gateway.
- Stripe Integration: Provides functionality for making payments using the Stripe payment gateway.
- Error Handling: Implements robust error handling for API requests to enhance the reliability of the code.
/docs
: Contains project documentation./src
: Holds the source code for the integration./tests
: Includes test cases and automation scripts.
- Requirements
- Installation
- Configuration
- Usage
- Gateway Integration
- Testing
- Logging
- Contributing
- Acknowledgments
- License
- Contact
- Python 3.x
- pip installed
- Flask
- Requests library
- Stripe Python library
- PayPal Developer Account
- Stripe Developer Account
- dotenv library
- configparser library
-
Clone the repository:
git clone https://github.com/Farahat612/ABC-Bank-Payment-Gateway-Integration..git
-
Navigate to the project directory:
cd abc-payment-integration
-
Install dependencies:
pip install -r requirements.txt
-
Update the
.env
file in the root directory and configure it with your API credentials:PAYPAL_CLIENT_ID=your_paypal_client_id PAYPAL_CLIENT_SECRET=your_paypal_client_secret STRIPE_PUBLIC_KEY=your_stripe_public_key STRIPE_SECRET_KEY=your_stripe_secret_key
-
Update
config.ini
with relevant configurations.
-
Run the Flask application:
python app.py
-
Access the application in your browser at http://localhost:5000.
Access the PayPal payment page by navigating to /make_payment
and entering the amount.
Access the Stripe payment page by navigating to /make_stripe_payment
.
-
Ensure you have testing dependencies installed:
pip install -r tests/requirements-test.txt
-
Run tests:
pytest tests/
- Error logs are stored in the
payment_integration.log
file. Check this file for detailed information in case of any issues.
Contributions are welcome! Please read CONTRIBUTING.md for details on our code of conduct and the process for submitting pull requests to us.
- Thanks to Flask for providing a lightweight and flexible web framework.
This project is licensed under the MIT License - see the LICENSE file for details.
For any inquiries or support, please contact Mohamed Farahat.