|
@@ -262,12 +262,6 @@ class InAppPurchaseView(View):
|
|
args=(uid, user_id, lang, sys_msg_text_list))
|
|
args=(uid, user_id, lang, sys_msg_text_list))
|
|
asy.start()
|
|
asy.start()
|
|
|
|
|
|
- # 检查是否云服务代理订单
|
|
|
|
- check_thread = threading.Thread(
|
|
|
|
- target=AgentOrderView.check_agent_service_package, args=(order_id, uid, order_qs[0]['rank_id'])
|
|
|
|
- )
|
|
|
|
- check_thread.start()
|
|
|
|
-
|
|
|
|
redis_obj.del_data(redis_key)
|
|
redis_obj.del_data(redis_key)
|
|
pay_result_url = CommonService.get_payment_status_url(lang, 'success')
|
|
pay_result_url = CommonService.get_payment_status_url(lang, 'success')
|
|
|
|
|
|
@@ -275,7 +269,15 @@ class InAppPurchaseView(View):
|
|
business_name=f"内购充值成功",
|
|
business_name=f"内购充值成功",
|
|
created_time=int(time.time()), updated_time=int(time.time()),
|
|
created_time=int(time.time()), updated_time=int(time.time()),
|
|
access_result="SUCCESS")
|
|
access_result="SUCCESS")
|
|
-
|
|
|
|
|
|
+ try:
|
|
|
|
+ # 检查是否云服务代理订单
|
|
|
|
+ check_thread = threading.Thread(
|
|
|
|
+ target=AgentOrderView.check_agent_service_package, args=(order_id, uid, order_qs[0]['rank_id'])
|
|
|
|
+ )
|
|
|
|
+ check_thread.start()
|
|
|
|
+ except Exception as e:
|
|
|
|
+ LOGGER.error(f"苹果内购认证交易订单orderID:{order_id}, 检查是否云服务代理订单异常:{repr(e)}")
|
|
|
|
+ LOGGER.info(f"苹果内购认证交易订单orderID:{order_id}")
|
|
return response.json(0, {'url': pay_result_url})
|
|
return response.json(0, {'url': pay_result_url})
|
|
except Exception as e:
|
|
except Exception as e:
|
|
redis_obj.del_data(redis_key)
|
|
redis_obj.del_data(redis_key)
|
|
@@ -547,15 +549,20 @@ class InAppPurchaseView(View):
|
|
order.original_transaction_id = original_transaction_id
|
|
order.original_transaction_id = original_transaction_id
|
|
order.save()
|
|
order.save()
|
|
|
|
|
|
- # 检查是否云服务代理订单
|
|
|
|
- check_thread = threading.Thread(
|
|
|
|
- target=AgentOrderView.check_agent_service_package, args=(order_id, uid, ord_order[0]["rank_id"])
|
|
|
|
- )
|
|
|
|
- check_thread.start()
|
|
|
|
-
|
|
|
|
# 构建云存套餐消息
|
|
# 构建云存套餐消息
|
|
sys_msg_text_list = cls.cloud_storage_message(uid)
|
|
sys_msg_text_list = cls.cloud_storage_message(uid)
|
|
cls.do_vod_msg_notice(uid, user_id, lang, sys_msg_text_list)
|
|
cls.do_vod_msg_notice(uid, user_id, lang, sys_msg_text_list)
|
|
|
|
+
|
|
|
|
+ try:
|
|
|
|
+ # 检查是否云服务代理订单
|
|
|
|
+ check_thread = threading.Thread(
|
|
|
|
+ target=AgentOrderView.check_agent_service_package, args=(order_id, uid, rank_id)
|
|
|
|
+ )
|
|
|
|
+ check_thread.start()
|
|
|
|
+ except Exception as e:
|
|
|
|
+ LOGGER.error(f"App Store服务器通知orderID:{order_id}, 检查是否云服务代理订单异常:{repr(e)}")
|
|
|
|
+ LOGGER.info(f"App Store服务器通知, 续订transactionId:{transaction_id}")
|
|
|
|
+
|
|
return HttpResponse(status=200)
|
|
return HttpResponse(status=200)
|
|
|
|
|
|
elif str(decoded_payload.rawNotificationType) == "SUBSCRIBED":
|
|
elif str(decoded_payload.rawNotificationType) == "SUBSCRIBED":
|
|
@@ -649,15 +656,21 @@ class InAppPurchaseView(View):
|
|
DeviceApplePackage.objects.filter(userID=user_id, uid=uid).update(subscription_status=1,
|
|
DeviceApplePackage.objects.filter(userID=user_id, uid=uid).update(subscription_status=1,
|
|
update_time=int(time.time()))
|
|
update_time=int(time.time()))
|
|
|
|
|
|
- # 检查是否云服务代理订单
|
|
|
|
- check_thread = threading.Thread(
|
|
|
|
- target=AgentOrderView.check_agent_service_package, args=(order_id, uid, ord_order[0]["rank_id"])
|
|
|
|
- )
|
|
|
|
- check_thread.start()
|
|
|
|
-
|
|
|
|
# 构建云存套餐消息
|
|
# 构建云存套餐消息
|
|
sys_msg_text_list = cls.cloud_storage_message(uid)
|
|
sys_msg_text_list = cls.cloud_storage_message(uid)
|
|
cls.do_vod_msg_notice(uid, user_id, lang, sys_msg_text_list)
|
|
cls.do_vod_msg_notice(uid, user_id, lang, sys_msg_text_list)
|
|
|
|
+
|
|
|
|
+ try:
|
|
|
|
+ # 检查是否云服务代理订单
|
|
|
|
+ check_thread = threading.Thread(
|
|
|
|
+ target=AgentOrderView.check_agent_service_package,
|
|
|
|
+ args=(order_id, uid, rank_id)
|
|
|
|
+ )
|
|
|
|
+ check_thread.start()
|
|
|
|
+ except Exception as e:
|
|
|
|
+ LOGGER.error(f"App Store服务器通知orderID:{order_id}, 检查是否云服务代理订单异常:{repr(e)}")
|
|
|
|
+ LOGGER.info(f"App Store服务器通知, 订阅transactionId:{transaction_id}")
|
|
|
|
+
|
|
return HttpResponse(status=200)
|
|
return HttpResponse(status=200)
|
|
|
|
|
|
elif str(decoded_payload.rawNotificationType) == "EXPIRED":
|
|
elif str(decoded_payload.rawNotificationType) == "EXPIRED":
|