AL lPyment methods fully fucntion onstripe and paypal on sandbox
This commit is contained in:
@@ -161,6 +161,10 @@ class PlanAdmin(ImportExportMixin, Igny8ModelAdmin):
|
||||
('Stripe Integration', {
|
||||
'fields': ('stripe_product_id', 'stripe_price_id')
|
||||
}),
|
||||
('PayPal Integration', {
|
||||
'fields': ('paypal_plan_id',),
|
||||
'description': 'PayPal subscription plan ID (required for PayPal subscriptions)'
|
||||
}),
|
||||
)
|
||||
|
||||
def bulk_set_active(self, request, queryset):
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
# Generated by Django 5.2.10 on 2026-01-20 18:26
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('igny8_core_auth', '0035_account_bonus_credits'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='plan',
|
||||
name='paypal_plan_id',
|
||||
field=models.CharField(blank=True, help_text='PayPal subscription plan ID', max_length=255, null=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='account',
|
||||
name='status',
|
||||
field=models.CharField(choices=[('active', 'Active'), ('suspended', 'Suspended'), ('trial', 'Trial'), ('cancelled', 'Cancelled'), ('pending_payment', 'Pending Payment')], default='active', max_length=20),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='historicalaccount',
|
||||
name='status',
|
||||
field=models.CharField(choices=[('active', 'Active'), ('suspended', 'Suspended'), ('trial', 'Trial'), ('cancelled', 'Cancelled'), ('pending_payment', 'Pending Payment')], default='active', max_length=20),
|
||||
),
|
||||
]
|
||||
@@ -387,6 +387,9 @@ class Plan(models.Model):
|
||||
stripe_product_id = models.CharField(max_length=255, blank=True, null=True, help_text="For Stripe plan sync")
|
||||
stripe_price_id = models.CharField(max_length=255, blank=True, null=True, help_text="Monthly price ID for Stripe")
|
||||
|
||||
# PayPal Integration
|
||||
paypal_plan_id = models.CharField(max_length=255, blank=True, null=True, help_text="PayPal subscription plan ID")
|
||||
|
||||
# Legacy field for backward compatibility
|
||||
credits_per_month = models.IntegerField(default=0, validators=[MinValueValidator(0)], help_text="DEPRECATED: Use included_credits instead")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user