Bläddra i källkod

微信支付测试回调

chenshibin 4 år sedan
förälder
incheckning
887491963b
1 ändrade filer med 10 tillägg och 4 borttagningar
  1. 10 4
      Controller/CloudStorage.py

+ 10 - 4
Controller/CloudStorage.py

@@ -43,7 +43,7 @@ from django.db.models import Q
 
 from Service.ModelService import ModelService
 
-SERVER_DOMAIN = 'https://test.dvema.com/'
+SERVER_DOMAIN = 'http://test.dvema.com/'
 
 '''
 生成订单
@@ -951,7 +951,8 @@ class CloudStorageView(View):
         print("进来了,微信支付成功回调")
         response = ResponseObject()
         asy = threading.Thread(target=ModelService.add_log,
-                               args=(CommonService.get_ip_address( request_dict.get('out_trade_no',None)), request_dict.get('out_trade_no',None), '进来了,微信支付成功回调'))
+                               args=('回调',
+                                     '回调', '进来了,微信支付成功回调'))
         asy.start()
         if result_code == 'SUCCESS':
             response = HttpResponse()
@@ -1122,9 +1123,14 @@ class CloudStorageView(View):
         elif pay_type == 3:
             pay = WechatPayObject()
             notify_url="{SERVER_DOMAIN_SSL}cloudstorage/dowechatnotify".format(
-                SERVER_DOMAIN_SSL=SERVER_DOMAIN)
-            # notify_url = "http://192.168.136.103/cloudstorage/doalicallback"
+                SERVER_DOMAIN_SSL=SERVER_DOMAIN_SSL)
             # 获取参数
+            print("进来了,微信支付成功回调")
+            response = ResponseObject()
+            asy = threading.Thread(target=ModelService.add_log,
+                                   args=(orderID,
+                                         orderID, '进来了,微信支付创建订单'+notify_url))
+            asy.start()
             price = float(price)*100
             parameter_dict = pay.get_parameter(orderID, content, price, ip, notify_url)
             print('parameter_dict', parameter_dict)