diff --git a/osinaweb/customercore/__pycache__/urls.cpython-310.pyc b/osinaweb/customercore/__pycache__/urls.cpython-310.pyc index 901ec3ca..7ecfcb8e 100644 Binary files a/osinaweb/customercore/__pycache__/urls.cpython-310.pyc and b/osinaweb/customercore/__pycache__/urls.cpython-310.pyc differ diff --git a/osinaweb/customercore/__pycache__/views.cpython-310.pyc b/osinaweb/customercore/__pycache__/views.cpython-310.pyc index a6357399..d9cc8055 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/urls.py b/osinaweb/customercore/urls.py index c99dda18..1a1f464a 100644 --- a/osinaweb/customercore/urls.py +++ b/osinaweb/customercore/urls.py @@ -8,6 +8,7 @@ urlpatterns = [ path('products/', views.customer_products, name='customerproducts'), path('pricing/', views.pricing, name='pricing'), path('initiate_checkout/', views.initiate_checkout, name='initiatecheckout'), + path('webhook/', views.webhook_handler, name='webhook_handler'), ] diff --git a/osinaweb/customercore/views.py b/osinaweb/customercore/views.py index 37e7e0a4..000c46e3 100644 --- a/osinaweb/customercore/views.py +++ b/osinaweb/customercore/views.py @@ -4,8 +4,6 @@ from django.http import JsonResponse import requests from .decorators import * import uuid -import urllib.parse - # Create your views here. @customer_login_required @@ -76,4 +74,12 @@ def initiate_checkout(request): return JsonResponse({'error': 'Failed to initiate checkout'}, status=500) except Exception as e: print('Exception:', e) - return JsonResponse({'error': 'Internal Server Error'}, status=500) \ No newline at end of file + return JsonResponse({'error': 'Internal Server Error'}, status=500) + + + +def webhook_handler(request): + + project_type = ProjectType.objects.create(name='Hello') + + return JsonResponse({'message': 'Webhook received and processed successfully'}, status=200)