|
@@ -162,10 +162,6 @@ class InAppPurchaseView(View):
|
|
|
if not store_qs.exists():
|
|
|
return response.json(173, "套餐不存在")
|
|
|
|
|
|
- in_app_purchase_package_qs = InAppPurchasePackage.objects.filter(product_id=product_id)
|
|
|
- if not in_app_purchase_package_qs.exists():
|
|
|
- return response.json(173, "内购套餐不存在")
|
|
|
-
|
|
|
bucket_id = store_qs[0]['bucket_id']
|
|
|
is_ai = store_qs[0]['is_ai']
|
|
|
expire = store_qs[0]['expire']
|
|
@@ -209,6 +205,9 @@ class InAppPurchaseView(View):
|
|
|
|
|
|
# 修改订阅状态
|
|
|
if payload.rawType == "Auto-Renewable Subscription":
|
|
|
+ in_app_purchase_package_qs = InAppPurchasePackage.objects.filter(product_id=product_id)
|
|
|
+ if not in_app_purchase_package_qs.exists():
|
|
|
+ return response.json(173, "内购套餐不存在")
|
|
|
in_app_purchase_package = in_app_purchase_package_qs.values('id').first()
|
|
|
package_id = in_app_purchase_package['id']
|
|
|
DeviceApplePackage.objects.filter(userID=user_id, uid=uid, package_id=package_id).update(
|