|
@@ -886,14 +886,13 @@ class CloudStorageView(View):
|
|
|
dvq.update(**dvq_set_update_dict)
|
|
|
|
|
|
order_qs.update(status=1, updTime=nowTime, uid_bucket_id=uid_bucket_id)
|
|
|
- red_url = "{SERVER_DOMAIN}cloudstorage/payOK".format(SERVER_DOMAIN=SERVER_DOMAIN)
|
|
|
-
|
|
|
+ red_url = "{SERVER_DOMAIN}web/paid2/success.html".format(SERVER_DOMAIN=SERVER_DOMAIN)
|
|
|
return HttpResponseRedirect(red_url)
|
|
|
return response.json(0, signature)
|
|
|
except Exception as e:
|
|
|
if order_qs:
|
|
|
order_qs.update(status=10)
|
|
|
- red_url = "{SERVER_DOMAIN}cloudstorage/payError".format(SERVER_DOMAIN=SERVER_DOMAIN)
|
|
|
+ red_url = "{SERVER_DOMAIN}web/paid2/fail.html".format(SERVER_DOMAIN=SERVER_DOMAIN)
|
|
|
return HttpResponseRedirect(red_url)
|
|
|
|
|
|
def do_pay_by_paypal_callback(self, request_dict, response):
|
|
@@ -905,8 +904,8 @@ class CloudStorageView(View):
|
|
|
order_qs = Order_Model.objects.filter(orderID=orderID, status=0)
|
|
|
|
|
|
if not orderID:
|
|
|
- red_url = "{SERVER_DOMAIN}cloudstorage/payError".format(SERVER_DOMAIN=SERVER_DOMAIN)
|
|
|
- return response.json(0, red_url)
|
|
|
+ red_url = "{SERVER_DOMAIN}web/paid2/fail.html".format(SERVER_DOMAIN=SERVER_DOMAIN)
|
|
|
+ return HttpResponseRedirect(red_url)
|
|
|
else:
|
|
|
order_qs.update(status=10)
|
|
|
paypalrestsdk.configure(PAYPAL_CRD)
|
|
@@ -915,8 +914,8 @@ class CloudStorageView(View):
|
|
|
payres = payment.execute({"payer_id": PayerID})
|
|
|
print(payres)
|
|
|
if not payres:
|
|
|
- red_url = "{SERVER_DOMAIN}cloudstorage/payError".format(SERVER_DOMAIN=SERVER_DOMAIN)
|
|
|
- return response.json(0, red_url)
|
|
|
+ red_url = "{SERVER_DOMAIN}web/paid2/fail.html".format(SERVER_DOMAIN=SERVER_DOMAIN)
|
|
|
+ return HttpResponseRedirect(red_url)
|
|
|
print("Payment execute successfully")
|
|
|
|
|
|
nowTime = int(time.time())
|
|
@@ -962,14 +961,14 @@ class CloudStorageView(View):
|
|
|
order_qs.update(status=1, updTime=nowTime, uid_bucket_id=uid_bucket_id)
|
|
|
|
|
|
# return response.json(0)
|
|
|
- red_url = "{SERVER_DOMAIN}cloudstorage/payOK".format(SERVER_DOMAIN=SERVER_DOMAIN)
|
|
|
- return response.json(0, red_url)
|
|
|
+ red_url = "{SERVER_DOMAIN}web/paid2/success.html".format(SERVER_DOMAIN=SERVER_DOMAIN)
|
|
|
+ return HttpResponseRedirect(red_url)
|
|
|
except Exception as e:
|
|
|
if order_qs:
|
|
|
order_qs.update(status=10)
|
|
|
|
|
|
- red_url = "{SERVER_DOMAIN}cloudstorage/payError".format(SERVER_DOMAIN=SERVER_DOMAIN)
|
|
|
- return response.json(0, red_url)
|
|
|
+ red_url = "{SERVER_DOMAIN}web/paid2/fail.html".format(SERVER_DOMAIN=SERVER_DOMAIN)
|
|
|
+ return HttpResponseRedirect(red_url)
|
|
|
|
|
|
def do_pay_by_wechat_callback(self, request, response):
|
|
|
|
|
@@ -1099,7 +1098,7 @@ class CloudStorageView(View):
|
|
|
format(SERVER_DOMAIN=SERVER_DOMAIN, orderID=orderID)
|
|
|
# call_sub_url = "http://192.168.136.40:8077/cloudstorage/payExecute?orderID={orderID}".format(
|
|
|
# SERVER_DOMAIN=SERVER_DOMAIN, orderID=orderID)
|
|
|
- call_clc_url = "{SERVER_DOMAIN}cloudstorage/payError".format(SERVER_DOMAIN=SERVER_DOMAIN)
|
|
|
+ call_clc_url = "{SERVER_DOMAIN}web/paid2/fail.html".format(SERVER_DOMAIN=SERVER_DOMAIN)
|
|
|
paypalrestsdk.configure(PAYPAL_CRD)
|
|
|
payment = paypalrestsdk.Payment({
|
|
|
"intent": "sale",
|
|
@@ -1137,7 +1136,7 @@ class CloudStorageView(View):
|
|
|
out_trade_no=orderID,
|
|
|
total_amount=price,
|
|
|
subject=subject,
|
|
|
- return_url="{SERVER_DOMAIN_SSL}cloudstorage/payOK".format(SERVER_DOMAIN_SSL=SERVER_DOMAIN_SSL),
|
|
|
+ return_url="{SERVER_DOMAIN}web/paid2/success.html".format(SERVER_DOMAIN=SERVER_DOMAIN),
|
|
|
notify_url="{SERVER_DOMAIN_SSL}cloudstorage/doalicallback".format(
|
|
|
SERVER_DOMAIN_SSL=SERVER_DOMAIN_SSL)
|
|
|
# return_url="http://192.168.136.40/cloudstorage/payOK",
|