take into account _MACAPP_MONTHLY_PRODUCT_ID in verify_receipt

This commit is contained in:
Son 2021-12-30 16:15:33 +01:00
parent 22cf8cfe38
commit 30ba566457

View file

@ -509,7 +509,8 @@ def verify_receipt(receipt_data, user, password) -> Optional[AppleSubscription]:
expires_date = arrow.get(int(latest_transaction["expires_date_ms"]) / 1000)
plan = (
PlanEnum.monthly
if latest_transaction["product_id"] == _MONTHLY_PRODUCT_ID
if latest_transaction["product_id"]
in (_MONTHLY_PRODUCT_ID, _MACAPP_MONTHLY_PRODUCT_ID)
else PlanEnum.yearly
)