Преглед на файлове

更新创建订单支付类型

lang преди 4 години
родител
ревизия
0cee3a6ab2
променени са 1 файла, в които са добавени 2 реда и са изтрити 1 реда
  1. 2 1
      Controller/CloudStorage.py

+ 2 - 1
Controller/CloudStorage.py

@@ -972,7 +972,7 @@ class CloudStorageView(View):
         dv_qs = Device_Info.objects.filter(userID_id=userID, UID=uid, isShare=False, isExist=1)
         if not dv_qs.exists():
             return response.json(12)
-        smqs = Store_Meal.objects.filter(commodity_code=commodity_code, type=pay_type). \
+        smqs = Store_Meal.objects.filter(commodity_code=commodity_code, pay_type=pay_type). \
             values('currency', 'price', 'content', 'day', 'commodity_type', 'title', 'content')
         if not smqs.exists():
             return response.json(10, '套餐不存在')
@@ -1063,6 +1063,7 @@ class CloudStorageView(View):
             notify_url="{SERVER_DOMAIN_SSL}cloudstorage/dowechatnotify".format(
                 SERVER_DOMAIN_SSL=SERVER_DOMAIN_SSL)
             # 获取参数
+            price = float(price)*100
             parameter_dict = pay.get_parameter(orderID, content, price, spbill_create_ip, notify_url)
             print('parameter_dict', parameter_dict)
             # parameter_dict 参数中获取MWEB_URL 调转页面在路径后面添加redirect_url