From 6cf258957ba3c7bd61df32dda21839a1beec7c99 Mon Sep 17 00:00:00 2001 From: emile Date: Tue, 23 Apr 2024 21:05:56 +0300 Subject: [PATCH] lol --- .../__pycache__/views.cpython-310.pyc | Bin 6983 -> 6937 bytes osinaweb/customercore/views.py | 12 +++++------- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/osinaweb/customercore/__pycache__/views.cpython-310.pyc b/osinaweb/customercore/__pycache__/views.cpython-310.pyc index e3cbdb281b4242124fe99a6489b42c366bfaa34a..7d77bfe8857afb6ceca38b94dc0e21bd76834ca9 100644 GIT binary patch delta 541 zcmYk2&ubGw6vyXn(`>ToW_Po{H%V(WrH9fAiaA-qyLhQJh+c$Ia6O32UJSEnNPj6r ziBGMC7Lubk^*;~~p1la(dJ((`iU^9J&Rab=Fdx3}$9LXi-gI_5)f>95F?rU$FI@dN z|Dt-uf^AH#&e3~mAyz~|6uCN7GF7PYG%sCOl8I2q#R-LMS;Y5N3(nwA zYxy=eGM$@aGqvJcYR8VeuFtr|YeQuMSyiyui~WE68wGh3a(i!@JGqYH`ZeIL(Beki zl*-$i$_%;Etk8wQeOl?}>2!_<1L(3<#zVQ_A)jSty3*p2Fr}r=8$*SPUB)E~EIoYd zHL%PA)^m6>JtC|D_z9y5oLGs62ZW?ij7~Q)u|IR^M3#cSc>WZ delta 615 zcmZvY&ui2`6vyYyrb(LJO){I!CY$cIuC*&7)Pt~sHxC{Je;n3Yszp$yf)TBTNU2P; zWvf+TRXWwSvcfKiAfCjNS3P+0pcj7})Qf+DUW%?W(W4pinfJbLzHc70(RkA^XY+Xj ziSNSC?PpHbpPMrTIy@$gU8}JYVx};aYHgfoObZ97ehx>^nATN$DAAeT#dNR-)DY?; z{)yD!7~dr0*O(F7A)%I#*QlN3Dd`qsCoINpSQ5YIAzGkL8}}eF84CTd{EvULAkBto zu`@v3G_Hizvp`E}-(eAXolIhh@kUslS=5)~#ao!x0zjAc#pi3Z+=5BeL^KdnZ}m`O z$D?$J*}__()i##3Nkjz|6mOe<3n(Fgt`zBTJjO^1{^wB9lyD^EDiM9teGcZ(ju8&d zhr#38k>-Iz`wvg>kIpx!^OwcxY&0%j^|KPsU!38tJCUu4G&&`5nqPLm!!$op+S$l~ z0u@j*Dqv8>QZ@}8_jLvL)gPv%170w|fC8vr%+Z`UsW0H)(F*_SS6;j?IS?$#hSw!- zNGwa-l(@zF-jsJ+gip07E0sGEcO~xeS${VM;E(;iur8Waf%9MfqPr@qixT%G9!RY5 sci7=i$|PF{k#0!sA%9g~Qqyaf`N80*y&~21v?O7rp4UM$vnMz92jgv;*8l(j 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)