Symfony+Payum集成PayPal订阅无支付通知问题求助
Let’s break down the issues you’re facing and walk through the critical checks and fixes to get your Payum notifications working with PayPal recurring payments:
1. Fix the Missing Notify URL in Your Recurring Payment Request
Looking at your Recurring Payment Detail JSON, there’s no NOTIFYURL parameter included—and that’s a big problem. For recurring payments, PayPal uses the notify URL specified when creating the recurring profile, not the one in the initial agreement.
- When generating your Recurring Payment request, explicitly add the
NOTIFYURLfield pointing to your Payum endpoint:https://hostname.tld/payum/notifier/[your-token]. - Your Agreement Detail had duplicate notify URLs (
PAYMENTREQUEST_0_NOTIFYURLandNOTIFYURL), but those only apply to the initial agreement capture—not the ongoing recurring charges.
2. Verify Payum Gateway Configuration
Double-check your Symfony Payum config (usually config/packages/payum.yaml) to ensure it’s set up to handle IPN notifications:
payum: gateways: paypal: factory: paypal_express_checkout username: '%paypal_username%' password: '%paypal_password%' signature: '%paypal_signature%' sandbox: true # Ensure the base notify route is correctly defined notify_url: 'payum_notify_do' # Use the Symfony route name for dynamic token handling
This ensures Payum knows where to route incoming PayPal IPN requests and link them to your payment entities.
3. Link the Recurring Profile ID to Payum’s Payment Entity
After creating the recurring profile and getting the PROFILEID (I-XXXXX) from PayPal’s response, make sure you save this ID to your Payum-managed Recurring Payment Detail entity. Payum uses this ID to match incoming IPN notifications to the correct payment record—without it, Payum can’t update the payment status even if the notification arrives.
4. Check PayPal Sandbox IPN History & Settings
Log into your PayPal Sandbox merchant account to diagnose why notifications aren’t being sent:
- Go to History > IPN History to see if PayPal is attempting to send notifications. Look for errors like HTTP 404, 500, or timeout responses—this will tell you exactly why requests aren’t reaching your app.
- Enable IPN in your sandbox profile: Profile > My Selling Tools > Instant Payment Notifications > Enable IPN, and set a default notify URL as a fallback (use your Payum endpoint here).
5. Debug the Payum Notify Route
- Confirm your Symfony route for
payum_notify_dois correctly mapped by running:php bin/console debug:router payum_notify_do - Add logging to the Payum notify flow (e.g., create an event listener for
Payum\Core\Event\ExecuteEvent) to log all incoming IPN requests. This will confirm if PayPal is actually sending requests, and if Payum is processing them correctly. - You mentioned manual access to the notify URL works—so the issue is almost certainly that PayPal isn’t sending the request (check IPN history) or the notify URL in your recurring profile request is incorrect.
6. Note on Your Redirect Change
Switching to a Payum doneToken doesn’t fix the notification issue—this token is for post-payment confirmation after the initial capture, not for ongoing recurring payment IPNs. The real fix lies in ensuring the recurring profile has the correct notify URL and Payum is configured to process those notifications.
内容的提问来源于stack exchange,提问作者Topper Harley

