Skip to content

Commit

Permalink
cleanup, codecube fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mariofix committed Dec 18, 2024
1 parent 752c887 commit 7e53daf
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 255 deletions.
249 changes: 0 additions & 249 deletions django_payments_chile/PaykuProvider.py

This file was deleted.

2 changes: 1 addition & 1 deletion django_payments_chile/clientes.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
@dataclass
class ClienteAPI:
@classmethod
def genera_firma(cls, datos: list, secret_key: str):
def genera_firma(cls, datos: dict, secret_key: str):
datos_flow = "".join(f"{str(key)}{str(value)}" for key, value in datos.items())
firma = hmac.new(key=secret_key.encode(), msg=datos_flow.encode(), digestmod=hashlib.sha256)
return firma.hexdigest()
6 changes: 3 additions & 3 deletions tests/test_khipuprovider.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,16 @@ def change_status(self, status, message=""):
self.message = message

def get_failure_url(self):
return "http://mi-app.cl/error"
return "https://mi-app.cl/error"

def get_process_url(self):
return "http://mi-app.cl/process"
return "https://mi-app.cl/process"

def get_purchased_items(self):
return []

def get_success_url(self):
return "http://mi-app.cl/exito"
return "https://mi-app.cl/exito"


class TestKhipuProvider(TestCase):
Expand Down
4 changes: 2 additions & 2 deletions tienda_pruebas/pagos/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@


def crear_pago(request):
Payment = get_payment_model()
payment = Payment.objects.create(
payment = get_payment_model()
payment = payment.objects.create(
variant="flow", # Debe coincidir con el nombre en PAYMENT_VARIANTS
description="Pago por Orden #123",
total=10000, # Monto en centavos (100 pesos)
Expand Down

0 comments on commit 7e53daf

Please sign in to comment.