{"id":26906731,"url":"https://github.com/dev-vivekkumarverma/payment_integration","last_synced_at":"2026-04-09T16:04:58.073Z","repository":{"id":285516471,"uuid":"958399577","full_name":"dev-vivekkumarverma/payment_integration","owner":"dev-vivekkumarverma","description":"This is a simple fast api app for payment integration","archived":false,"fork":false,"pushed_at":"2025-04-01T06:25:44.000Z","size":1,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-01T07:30:11.030Z","etag":null,"topics":["docker","docker-compose","fastapi","payment-gateway","payment-integration","python3","sqlite3","upi","upi-integration","upi-payment"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dev-vivekkumarverma.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-04-01T06:18:41.000Z","updated_at":"2025-04-01T06:28:07.000Z","dependencies_parsed_at":"2025-04-01T07:30:21.314Z","dependency_job_id":"60023714-5d3b-4e57-a28d-adcb65c71893","html_url":"https://github.com/dev-vivekkumarverma/payment_integration","commit_stats":null,"previous_names":["dev-vivekkumarverma/payment_integration"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dev-vivekkumarverma/payment_integration","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dev-vivekkumarverma%2Fpayment_integration","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dev-vivekkumarverma%2Fpayment_integration/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dev-vivekkumarverma%2Fpayment_integration/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dev-vivekkumarverma%2Fpayment_integration/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dev-vivekkumarverma","download_url":"https://codeload.github.com/dev-vivekkumarverma/payment_integration/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dev-vivekkumarverma%2Fpayment_integration/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267808142,"owners_count":24147378,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-30T02:00:09.044Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-compose","fastapi","payment-gateway","payment-integration","python3","sqlite3","upi","upi-integration","upi-payment"],"created_at":"2025-04-01T11:18:23.092Z","updated_at":"2026-04-09T16:04:58.048Z","avatar_url":"https://github.com/dev-vivekkumarverma.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Payment Integration\n---\n# FastAPI Razorpay Donation System\n---\n## 📌 Project Overview\nThis project is a **donation system** built using **FastAPI, HTML, CSS, JavaScript, and Razorpay** for payment processing. It allows users to donate to an organization and processes the payment via Razorpay.\n\n### Features:\n- Collects **Name, Email, Phone Number, and Donation Amount** from users.\n- Uses **Razorpay** to handle secure online payments.\n- **FastAPI** backend to create orders and verify payments.\n- **Dockerized setup** with Nginx as a reverse proxy.\n\n---\n\n## 🏗️ Project Structure\n```\nfastapi-razorpay-donation/\n│── backend/\n│   ├── main.py              # FastAPI application (handles payment)\n│   ├── database.py          # SQLite3 database setup\n│   ├── models.py            # ORM Models\n│   ├── schemas.py           # Pydantic models\n│   ├── services.py          # Razorpay integration\n│   ├── utils.py             # Helper functions\n│   ├── .env                 # Environment variables (to be created manually)\n│   ├── requirements.txt     # Backend dependencies\n│\n│── frontend/\n│   ├── index.html           # Main donation page\n│   ├── donation.js          # Handles form submission and Razorpay checkout\n│   ├── styles.css           # Styling\n│   ├── nginx.conf           # Nginx configuration\n│   ├── Dockerfile           # Dockerfile for frontend\n│\n│── docker-compose.yml       # Defines services (backend, frontend, nginx)\n│── README.md                # Documentation\n```\n\n---\n\n## 🛠️ Setup Instructions\n\n### 1️⃣ Prerequisites\n- **Docker \u0026 Docker Compose** installed\n- **Razorpay Account** (for API keys)\n- **Git** installed (optional but recommended)\n\n### 2️⃣ Clone the Repository\n```sh\ngit clone https://github.com/yourusername/fastapi-razorpay-donation.git\ncd fastapi-razorpay-donation\n```\n\n### 3️⃣ Create and Configure the `.env` File\nInside the `backend/` directory, create a `.env` file with the following content:\n```\nDATABASE_URL=sqlite:///data/db.sqlite3\nRAZORPAY_KEY=your_razorpay_key_here\nRAZORPAY_SECRET=your_razorpay_secret_here\n```\n🔹 **Replace placeholders** with actual values.\n\nAlso change the your host IP adderss in `donation.js` :\n```js\nconst response = await fetch(\"http://192.168.29.154:8000/create_payment/\", {  // replace this `http://192.168.29.154:8000` with your host of backend running machine\n\n```\n---\n\n## 🚀 Running the Project (Dockerized)\n1️⃣ **Build \u0026 Run Containers**\n```sh\ndocker-compose up --build\n```\n2️⃣ **Access the App**\n- Open **`http://localhost`** in your browser.\n- Click the **Donate** button.\n- Complete the Razorpay checkout process.\n\n---\n\n## ⏹️ Stopping the Containers\nTo stop the running containers, use:\n```sh\ndocker-compose down\n```\nThis will shut down and remove all running containers.\n\n---\n\n## ✅ Expected Behavior\n- Clicking **Donate** opens the Razorpay checkout.\n- If **payment is successful**, user sees a thank-you message.\n- If **payment fails**, an alert is shown prompting retry.\n\n---\n\n## ❓ Troubleshooting\n- **If Razorpay modal doesn’t appear:**\n  - Check browser console for errors.\n  - Verify backend is running (`docker ps` should show `backend` container running).\n- **If API requests fail:**\n  - Ensure `nginx.conf` correctly proxies `/create-order` to `backend:8000`.\n\n---\n\n## 📧 Support\nIf you face any issues, feel free to open an issue in the repository.\n\n\n\n\n\n*This is just for tech demonstration purpose\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdev-vivekkumarverma%2Fpayment_integration","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdev-vivekkumarverma%2Fpayment_integration","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdev-vivekkumarverma%2Fpayment_integration/lists"}