feat: implement new payment system with Stripe Elements and PayPal JS SDK
Agent-Logs-Url: https://github.com/dsaub/proyecto-final/sessions/09bd2b8f-753c-4431-816f-eba20606d5a0 Co-authored-by: dsaub <54474838+dsaub@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
7ff014a951
commit
233e42c14e
@@ -0,0 +1,35 @@
|
||||
# Generated by Django 6.0.1 on 2026-04-10 06:09
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('tienda', '0004_product_stock_stockreservation_stockreservationitem'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='SavedPaymentMethod',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('method_type', models.CharField(choices=[('card', 'Tarjeta'), ('paypal', 'PayPal')], max_length=10)),
|
||||
('label', models.CharField(max_length=200, verbose_name='Etiqueta')),
|
||||
('stripe_customer_id', models.CharField(blank=True, default='', max_length=100)),
|
||||
('stripe_payment_method_id', models.CharField(blank=True, default='', max_length=100)),
|
||||
('paypal_email', models.CharField(blank=True, default='', max_length=254)),
|
||||
('paypal_payer_id', models.CharField(blank=True, default='', max_length=100)),
|
||||
('is_default', models.BooleanField(default=False, verbose_name='Predeterminado')),
|
||||
('created_at', models.DateTimeField(auto_now_add=True)),
|
||||
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='payment_methods', to=settings.AUTH_USER_MODEL)),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'Método de pago guardado',
|
||||
'verbose_name_plural': 'Métodos de pago guardados',
|
||||
'ordering': ['-is_default', '-created_at'],
|
||||
},
|
||||
),
|
||||
]
|
||||
Reference in New Issue
Block a user