Browse Source

支付成功界面 中英文

chenshibin 4 years ago
parent
commit
cdee3f55a2
1 changed files with 14 additions and 4 deletions
  1. 14 4
      Controller/CloudStorage.py

+ 14 - 4
Controller/CloudStorage.py

@@ -636,12 +636,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 == 'en':
+            showtitle = "Payment successful"
+            if paytype == "10":
+                showtitle = "Successful experience of cloud storage"
+
+            if paytype == "11":
+                showtitle = "Successful exchange"
         response.content = '''
 <html>
 <head>
@@ -1196,14 +1206,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:
@@ -1211,7 +1221,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']