diff --git a/osinaweb/customercore/__pycache__/views.cpython-310.pyc b/osinaweb/customercore/__pycache__/views.cpython-310.pyc index c81f13d6..bc22b244 100644 Binary files a/osinaweb/customercore/__pycache__/views.cpython-310.pyc and b/osinaweb/customercore/__pycache__/views.cpython-310.pyc differ diff --git a/osinaweb/customercore/views.py b/osinaweb/customercore/views.py index 445ee279..bfd60fdc 100644 --- a/osinaweb/customercore/views.py +++ b/osinaweb/customercore/views.py @@ -3,6 +3,7 @@ from django.contrib.auth.decorators import login_required from django.http import JsonResponse import requests from .decorators import * +import uuid # Create your views here. @customer_login_required @@ -43,6 +44,8 @@ def initiate_checkout(request): api_password = "37846250a67c70e7fe9f82cf6ca81f93" merchant_id = "TEST06127800" merchant_name = "Ositcom Sal" + + order_id = str(uuid.uuid4())[:8] # Data for Initiate Checkout operation data = { @@ -52,7 +55,7 @@ def initiate_checkout(request): "merchant": merchant_id, "interaction.operation": "PURCHASE", "interaction.merchant.name": merchant_name, - "order.id": "123", + "order.id": order_id, "order.amount": "100.00", "order.currency": "USD", "order.description": "description_of_order"