feat: add stripe webhook

This commit is contained in:
2026-05-19 21:14:04 +02:00
parent d2c870414f
commit 6d927856c8
4 changed files with 144 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
# Generated by Django 6.0.4 on 2026-05-18 16:18
import django.db.models.deletion
import modelcluster.fields
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('home', '0023_eventindexpage'),
('purchase', '0006_purchasableproduct_stripe_payment_url'),
]
operations = [
migrations.AddField(
model_name='coursepurchase',
name='status',
field=models.CharField(choices=[('initiated', 'Initiated'), ('pending', 'Pending'), ('paid', 'Paid'), ('refunded', 'Refunded'), ('failed', 'Failed')], default='initiated', max_length=20),
),
migrations.AddField(
model_name='coursepurchase',
name='stripe_checkout_session_id',
field=models.CharField(blank=True, max_length=255, null=True),
),
migrations.AlterField(
model_name='purchasableproduct',
name='course',
field=modelcluster.fields.ParentalKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='purchasable_products', to='home.coursepage'),
),
migrations.AlterField(
model_name='purchasableproduct',
name='stripe_payment_url',
field=models.URLField(blank=True, help_text='Stripe Checkout URL for this product', null=True),
),
]