|
@@ -92,7 +92,7 @@ class CloudStorageView(View):
|
|
elif operation == 'signplaym3u8':
|
|
elif operation == 'signplaym3u8':
|
|
return self.do_sign_play_m3u8(request_dict, response)
|
|
return self.do_sign_play_m3u8(request_dict, response)
|
|
elif operation == 'payOK':
|
|
elif operation == 'payOK':
|
|
- return self.do_pay_ok()
|
|
|
|
|
|
+ return self.do_pay_ok(request_dict)
|
|
else:
|
|
else:
|
|
token = request_dict.get('token', None)
|
|
token = request_dict.get('token', None)
|
|
# 设备主键uid
|
|
# 设备主键uid
|
|
@@ -745,8 +745,15 @@ class CloudStorageView(View):
|
|
'''
|
|
'''
|
|
return response
|
|
return response
|
|
|
|
|
|
- def do_pay_ok(self):
|
|
|
|
|
|
+ def do_pay_ok(self,request_dict):
|
|
response = HttpResponse()
|
|
response = HttpResponse()
|
|
|
|
+ paytype = request_dict.get('paytype', None)
|
|
|
|
+ showtitle = "支付成功"
|
|
|
|
+ if paytype == "10":
|
|
|
|
+ showtitle = "成功体验云存"
|
|
|
|
+
|
|
|
|
+ if paytype == "11":
|
|
|
|
+ showtitle = "兑换成功"
|
|
response.content = '''
|
|
response.content = '''
|
|
<html>
|
|
<html>
|
|
<head>
|
|
<head>
|
|
@@ -806,7 +813,7 @@ class CloudStorageView(View):
|
|
<p>
|
|
<p>
|
|
<img src="https://test.dvema.com/web/images/success.png" class="content_img">
|
|
<img src="https://test.dvema.com/web/images/success.png" class="content_img">
|
|
<br>
|
|
<br>
|
|
- 支付成功
|
|
|
|
|
|
+ '''+showtitle+'''
|
|
</p>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
<center class="bottom">
|
|
<center class="bottom">
|
|
@@ -1183,21 +1190,23 @@ class CloudStorageView(View):
|
|
order_qs.update(status=1, updTime=nowTime, uid_bucket_id=uid_bucket_id)
|
|
order_qs.update(status=1, updTime=nowTime, uid_bucket_id=uid_bucket_id)
|
|
|
|
|
|
# return response.json(0)
|
|
# return response.json(0)
|
|
|
|
+ returnurl = "{SERVER_DOMAIN}cloudstorage/payOK".format(SERVER_DOMAIN=SERVER_DOMAIN)
|
|
if pay_type == 10:
|
|
if pay_type == 10:
|
|
ExperienceContextModel.objects.create(
|
|
ExperienceContextModel.objects.create(
|
|
experience_type=0,
|
|
experience_type=0,
|
|
uid=uid,
|
|
uid=uid,
|
|
do_time=nowTime
|
|
do_time=nowTime
|
|
-
|
|
|
|
)
|
|
)
|
|
|
|
+ returnurl = "{SERVER_DOMAIN}cloudstorage/payOK?paytype=10".format(SERVER_DOMAIN=SERVER_DOMAIN)
|
|
|
|
|
|
if pay_type== 11:
|
|
if pay_type== 11:
|
|
update_dict = {}
|
|
update_dict = {}
|
|
update_dict['is_activate'] = 1
|
|
update_dict['is_activate'] = 1
|
|
update_dict['order'] = orderID
|
|
update_dict['order'] = orderID
|
|
CDKcontextModel.objects.filter(cdk=cdk).update(**update_dict)
|
|
CDKcontextModel.objects.filter(cdk=cdk).update(**update_dict)
|
|
|
|
+ returnurl = "{SERVER_DOMAIN}cloudstorage/payOK?paytype=11".format(SERVER_DOMAIN=SERVER_DOMAIN)
|
|
|
|
|
|
- result = "{SERVER_DOMAIN}cloudstorage/payOK".format(SERVER_DOMAIN=SERVER_DOMAIN)
|
|
|
|
|
|
+ result = returnurl
|
|
return response.json(0, result)
|
|
return response.json(0, result)
|
|
# red_url =
|
|
# red_url =
|
|
# return JsonResponse(status=200, data={'red_url': red_url})
|
|
# return JsonResponse(status=200, data={'red_url': red_url})
|