@@ -671,6 +671,7 @@ class AiView(View):
pay_url = "{}AiService/doWechatCallBack".format(SERVER_DOMAIN_SSL)
try:
pay = WechatPayObject()
+ content = CommonService.Package_Type(1, content) # AI套餐
pay.get_parameter(order_id, content, float(price) * 100, ip, pay_url, quote("lang=" + lang))
sign_params = pay.re_finall(orderid=order_id)
if not sign_params:
@@ -1247,6 +1247,7 @@ class CloudStorageView(View):
notify_url = "{SERVER_DOMAIN_SSL}cloudstorage/dowechatnotify".format(
SERVER_DOMAIN_SSL=SERVER_DOMAIN_SSL)
+ content = CommonService.Package_Type(0, content) # 云存套餐
# 获取参数
parameter_dict = pay.get_parameter(order_id, content, float(price) * 100, ip, notify_url,
quote("lang=" + lang))
@@ -737,3 +737,19 @@ GCqvlyw5dfxNA+EtxNE2wCW/LW7ENJlACgcfgPlBZtpLheWoZB/maw4=
@param e: 列表元素
"""
return sorted(e, key=lambda item: -item['count'])
+
+ @staticmethod
+ def Package_Type(order_type, content):
+ """
+ 套餐类型
+ if order_type == 0:
+ content = content + '(' + '云存' + ')'
+ return content
+ elif order_type == 1:
+ content = content + '(' + 'AI' + ')'
+ elif order_type == 2:
+ pass