πŸš€ Razorpay Integration + Template Store Launched on My Portfolio

HomePortfolio
πŸš€ Razorpay Integration + Template Store Launched on My Portfolio
Now you can directly buy and download premium templates from vamsikrishna.site using Razorpay!

After weeks of learning, debugging, and testing β€” I'm thrilled to announce that my Django-based portfolio now includes a full-fledged Template Store with Razorpay integration! πŸ›’πŸ’³

Users can now purchase and download premium templates directly from my site. Everything is secure, dynamic, and admin-friendly!

🧩 Admin Features

The admin dashboard lets me handle everything with ease β€” from managing templates to tracking revenue.

python
class Template(models.Model):
    title = models.CharField(max_length=100)
    price = models.DecimalField(max_digits=8, decimal_places=2)
    is_active = models.BooleanField(default=True)
    download_file = models.FileField(upload_to='templates/')

πŸ’³ Razorpay Payment Gateway

Razorpay integration handles all transactions securely. Upon successful payment, users receive email confirmation and can access their purchased templates via the dashboard.

python
client = razorpay.Client(auth=("RAZORPAY_KEY_ID", "RAZORPAY_SECRET_KEY"))
payment = client.order.create({
    "amount": int(price * 100),
    "currency": "INR",
    "payment_capture": "1"
})

πŸ“© Auto-Email with Attachments

After a successful purchase, the system sends an auto-generated email with the template as an attachment.

python
send_mail(
    subject="Your Template Purchase",
    message="Thank you for your purchase!",
    from_email=settings.DEFAULT_FROM_EMAIL,
    recipient_list=[user.email],
    fail_silently=False,
    html_message=render_to_string("email_template.html", context),
)

πŸ“Š Transaction Logs & Dashboard

All purchases are logged in the admin panel for transparency and revenue tracking. Admin can view, filter, or download the data.

python
class Purchase(models.Model):
    user = models.ForeignKey(User, on_delete=models.CASCADE)
    template = models.ForeignKey(Template, on_delete=models.CASCADE)
    transaction_id = models.CharField(max_length=100)
    created_at = models.DateTimeField(auto_now_add=True)

🧠 Tech Stack & Features

- Django + PostgreSQL + Bootstrap - Razorpay payment gateway - Cloudinary for media hosting - SEO-ready design - reCAPTCHA for security - Responsive template preview - Custom Admin Panel

bash
python manage.py runserver

Resources

🌐 Live Website :https://www.vamsikrishna.site/

πŸ‘‰ GitHub Repo :https://lnkd.in/gkUc6aRu

πŸŽ₯ Demo Video :https://www.vamsikrishna.site/templates/


πŸ’‘ Let’s Collaborate & Contribute!

This is more than a personal project β€” it's open-source! Whether you're into Django, payments, UI/UX, or want to practice PRs β€” I welcome all contributions, suggestions, and feature ideas!


Likes β€’ 5 Views β€’ Apr 14, 2025