|
@@ -202,7 +202,7 @@ class CloudStorageView(View):
|
|
|
def do_commodity_list(self, request_dict, userID, response):
|
|
|
mold = request_dict.get('mold', None)
|
|
|
uid = request_dict.get('uid', None)
|
|
|
- lang = response.lang
|
|
|
+ lang = request_dict.get('lang', None)
|
|
|
qs = Store_Meal.objects
|
|
|
eq = ExperienceContextModel.objects.filter(uid=uid, experience_type=0).values('id')
|
|
|
# userqs = Device_User.objects.filter(userID=userID).values('is_experience')
|
|
@@ -638,12 +638,22 @@ class CloudStorageView(View):
|
|
|
def do_pay_ok(self, request_dict):
|
|
|
response = HttpResponse()
|
|
|
paytype = request_dict.get('paytype', None)
|
|
|
+ lang = request_dict.get('lang', None)
|
|
|
+
|
|
|
showtitle = "支付成功"
|
|
|
- if paytype == "10":
|
|
|
+ if paytype == "10" :
|
|
|
showtitle = "成功体验云存"
|
|
|
|
|
|
if paytype == "11":
|
|
|
showtitle = "兑换成功"
|
|
|
+
|
|
|
+ if lang != 'cn':
|
|
|
+ showtitle = "Payment successful"
|
|
|
+ if paytype == "10":
|
|
|
+ showtitle = "Successful experience of cloud storage"
|
|
|
+
|
|
|
+ if paytype == "11":
|
|
|
+ showtitle = "Successful exchange"
|
|
|
response.content = '''
|
|
|
<html>
|
|
|
<head>
|
|
@@ -795,12 +805,16 @@ class CloudStorageView(View):
|
|
|
sys_msg_text_list = ['成功购买云存', 'Successful purchase of cloud storage']
|
|
|
self.do_vod_msg_Notice(UID, channel, userid, lang, sys_msg_text_list)
|
|
|
red_url = "{SERVER_DOMAIN}web/paid2/success.html".format(SERVER_DOMAIN=SERVER_DOMAIN)
|
|
|
+ if lang != 'cn':
|
|
|
+ red_url = "{SERVER_DOMAIN}web/paid2/en_success.html".format(SERVER_DOMAIN=SERVER_DOMAIN)
|
|
|
return HttpResponseRedirect(red_url)
|
|
|
return response.json(0, signature)
|
|
|
except Exception as e:
|
|
|
if order_qs:
|
|
|
order_qs.update(status=10)
|
|
|
red_url = "{SERVER_DOMAIN}web/paid2/fail.html".format(SERVER_DOMAIN=SERVER_DOMAIN)
|
|
|
+ if lang != 'cn':
|
|
|
+ red_url = "{SERVER_DOMAIN}web/paid2/en_fail.html".format(SERVER_DOMAIN=SERVER_DOMAIN)
|
|
|
return HttpResponseRedirect(red_url)
|
|
|
|
|
|
def do_pay_by_paypal_callback(self, request_dict, response):
|
|
@@ -873,6 +887,8 @@ class CloudStorageView(View):
|
|
|
|
|
|
# return response.json(0)
|
|
|
red_url = "{SERVER_DOMAIN}web/paid2/success.html".format(SERVER_DOMAIN=SERVER_DOMAIN)
|
|
|
+ if lang != 'cn':
|
|
|
+ red_url = "{SERVER_DOMAIN}web/paid2/en_success.html".format(SERVER_DOMAIN=SERVER_DOMAIN)
|
|
|
return HttpResponseRedirect(red_url)
|
|
|
except Exception as e:
|
|
|
print(repr(e))
|
|
@@ -880,6 +896,8 @@ class CloudStorageView(View):
|
|
|
order_qs.update(status=10)
|
|
|
|
|
|
red_url = "{SERVER_DOMAIN}web/paid2/fail.html".format(SERVER_DOMAIN=SERVER_DOMAIN)
|
|
|
+ if lang != 'cn':
|
|
|
+ red_url = "{SERVER_DOMAIN}web/paid2/en_fail.html".format(SERVER_DOMAIN=SERVER_DOMAIN)
|
|
|
return HttpResponseRedirect(red_url)
|
|
|
|
|
|
def do_pay_by_wechat_callback(self, request, response):
|
|
@@ -1198,14 +1216,14 @@ class CloudStorageView(View):
|
|
|
|
|
|
sys_msg_text_list = ['成功购买云存', 'Successful purchase of cloud storage']
|
|
|
# return response.json(0)
|
|
|
- returnurl = "{SERVER_DOMAIN}cloudstorage/payOK".format(SERVER_DOMAIN=SERVER_DOMAIN)
|
|
|
+ returnurl = "{SERVER_DOMAIN}cloudstorage/payOK?{lang}".format(SERVER_DOMAIN=SERVER_DOMAIN,lang=lang)
|
|
|
if pay_type == 10:
|
|
|
ExperienceContextModel.objects.create(
|
|
|
experience_type=0,
|
|
|
uid=uid,
|
|
|
do_time=nowTime
|
|
|
)
|
|
|
- returnurl = "{SERVER_DOMAIN}cloudstorage/payOK?paytype=10".format(SERVER_DOMAIN=SERVER_DOMAIN)
|
|
|
+ returnurl = "{SERVER_DOMAIN}cloudstorage/payOK?paytype=10&{lang}".format(SERVER_DOMAIN=SERVER_DOMAIN,lang=lang)
|
|
|
sys_msg_text_list = ['成功体验云存', 'Successful experience of cloud storage']
|
|
|
|
|
|
if pay_type == 11:
|
|
@@ -1213,7 +1231,7 @@ class CloudStorageView(View):
|
|
|
update_dict['is_activate'] = 1
|
|
|
update_dict['order'] = orderID
|
|
|
CDKcontextModel.objects.filter(cdk=cdk).update(**update_dict)
|
|
|
- returnurl = "{SERVER_DOMAIN}cloudstorage/payOK?paytype=11".format(SERVER_DOMAIN=SERVER_DOMAIN)
|
|
|
+ returnurl = "{SERVER_DOMAIN}cloudstorage/payOK?paytype=11&{lang}".format(SERVER_DOMAIN=SERVER_DOMAIN,lang=lang)
|
|
|
sys_msg_text_list = ['成功兑换云存', 'Successful exchange of cloud storage']
|
|
|
|
|
|
|