|
@@ -1117,178 +1117,25 @@ class CloudVodView(View):
|
|
|
def do_pay_status(self, request_dict, userID, response):
|
|
|
orderID = request_dict.get('orderID', None)
|
|
|
om_qs = Order_Model.objects.filter(userID_id=userID, orderID=orderID).values('status')
|
|
|
- response = HttpResponse()
|
|
|
- success_pay_content = '''
|
|
|
-
|
|
|
- <!-- saved from url=(0040)http://test.dvema.com/cloudstorage/payOK -->
|
|
|
- <html>
|
|
|
- <head>
|
|
|
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
|
- <!--浏览器不缓存-->
|
|
|
- <meta http-equiv="Pragma" content="no-cache">
|
|
|
- <meta http-equiv="Cache-Control" content="no-cache">
|
|
|
- <meta http-equiv="Expires" content="0">
|
|
|
- <!--utf-8-->
|
|
|
-
|
|
|
- <!-- viewport的<meta>标签,这个标签可以修改在大部分的移动设备上面的显示,为了确保适当的绘制和触屏缩放。-->
|
|
|
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
- <link rel="shortcut icon" href="https://test.dvema.com/web/images/favicon.ico" type="image/x-icon" charset="utf-8">
|
|
|
- <title>支付成功</title>
|
|
|
- <style>
|
|
|
- .title_head{
|
|
|
- height: 50px;
|
|
|
- border-radius: 5px;
|
|
|
- background-color: #c3c6c7;
|
|
|
- text-align: center;
|
|
|
- line-height: 50px;
|
|
|
- }
|
|
|
- .content{
|
|
|
- text-align: center;
|
|
|
- margin-top: 50px;
|
|
|
- font-size: 15px;
|
|
|
- color:#0000008A;
|
|
|
-
|
|
|
- }
|
|
|
- .content_img{
|
|
|
- margin-bottom:15px;
|
|
|
- width: 60px;
|
|
|
- height: 60px;
|
|
|
- }
|
|
|
- .bottom{
|
|
|
- margin-bottom: 10px;
|
|
|
- margin-top: 250px;
|
|
|
- color : white;
|
|
|
- }
|
|
|
- .bottom_div{
|
|
|
- border: 1px solid #68c9c5;
|
|
|
- line-height: 38px;
|
|
|
- text-align: center;
|
|
|
- width: 100px;
|
|
|
- height: 38px;
|
|
|
- border-radius: 30px;
|
|
|
- background-color:#68c9c5;
|
|
|
- }
|
|
|
-
|
|
|
- .bottom_div:hover{
|
|
|
- background-color: #dde4e2;
|
|
|
- }
|
|
|
- </style>
|
|
|
- </head>
|
|
|
- <body style="" rlt="1" inmaintabuse="true">
|
|
|
- <div class="content">
|
|
|
- <p>
|
|
|
- <img src="https://test.dvema.com/web/images/success.png" class="content_img">
|
|
|
- <br>
|
|
|
- 支付成功
|
|
|
- </p>
|
|
|
- </div>
|
|
|
- <center class="bottom">
|
|
|
- <div class="bottom_div" onclick="payOKButton()">
|
|
|
- 完成
|
|
|
- </div>
|
|
|
- </center>
|
|
|
- <script src="./支付成功_files/hm.js.下载"></script><script> // 点击付款成功按钮
|
|
|
- function payOKButton() {
|
|
|
- // 复杂数据
|
|
|
- console.log('success')
|
|
|
- window.location.href="https://www.baidu.com?page=closePage"
|
|
|
- }
|
|
|
- </script>
|
|
|
- <div id="qds" style="display:none;"></div>
|
|
|
- </body>
|
|
|
- </html>
|
|
|
- '''
|
|
|
- falil_pay_content = '''
|
|
|
- <!DOCTYPE html>
|
|
|
- <!-- saved from url=(0301)http://test.dvema.com/cloudVod/orderStatus?orderID=20201222084512037485&token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJsYW5nIjoiY24iLCJleHAiOjE2MTEyMTg2OTEsInVzZXIiOiIxMzgwMDEzODAwMDE1NzU4ODgzNTAwNjEyMDgiLCJ1c2VySUQiOiIxMzgwMDEzODAwMDE1NzU4ODgzNTAwNjEyMDgifQ.Jjcana0NjrHzAv6CusQrVANK3Bn0gnDrc_CKDZruIgk -->
|
|
|
- <html>
|
|
|
- <head>
|
|
|
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
|
- <!--浏览器不缓存-->
|
|
|
- <meta http-equiv="Pragma" content="no-cache">
|
|
|
- <meta http-equiv="Cache-Control" content="no-cache">
|
|
|
- <meta http-equiv="Expires" content="0">
|
|
|
- <!--utf-8-->
|
|
|
-
|
|
|
- <!-- viewport的<meta>标签,这个标签可以修改在大部分的移动设备上面的显示,为了确保适当的绘制和触屏缩放。-->
|
|
|
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
- <link rel="shortcut icon" href="https://test.dvema.com/web/images/favicon.ico" type="image/x-icon" charset="utf-8">
|
|
|
- <title>支付失败</title>
|
|
|
- <style>
|
|
|
- .title_head{
|
|
|
- height: 50px;
|
|
|
- border-radius: 5px;
|
|
|
- background-color: #c3c6c7;
|
|
|
- text-align: center;
|
|
|
- line-height: 50px;
|
|
|
- }
|
|
|
- .content{
|
|
|
- text-align: center;
|
|
|
- margin-top: 50px;
|
|
|
- font-size: 20px;
|
|
|
- color : #0000008A;
|
|
|
- }
|
|
|
- .content_img{
|
|
|
- margin-bottom:15px;
|
|
|
- width: 60px;
|
|
|
- height: 60px;
|
|
|
- }
|
|
|
- .bottom{
|
|
|
- margin-bottom: 10px;
|
|
|
- margin-top: 250px;
|
|
|
- color : #fff;
|
|
|
- }
|
|
|
- .bottom_div{
|
|
|
- border: 1px solid #68c9c5;
|
|
|
- line-height: 38px;
|
|
|
- text-align: center;
|
|
|
- width: 100px;
|
|
|
- height: 38px;
|
|
|
- border-radius: 30px;
|
|
|
- background-color:rgba(199, 0, 11, 1);
|
|
|
- }
|
|
|
-
|
|
|
- .bottom_div:hover{
|
|
|
- background-color: #dde4e2;
|
|
|
- }
|
|
|
- </style>
|
|
|
- </head>
|
|
|
- <body>
|
|
|
- <div class="content">
|
|
|
- <p>
|
|
|
- <img src="https://test.dvema.com/web/images/fail.png" class="content_img">
|
|
|
- <br>
|
|
|
- 支付失败
|
|
|
- </p>
|
|
|
- </div>
|
|
|
- <center class="bottom">
|
|
|
- <div class="bottom_div" onclick="payOKButton()">
|
|
|
- 完成
|
|
|
- </div>
|
|
|
- </center>
|
|
|
- <script> // 点击付款成功按钮
|
|
|
- function payOKButton() {
|
|
|
- // 复杂数据
|
|
|
- console.log('success')
|
|
|
- //window.webkit.messageHandlers.jsCallOC.postMessage({"status": 0});
|
|
|
- window.location.href="https://www.baidu.com?page=closePage"
|
|
|
- }
|
|
|
- </script>
|
|
|
- </body>
|
|
|
- </html>
|
|
|
- '''
|
|
|
+ # response = HttpResponse()
|
|
|
+ # success_pay_content = '''
|
|
|
+ # '''
|
|
|
+ # falil_pay_content = '''
|
|
|
+ #
|
|
|
+ # '''
|
|
|
if om_qs.exists():
|
|
|
if om_qs[0]['status'] == 1:
|
|
|
- response.content = success_pay_content
|
|
|
- return response
|
|
|
+ # return response.json(0, res)
|
|
|
+ res = {'1': 1, 'url': 'https://test.dvema.com/web/paid2/success.html'}
|
|
|
+ return response.json(0, res)
|
|
|
else:
|
|
|
|
|
|
- response.content = falil_pay_content
|
|
|
- return response
|
|
|
+ res = {'0': 0, 'url': 'https://test.dvema.com/web/paid2/fail.html'}
|
|
|
+ return response.json(0, res)
|
|
|
|
|
|
else:
|
|
|
- response.content = falil_pay_content
|
|
|
- return response
|
|
|
+ res = {'0': 0, 'url': 'https://test.dvema.com/web/paid2/fail.html'}
|
|
|
+ return response.json(0, res)
|
|
|
|
|
|
def query_alipay_order(self, request_dict, userID, response):
|
|
|
out_trade_no = request_dict.get('out_trade_no', None)
|