diff --git a/blueprints/payment.py b/blueprints/payment.py index ef74597..01d0f75 100644 --- a/blueprints/payment.py +++ b/blueprints/payment.py @@ -169,6 +169,7 @@ def payment_notify(): """支付宝异步通知""" try: data = request.form.to_dict() + system_logger.info(f"Received Alipay Notify: {data}") signature = data.get("sign") if not signature: diff --git a/services/alipay_service.py b/services/alipay_service.py index 1bf5e91..dfe730f 100644 --- a/services/alipay_service.py +++ b/services/alipay_service.py @@ -52,6 +52,7 @@ class AlipayService: # python-alipay-sdk 的 verify 方法会自动处理 sign 的移除 # 但为了保险,我们手动移除它,保留其他所有字段 verify_data.pop('sign', None) + verify_data.pop('sign_type', None) alipay = self.get_alipay_client() # 对于同步回调,sign_type 实际上是参与签名的(某些版本/接口)