Browse Source

静止续订400

linhaohong 1 year ago
parent
commit
7252e59f48
1 changed files with 2 additions and 1 deletions
  1. 2 1
      Controller/InAppPurchaseController.py

+ 2 - 1
Controller/InAppPurchaseController.py

@@ -341,7 +341,7 @@ class InAppPurchaseView(View):
                 decoded_payload = verifier.verify_and_decode_notification(signed_payload)
 
                 logger.info(f"App Store服务器通知解码后decoded_payload:{decoded_payload}")
-                logger.info(f"App Store服务器通知decoded_payload.rawNotificationType{decoded_payload.notificationType}")
+                logger.info(f"App Store服务器通知decoded_payload.rawNotificationType{str(decoded_payload.rawNotificationType)}")
                 if decoded_payload.rawNotificationType == "DID_CHANGE_RENEWAL_STATUS":
                     # 已更改订阅状态
                     # 一种通知类型,与其子类型一起表示客户更改了订阅续订状态。如果subtype为
@@ -354,6 +354,7 @@ class InAppPurchaseView(View):
                 elif str(decoded_payload.rawNotificationType) == "DID_RENEW":
                     # 一种通知类型,与其subtype一起表示订阅已成功续订。如果subtype为
                     # BILLING_RECOVERY,则表示之前未能续订的过期订阅已成功续订。如果子类型为空,则活动订购已成功自动续订到新的交易期。向客户提供订阅内容或服务的访问权限。
+                    logger.info(f"返回400拒绝续订")
                     return HttpResponse(status=400)
 
                 elif decoded_payload.rawNotificationType == "SUBSCRIBED":