fix: sorted imports
This commit is contained in:
+2
-1
@@ -1,7 +1,8 @@
|
||||
from django.contrib import admin
|
||||
from tpv.models import PaymentTransaction
|
||||
from unfold.admin import ModelAdmin
|
||||
|
||||
from tpv.models import PaymentTransaction
|
||||
|
||||
|
||||
# Register your models here.
|
||||
@admin.register(PaymentTransaction)
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
# Generated by Django 5.0.6 on 2024-05-21 17:19
|
||||
|
||||
import tpv.models
|
||||
import uuid
|
||||
from decimal import Decimal
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
import tpv.models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
from decimal import Decimal
|
||||
from uuid import uuid4
|
||||
|
||||
from django.db import models
|
||||
from django.utils.text import gettext_lazy as _
|
||||
|
||||
|
||||
+4
-5
@@ -1,15 +1,14 @@
|
||||
import base64
|
||||
import json
|
||||
import requests
|
||||
|
||||
import requests
|
||||
from django.conf import settings
|
||||
from django.urls import reverse
|
||||
|
||||
from tpv.models import PaymentTransaction
|
||||
from tpv.utils import compute_signature, decode_b64_dict
|
||||
from tpv.settings import TransactionTypes
|
||||
|
||||
from tpv.exceptions import RedsysPaymentException
|
||||
from tpv.models import PaymentTransaction
|
||||
from tpv.settings import TransactionTypes
|
||||
from tpv.utils import compute_signature, decode_b64_dict
|
||||
|
||||
|
||||
class RedsysClient:
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
from django.dispatch import Signal
|
||||
|
||||
|
||||
redsys_payment_accepted = Signal()
|
||||
redsys_payment_rejected = Signal()
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
import base64
|
||||
import json
|
||||
from decimal import Decimal
|
||||
|
||||
from django.conf import settings
|
||||
from django.urls import reverse
|
||||
from django.utils import timezone
|
||||
from rest_framework import status
|
||||
from rest_framework.test import APITestCase
|
||||
from django.conf import settings
|
||||
from django.utils import timezone
|
||||
|
||||
from tpv.models import PaymentTransaction
|
||||
from tpv.redsys import RedsysClient
|
||||
from tpv.settings import ERROR_CODES
|
||||
|
||||
from tpv.utils import validate_expiry_date
|
||||
|
||||
|
||||
|
||||
+3
-7
@@ -1,11 +1,7 @@
|
||||
from django.urls import path
|
||||
from tpv.views import (
|
||||
transaction_created,
|
||||
webhook,
|
||||
payment_accepted,
|
||||
payment_rejected,
|
||||
payment_form,
|
||||
)
|
||||
|
||||
from tpv.views import (payment_accepted, payment_form, payment_rejected,
|
||||
transaction_created, webhook)
|
||||
|
||||
app_name = "tpv"
|
||||
|
||||
|
||||
+4
-5
@@ -2,15 +2,14 @@ import base64
|
||||
import hashlib
|
||||
import hmac
|
||||
import json
|
||||
import re
|
||||
from decimal import Decimal
|
||||
|
||||
import pyDes
|
||||
import re
|
||||
|
||||
from decimal import Decimal
|
||||
from django.utils.text import gettext_lazy as _
|
||||
from django.utils import timezone
|
||||
from django.utils.text import gettext_lazy as _
|
||||
|
||||
from tpv.exceptions import RedsysValidationException, RedsysPaymentException
|
||||
from tpv.exceptions import RedsysPaymentException, RedsysValidationException
|
||||
from tpv.models import PaymentTransaction
|
||||
from tpv.settings import ERROR_CODES
|
||||
from tpv.signals import redsys_payment_accepted
|
||||
|
||||
+3
-3
@@ -1,14 +1,14 @@
|
||||
from django.http.response import HttpResponse
|
||||
from django.shortcuts import get_object_or_404, redirect, render
|
||||
from django.urls import reverse
|
||||
from django.views.decorators.csrf import csrf_exempt
|
||||
from django.shortcuts import render, get_object_or_404, redirect
|
||||
from django.http.response import HttpResponse
|
||||
from django.views.generic import TemplateView
|
||||
|
||||
from tpv.forms import UpdateEmailForm
|
||||
from tpv.models import PaymentTransaction
|
||||
from tpv.redsys import RedsysClient
|
||||
from tpv.utils import pay_transaction, validate_payment_for_transaction
|
||||
from tpv.signals import redsys_payment_accepted, redsys_payment_rejected
|
||||
from tpv.utils import pay_transaction, validate_payment_for_transaction
|
||||
|
||||
|
||||
def payment_accepted(request, transaction):
|
||||
|
||||
Reference in New Issue
Block a user