ソースを参照

周期付款 - 优化订阅过代码

linhaohong 1 年間 前
コミット
455672c399
1 ファイル変更5 行追加4 行削除
  1. 5 4
      Controller/InAppPurchaseController.py

+ 5 - 4
Controller/InAppPurchaseController.py

@@ -113,13 +113,14 @@ class InAppPurchaseView(View):
                 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:
+                    pay_result_url = CommonService.get_payment_status_url(lang, 'fail')
+                    if device_apple_package_qs[0].userID != user_id:
+                        return response.json(0, {'url': pay_result_url})
+                    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)
+                        return response.json(0, {'url': pay_result_url})
 
             root_certificates = []
             for cert_name in [