|
@@ -985,10 +985,10 @@ class CloudStorageView(View):
|
|
|
|
|
|
orderID = CommonService.createOrderID()
|
|
|
if pay_type == 1:
|
|
|
- #call_sub_url = "{SERVER_DOMAIN}cloudstorage/dopaypalcallback?orderID={orderID}". \
|
|
|
- #format(SERVER_DOMAIN=SERVER_DOMAIN, orderID=orderID)
|
|
|
- call_sub_url = "http://binbin.uicp.vip/cloudstorage/dopaypalcallback?orderID={orderID}".format(
|
|
|
- SERVER_DOMAIN=SERVER_DOMAIN, orderID=orderID)
|
|
|
+ call_sub_url = "{SERVER_DOMAIN}cloudstorage/dopaypalcallback?orderID={orderID}". \
|
|
|
+ format(SERVER_DOMAIN=SERVER_DOMAIN, orderID=orderID)
|
|
|
+ # call_sub_url = "http://binbin.uicp.vip/cloudstorage/dopaypalcallback?orderID={orderID}".format(
|
|
|
+ # SERVER_DOMAIN=SERVER_DOMAIN, orderID=orderID)
|
|
|
call_clc_url = "{SERVER_DOMAIN}web/paid2/fail.html".format(SERVER_DOMAIN=SERVER_DOMAIN)
|
|
|
paypalrestsdk.configure(PAYPAL_CRD)
|
|
|
payment = paypalrestsdk.Payment({
|
|
@@ -1070,12 +1070,11 @@ class CloudStorageView(View):
|
|
|
# 获取参数
|
|
|
response = ResponseObject()
|
|
|
|
|
|
- price = float(price) * 100
|
|
|
- parameter_dict = pay.get_parameter(orderID, content, price, ip, notify_url)
|
|
|
+ parameter_dict = pay.get_parameter(orderID, content, float(price) * 100, ip, notify_url)
|
|
|
print('parameter_dict', parameter_dict)
|
|
|
# parameter_dict 参数中获取MWEB_URL 调转页面在路径后面添加redirect_url
|
|
|
# 统一调用接口
|
|
|
- response = pay.re_finall()
|
|
|
+ response = pay.re_finall(orderid=orderID)
|
|
|
if not response:
|
|
|
return response.json(10, '生成订单错误.')
|
|
|
# 回调函数
|