diff --git a/osinaweb/customercore/__pycache__/views.cpython-310.pyc b/osinaweb/customercore/__pycache__/views.cpython-310.pyc index e3cbdb28..7d77bfe8 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 ee4c5da2..bed1c973 100644 --- a/osinaweb/customercore/views.py +++ b/osinaweb/customercore/views.py @@ -224,10 +224,9 @@ def check_order_status(request, merchant_id, order_id): due_date = order_item.purchased_at + timedelta(days=recurring_cycle) order_item.due_at = due_date order_item.save() - if order_item.item.type == 'OSIMENU': - api_url = 'https://osimenu.com/api/create-subscription/' - random_string = ''.join(random.choices(string.ascii_letters + string.digits, k=10)) - api_data = { + api_url = 'https://osimenu.com/api/create-subscription/' + random_string = ''.join(random.choices(string.ascii_letters + string.digits, k=10)) + api_data = { 'user': { 'username': request.user.email, 'email': request.user.email, @@ -241,9 +240,8 @@ def check_order_status(request, merchant_id, order_id): 'subscription': { 'plan': order_item.item.title } - } - response = requests.post(api_url, json=api_data) - print(response) + } + response = requests.post(api_url, json=api_data) return redirect('orders') error_message = 'Failed to retrieve order details: ' + response.text return JsonResponse({'error': error_message}, status=500)