|
@@ -126,15 +126,14 @@ class CloudVodView(View):
|
|
|
|
|
|
def do_ali_pay_callback(self, request):
|
|
|
response = ResponseObject()
|
|
|
- # data = request.POST.dict()
|
|
|
- # signature = data["sign"]
|
|
|
- # data.pop('sign')
|
|
|
- # orderID = data['out_trade_no']
|
|
|
- orderID = '20190425014713940619'
|
|
|
+ data = request.POST.dict()
|
|
|
+ signature = data["sign"]
|
|
|
+ data.pop('sign')
|
|
|
+ orderID = data['out_trade_no']
|
|
|
+
|
|
|
order_qs = Order_Model.objects.filter(orderID=orderID, status=0)
|
|
|
if not order_qs.exists():
|
|
|
return response.json(404)
|
|
|
- return response.json(10,'ss')
|
|
|
print(json.dumps(data))
|
|
|
print(signature)
|
|
|
# verify
|
|
@@ -228,6 +227,8 @@ class CloudVodView(View):
|
|
|
# subject="实用性充气式玩具",
|
|
|
return_url="https://test.dvema.com/cloudVod/payOK",
|
|
|
notify_url="https://test.dvema.com/cloudVod/aliPayCallback"
|
|
|
+ # return_url="http://192.168.136.40/cloudVod/payOK",
|
|
|
+ # notify_url="http://192.168.136.40/cloudVod/aliPayCallback"
|
|
|
)
|
|
|
except Exception as e:
|
|
|
print(repr(e))
|
|
@@ -920,6 +921,9 @@ class CloudVodView(View):
|
|
|
response.content = success_pay_content
|
|
|
return response
|
|
|
else:
|
|
|
+ response.content = falil_pay_content
|
|
|
+ return response
|
|
|
+ exit()
|
|
|
# 如果未支付则调用查询订单是否支付成功
|
|
|
aliPayObj = AliPayObject()
|
|
|
alipay = aliPayObj.conf()
|