瀏覽代碼

苹果内购, 退款信息提交接口修改

linhaohong 9 月之前
父節點
當前提交
3449ede54c
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. 3 2
      Controller/InAppPurchaseController.py

+ 3 - 2
Controller/InAppPurchaseController.py

@@ -832,7 +832,7 @@ class InAppPurchaseView(View):
             elif app_type == 2:
             elif app_type == 2:
                 bundle_id = "com.ansjer.zccloud"
                 bundle_id = "com.ansjer.zccloud"
             else:
             else:
-                return response.json(0)
+                return HttpResponse(status=200)
             in_app_purchase_obj = InAppPurchase(bundle_id=bundle_id)
             in_app_purchase_obj = InAppPurchase(bundle_id=bundle_id)
             # AppStoreServerAPIClient 用于查询交易信息
             # AppStoreServerAPIClient 用于查询交易信息
             client = in_app_purchase_obj.client
             client = in_app_purchase_obj.client
@@ -873,6 +873,7 @@ class InAppPurchaseView(View):
                 refundPreference=refundPreference,
                 refundPreference=refundPreference,
             )
             )
             client.send_consumption_data(transaction_id, consumption_request)
             client.send_consumption_data(transaction_id, consumption_request)
+            logger.info(f'内购退款消费数据提交, 订单orderID:{orderID}, transaction_id:{transaction_id}')
             in_app_refund.refund_progress = 1
             in_app_refund.refund_progress = 1
             in_app_refund.save()
             in_app_refund.save()
-        return response.json(0)
+        return HttpResponse(status=200)