|
@@ -214,6 +214,11 @@ class CloudVodView(View):
|
|
elif ubqs[0]['bucket__region'] != smqs[0]['bucket__region']:
|
|
elif ubqs[0]['bucket__region'] != smqs[0]['bucket__region']:
|
|
return response.json(10,'区域不一致')
|
|
return response.json(10,'区域不一致')
|
|
# 续费流程
|
|
# 续费流程
|
|
|
|
+ nowTime = CommonService.get_utc()
|
|
|
|
+ # 判断是否存在未完成订单
|
|
|
|
+ hasOrder = Order_Model.objects.filter(UID=uid,channel=channel,addTime__gte=3600+nowTime,status=0,rank_id=rank).values('paypal')
|
|
|
|
+ if hasOrder.exists():
|
|
|
|
+ return response.json(0, {"redirectUrl": hasOrder[0].paypal})
|
|
# 新增流程
|
|
# 新增流程
|
|
orderID = CommonService.createOrderID()
|
|
orderID = CommonService.createOrderID()
|
|
call_sub_url = "{SERVER_DOMAIN}cloudVod/payExecute?orderID={orderID}". \
|
|
call_sub_url = "{SERVER_DOMAIN}cloudVod/payExecute?orderID={orderID}". \
|
|
@@ -244,7 +249,6 @@ class CloudVodView(View):
|
|
print(payment.error)
|
|
print(payment.error)
|
|
return response.json(10, payment.error)
|
|
return response.json(10, payment.error)
|
|
print(payment)
|
|
print(payment)
|
|
- nowTime = CommonService.get_utc()
|
|
|
|
for link in payment.links:
|
|
for link in payment.links:
|
|
if link.rel == "approval_url":
|
|
if link.rel == "approval_url":
|
|
approval_url = str(link.href)
|
|
approval_url = str(link.href)
|