WooCommerce PayPal ...
 
Notifications
Clear all

[Solved] WooCommerce PayPal IPN failing!

1 Posts
1 Users
0 Reactions
5 Views
Tharindu
(@tharindu)
Reputable Member Admin
Joined: 10 years ago
Posts: 309
Topic starter  

I recently got this warning email from PayPal about Instant Payment Notifications (IPN). 

Hello Tharindu Kumara ,

Please check your server that handles PayPal Instant Payment Notifications (IPN). IPNs sent to the following URL(s) are failing:

https://vpsfix.com/?wc-api=WC_Gateway_Paypal

If you do not recognize this URL, you may be using a service provider that is using IPN on your behalf. Please contact your service provider with the above information. If this problem continues, IPNs may be disabled for your account.

Thank you for your prompt attention to this issue.

Thanks,

PayPal

Turns out my firewall was blocking requests from PayPal IPN. I'm using Naxsi WAF to protect my server. I had to create whitelist rules for PayPal IPN since they were not included in community contributed whitelist rules for WordPress. I'm posting Whitelist rules here in case someone else need them.

BasicRule wl:1015 "mz:$URL:/wc-api/WC_Gateway_Paypal/|$BODY_VAR:payment_date";
BasicRule wl:1001,1015 "mz:$URL:/wc-api/WC_Gateway_Paypal/|$BODY_VAR:custom";
BasicRule wl:1010,1011,1015 "mz:$URL:/wc-api/WC_Gateway_Paypal/|$BODY_VAR:transaction_subject";
BasicRule wl:1000,1010,1011,1015 "mz:$URL:/wc-api/WC_Gateway_Paypal/|$BODY_VAR:item_name";
BasicRule wl:1000,1010,1011,1015 "mz:$URL:/wc-api/WC_Gateway_Paypal/|$BODY_VAR_X:item_name[0-9]+$";
BasicRule wl:1200,1002 "mz:$URL:/wc-api/WC_Gateway_Paypal/|$BODY_VAR:verify_sign";
BasicRule wl:1015 "mz:$URL:/wc-api/WC_Gateway_Paypal/|$BODY_VAR:subscr_date";

These rules work for WooCommerce and WooCommerce Subscriptions. You can find more information about how to use these whitelist rules on Analyze Naxsi logs & Create Whitelist Rules with nxutil.


   
Quote
Share:
Back to top button