|
@@ -109,16 +109,17 @@ class InAppPurchaseView(View):
|
|
|
return response.json(10048)
|
|
|
|
|
|
# 处理一台手机多账号登录订阅情况
|
|
|
- device_apple_package_qs = DeviceApplePackage.objects.filter(
|
|
|
- original_transaction_id=original_transaction_identifier)
|
|
|
- if device_apple_package_qs.exists():
|
|
|
- if device_apple_package_qs[0]["userID"] != user_id:
|
|
|
- return response.json(10050)
|
|
|
- elif device_apple_package_qs[0]["uid"] == uid:
|
|
|
- device_apple_package_qs.update(subscription_status=1)
|
|
|
- return response.json(0)
|
|
|
- else:
|
|
|
- return response.json(10048)
|
|
|
+ if original_transaction_identifier != "":
|
|
|
+ device_apple_package_qs = DeviceApplePackage.objects.filter(
|
|
|
+ original_transaction_id=original_transaction_identifier)
|
|
|
+ if device_apple_package_qs.exists():
|
|
|
+ if device_apple_package_qs[0]["userID"] != user_id:
|
|
|
+ return response.json(10050)
|
|
|
+ elif device_apple_package_qs[0]["uid"] == uid:
|
|
|
+ device_apple_package_qs.update(subscription_status=1)
|
|
|
+ return response.json(0)
|
|
|
+ else:
|
|
|
+ return response.json(10048)
|
|
|
|
|
|
root_certificates = []
|
|
|
for cert_name in [
|