|
@@ -126,15 +126,15 @@ 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']
|
|
|
-
|
|
|
+ # data = request.POST.dict()
|
|
|
+ # signature = data["sign"]
|
|
|
+ # data.pop('sign')
|
|
|
+ # orderID = data['out_trade_no']
|
|
|
+ orderID = '20190425014713940619'
|
|
|
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
|
|
@@ -212,8 +212,6 @@ class CloudVodView(View):
|
|
|
if ubqs.exists():
|
|
|
if ubqs[0]['bucket__region'] != smqs[0]['bucket__region']:
|
|
|
return response.json(712) # 区域不一致
|
|
|
- # elif ubqs[0]['bucket__storeDay'] > smqs[0]['bucket__storeDay']:
|
|
|
- # return response.json(711) # 不可降级
|
|
|
elif ubqs[0]['bucket__storeDay'] != smqs[0]['bucket__storeDay']:
|
|
|
return response.json(713) # 不可更改套餐
|
|
|
# 续费流程
|
|
@@ -230,17 +228,12 @@ 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))
|
|
|
return response.json(10, repr(e))
|
|
|
if order_string:
|
|
|
- # redirectUrl = "https://openapi.alipaydev.com/gateway.do?" + order_string
|
|
|
- redirectUrl = "https://openapi.alipay.com/gateway.do?" + order_string
|
|
|
- # from django.http import HttpResponseRedirect
|
|
|
- # return HttpResponseRedirect("https://openapi.alipaydev.com/gateway.do?" + order_string)
|
|
|
+ redirectUrl = aliPayObj.alipay_prefix + order_string
|
|
|
Order_Model.objects.create(orderID=orderID, UID=uid, channel=channel, userID_id=userID, desc=content,
|
|
|
price=price, currency=currency, addTime=nowTime, updTime=nowTime,
|
|
|
endTime=nowTime + int(day) * 3600 * 24, rank_id=rank, paypal='', payType=1)
|