STripe Paymen and PK payemtns and many othe rbacekd and froentened issues

This commit is contained in:
IGNY8 VPS (Salman)
2026-01-07 05:51:36 +00:00
parent 87d1662a18
commit 0386d4bf33
24 changed files with 1079 additions and 174 deletions

View File

@@ -519,6 +519,30 @@ class PaymentMethodConfigAdmin(Igny8ModelAdmin):
search_fields = ['country_code', 'display_name', 'payment_method']
list_editable = ['is_enabled', 'sort_order']
readonly_fields = ['created_at', 'updated_at']
fieldsets = (
('Payment Method', {
'fields': ('country_code', 'payment_method', 'display_name', 'is_enabled', 'sort_order')
}),
('Instructions', {
'fields': ('instructions',),
'description': 'Instructions shown to users for this payment method'
}),
('Bank Transfer Details', {
'fields': ('bank_name', 'account_title', 'account_number', 'routing_number', 'swift_code', 'iban'),
'classes': ('collapse',),
'description': 'Only for bank_transfer payment method'
}),
('Local Wallet Details', {
'fields': ('wallet_type', 'wallet_id'),
'classes': ('collapse',),
'description': 'Only for local_wallet payment method (JazzCash, EasyPaisa, etc.)'
}),
('Timestamps', {
'fields': ('created_at', 'updated_at'),
'classes': ('collapse',)
}),
)
@admin.register(AccountPaymentMethod)

View File

@@ -0,0 +1,64 @@
# Generated by Django 5.2.9 on 2026-01-07 03:19
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('billing', '0027_model_schema_update'),
]
operations = [
migrations.RemoveField(
model_name='paymentmethodconfig',
name='api_key',
),
migrations.RemoveField(
model_name='paymentmethodconfig',
name='api_secret',
),
migrations.RemoveField(
model_name='paymentmethodconfig',
name='webhook_secret',
),
migrations.RemoveField(
model_name='paymentmethodconfig',
name='webhook_url',
),
migrations.AddField(
model_name='paymentmethodconfig',
name='account_title',
field=models.CharField(blank=True, help_text='Account holder name', max_length=255),
),
migrations.AddField(
model_name='paymentmethodconfig',
name='iban',
field=models.CharField(blank=True, help_text='IBAN for international transfers', max_length=255),
),
migrations.AlterField(
model_name='paymentmethodconfig',
name='country_code',
field=models.CharField(db_index=True, help_text="ISO 2-letter country code (e.g., US, GB, PK) or '*' for global", max_length=2),
),
migrations.AlterField(
model_name='paymentmethodconfig',
name='routing_number',
field=models.CharField(blank=True, help_text='Routing/Sort code', max_length=255),
),
migrations.AlterField(
model_name='paymentmethodconfig',
name='swift_code',
field=models.CharField(blank=True, help_text='SWIFT/BIC code for international', max_length=255),
),
migrations.AlterField(
model_name='paymentmethodconfig',
name='wallet_id',
field=models.CharField(blank=True, help_text='Mobile number or wallet ID', max_length=255),
),
migrations.AlterField(
model_name='paymentmethodconfig',
name='wallet_type',
field=models.CharField(blank=True, help_text='E.g., JazzCash, EasyPaisa, etc.', max_length=100),
),
]