chenjunkai 6 жил өмнө
parent
commit
280d729017

+ 4 - 5
Controller/CloudVod.py

@@ -97,10 +97,9 @@ class CloudVodView(View):
         uid = qs[0]['UID']
         nowTime = int(time.time())
         orderID = CommonService.createID()
-        if rank == '1':
-            price = 30
-        elif rank == '2':
-            price = 360
+        smqs = Store_Meal.objects.filter(id=rank).values("currency","price")
+        currency = smqs[0]['currency']
+        price = smqs[0]['price']
         # call_sub_url = "{SERVER_DOMAIN}cloudVod/payExecute?orderID={orderID}".format(SERVER_DOMAIN=SERVER_DOMAIN,orderID=orderID)
         call_sub_url = "http://192.168.136.40:8077/cloudVod/payExecute?orderID={orderID}".format(
             SERVER_DOMAIN=SERVER_DOMAIN, orderID=orderID)
@@ -117,7 +116,7 @@ class CloudVodView(View):
             "transactions": [{
                 "item_list": {
                     "items": [{"name": "Cloud video", "sku": "1", "price": price, "currency": "USD", "quantity": 1}]},
-                "amount": {"total": price, "currency": "USD"},
+                "amount": {"total": price, "currency": currency},
                 "description": "7 days mobile detection storage event 1 month charge"
             }]})