|
@@ -26,7 +26,7 @@ from django.views.decorators.csrf import csrf_exempt
|
|
|
from django.views.generic.base import View
|
|
|
import urllib
|
|
|
|
|
|
-from Ansjer.config import OSS_BUCKET_ENDPOINT, OSS_BUCKET_VOD_LIST, OSS_STS_ACCESS_KEY, OSS_STS_ACCESS_SECRET, \
|
|
|
+from Ansjer.config import OSS_BUCKET_ENDPOINT, OSS_STS_ACCESS_KEY, OSS_STS_ACCESS_SECRET, \
|
|
|
OSS_REGION_ID, OSS_ROLE_ARN, SERVER_DOMAIN
|
|
|
from Model.models import Device_Meal, Device_Info, Order_Model, Store_Meal, VodHlsModel, OssCrdModel
|
|
|
from Object.ResponseObject import ResponseObject
|
|
@@ -131,14 +131,15 @@ class CloudVodView(View):
|
|
|
uid = qs[0]['UID']
|
|
|
nowTime = int(time.time())
|
|
|
orderID = CommonService.createID()
|
|
|
- smqs = Store_Meal.objects.filter(id=rank).values("currency", "price")
|
|
|
+ smqs = Store_Meal.objects.filter(id=rank).values("currency", "price", "content")
|
|
|
currency = smqs[0]['currency']
|
|
|
price = smqs[0]['price']
|
|
|
+ content = smqs[0]['content']
|
|
|
call_sub_url = "{SERVER_DOMAIN}cloudVod/payExecute?orderID={orderID}".format(SERVER_DOMAIN=SERVER_DOMAIN,
|
|
|
orderID=orderID)
|
|
|
# call_sub_url = "http://192.168.136.40:8077/cloudVod/payExecute?orderID={orderID}".format(
|
|
|
# SERVER_DOMAIN=SERVER_DOMAIN, orderID=orderID)
|
|
|
- call_clc_url = "http://192.168.136.40:8077/cloudVod/order/cancle"
|
|
|
+ call_clc_url = "http://192.168.136.40:8077/cloudVod/cancleorder"
|
|
|
paypalrestsdk.configure({
|
|
|
"mode": "sandbox", # sandbox or live
|
|
|
"client_id": "AfnfDqezODOoWGS-W2Itu-Zl1ay1R95IsGlMqPghPA3KGhkPndNMnQT0bdEewvSv92XAFIfLiinmyhBL",
|
|
@@ -152,12 +153,11 @@ class CloudVodView(View):
|
|
|
"item_list": {
|
|
|
"items": [{"name": "Cloud video", "sku": "1", "price": price, "currency": "USD", "quantity": 1}]},
|
|
|
"amount": {"total": price, "currency": currency},
|
|
|
- "description": "7 days mobile detection storage event 1 month charge"
|
|
|
+ "description":content
|
|
|
}]})
|
|
|
|
|
|
if payment.create():
|
|
|
print("Payment created successfully")
|
|
|
-
|
|
|
else:
|
|
|
print(payment.error)
|
|
|
return response.json(10, payment.error)
|