Alipay callbacks blocked by login or CSRF checks: dedicated routing, verification and acceptance

An Alipay collection is paid, but the merchant balance is unchanged and the application has no callback entry. Login middleware, CSRF checks, a proxy or access controls may have handled the request before business code. Find the responding layer, then design a dedicated receiver under the formal protocol. Do not disable site-wide protection to receive one callback. This guide defines no WenFuPay signature fields, success response or retry count.

Continue by topic

Find where the request ended

Match edge access records, reverse proxy, application route and order logs for the same period. Retain original path, method, response status, redirects and correlation ID. Redact logs and omit merchant secrets, complete signatures and user credentials.

A 302 login redirect, a 403 rejection, a missing 404 route and business signature failure are different clues, not diagnoses from status alone. In a simulated login redirect, opening the page manually proves nothing about whether the provider’s server can submit the agreed request and receive the right response.

Replace the wrong check, not authentication itself

Browser sessions and CSRF controls protect user-facing pages; authenticate server payment notices under their actual protocol. Django, for example, permits view-level CSRF control. Any exception should be limited to a reviewed notification route while other pages retain their protection.

That route still verifies the signature, original order ownership, amount, currency and acceptable state before processing. A merchant ID alone is not authentication, and source IP alone is insufficient evidence. A proxy must not silently alter signed content. Use the formal documentation for actual parsing and verification steps.

HTTP 200 does not prove a credited top-up

Suppose operations replaces a 403 with a fixed 200, but no verified event reaches the order service. Only the outward response changed. Check response content, status and durable processing under the agreed contract; a login HTML page or generic error page is not a callback acknowledgment.

Retain traceable receipt and processing records for verified events, with no second balance credit on replay. Follow the real response contract when processing fails or persistence is uncertain; invent no universal success string. After fixing routing, reconcile old orders through authorized queries or a procedure agreed with the technical team. Do not blindly replay unverified logs.

Test valid receipt and rejection together

In your own isolated test environment, cover valid notices, missing signatures, changed amounts, wrong merchants, repeated notices, redirects and application outages. Unverified messages must not change orders. Normal login, form CSRF protection and access controls must remain functional.

Send WenFuPay redacted statuses, times, paths and request IDs, then test formal documentation after account setup. Technical staff confirm the notification contract while the merchant checks balance and delivery ledgers. Fixing a receiver does not create automatic refunds, payouts or unlimited retries, and requires no disclosure of login codes to support.

Frequently asked questions

Can a CSRF-exempt receiver credit balances directly?

No. Authenticate and reconcile orders under the actual notification protocol. A scoped routing exception is not signature bypass or permission to disable protection site-wide.

Does HTTP 200 in callback logs prove a completed top-up?

No. Confirm the correct acknowledgment, durable event receipt, one-time order handling and consistent balance and delivery records.

References