Browse Source

微信支付

chenshibin 4 years ago
parent
commit
e9a1537e4e
1 changed files with 6 additions and 7 deletions
  1. 6 7
      Controller/CloudStorage.py

+ 6 - 7
Controller/CloudStorage.py

@@ -985,10 +985,10 @@ class CloudStorageView(View):
 
 
         orderID = CommonService.createOrderID()
         orderID = CommonService.createOrderID()
         if pay_type == 1:
         if pay_type == 1:
-            #call_sub_url = "{SERVER_DOMAIN}cloudstorage/dopaypalcallback?orderID={orderID}". \
-                #format(SERVER_DOMAIN=SERVER_DOMAIN, orderID=orderID)
-            call_sub_url = "http://binbin.uicp.vip/cloudstorage/dopaypalcallback?orderID={orderID}".format(
-                 SERVER_DOMAIN=SERVER_DOMAIN, orderID=orderID)
+            call_sub_url = "{SERVER_DOMAIN}cloudstorage/dopaypalcallback?orderID={orderID}". \
+                format(SERVER_DOMAIN=SERVER_DOMAIN, orderID=orderID)
+            # call_sub_url = "http://binbin.uicp.vip/cloudstorage/dopaypalcallback?orderID={orderID}".format(
+            # SERVER_DOMAIN=SERVER_DOMAIN, orderID=orderID)
             call_clc_url = "{SERVER_DOMAIN}web/paid2/fail.html".format(SERVER_DOMAIN=SERVER_DOMAIN)
             call_clc_url = "{SERVER_DOMAIN}web/paid2/fail.html".format(SERVER_DOMAIN=SERVER_DOMAIN)
             paypalrestsdk.configure(PAYPAL_CRD)
             paypalrestsdk.configure(PAYPAL_CRD)
             payment = paypalrestsdk.Payment({
             payment = paypalrestsdk.Payment({
@@ -1070,12 +1070,11 @@ class CloudStorageView(View):
             # 获取参数
             # 获取参数
             response = ResponseObject()
             response = ResponseObject()
 
 
-            price = float(price) * 100
-            parameter_dict = pay.get_parameter(orderID, content, price, ip, notify_url)
+            parameter_dict = pay.get_parameter(orderID, content, float(price) * 100, ip, notify_url)
             print('parameter_dict', parameter_dict)
             print('parameter_dict', parameter_dict)
             # parameter_dict 参数中获取MWEB_URL 调转页面在路径后面添加redirect_url
             # parameter_dict 参数中获取MWEB_URL 调转页面在路径后面添加redirect_url
             # 统一调用接口
             # 统一调用接口
-            response = pay.re_finall()
+            response = pay.re_finall(orderid=orderID)
             if not response:
             if not response:
                 return response.json(10, '生成订单错误.')
                 return response.json(10, '生成订单错误.')
             # 回调函数
             # 回调函数