alexanderdejong.com

Wordpress Developer

  • Home
  • Blog
  • Projects
  • Contact
You are here: Home / Wordpress / WooCommerce

How to fix WC-API and the PayPal Instant Payment Notification Error

Posted on March 24, 2017 Leave a Comment

This week I spent a couple of hours figuring out why I was receiving the following notifcation from PayPal via e-mail:

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

https://mywebsite.com/wc-api/WC_Gateway_PPEC/

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.

The solution was quite simple

Apparently, WooCommerce has a bug that allows you to set permalinks for products to: “/%product_cat%”. Basically, this breaks the WooCommerce API page in which it receives notifications from PayPal. It basically creates a 404 error, page not found. To fix it, is easy. Just include a bit of text before this tag: “products/%product_cat%”. Then the page will work again. You can also write some custom code to redirect WP to your product pages properly using the Rewrite API/add rewrite rule.

I did come across another suggestion.

You can check the Language Encoding for PayPal buttons (Profile and Settings > Selling Tools > PayPal button language encoding > More Options.

You then need to check the characters being sent to PayPal with yours and if it matches it should work.

Neither of these solutions work?

Make sure your running SSL 🙂

Find the error log to check what is going on

If this is not the problem then you can check your error log to see what is being communicated with PayPal. Usually you can find the error log:

  • in your server’s root folder, called error.log
  • in public_html or similar folder, called error.log
  • in var/logs or similar, called error.log
  • additionally, if you have debugging enabled in WordPress and you have it saved to a file, it will be in the wp-content folder, and called debug.log
  • If you are having trouble finding the file then insert the following code into your template somewhere: <?php phpinfo(); ?> and search the page for the error_log value.

Filed Under: WooCommerce, Wordpress

Recent Posts

  • Migrating a WordPress Website Manually with Phpmyadmin, Search and Replace, DigitalOcean and Runcloud
  • How to add Total Price Calculation to your WooCommerce Product Page with AJAX
  • How to Install Roots Bedrock on a Digital Ocean Droplet running on Serverpilot via SSH
  • Linux SSH Useful Server Commands to Remember: Grep, Permissions and more.
  • How to Install Roots Sage 8.5.1 on a Digital Ocean Droplet running on Serverpilot via SSH

Find more content

Affiliate links
  • cheap shared hosting
  • low priced virtual servers only 5$
Affiliates
  • If someone buys a product then I get a commission.
  • You pay the same price using my affiliate links.
  • I can spend more time making newsletters and tutorials.
  • Thanks for visiting!

Connect with me

Recent Comments

  • Pedro Gómez on Migrating a WordPress Website Manually with Phpmyadmin, Search and Replace, DigitalOcean and Runcloud
  • Tim Delmeire on How to add Total Price Calculation to your WooCommerce Product Page with AJAX
  • Jaehyuk J Yang on How to add Total Price Calculation to your WooCommerce Product Page with AJAX
  • Alexander de Jong on A guide on customising the membership experience with Theme my Login (TML)
  • Judit Sarkany on A guide on customising the membership experience with Theme my Login (TML)

Recent Posts

  • Migrating a WordPress Website Manually with Phpmyadmin, Search and Replace, DigitalOcean and Runcloud
  • How to add Total Price Calculation to your WooCommerce Product Page with AJAX
  • How to Install Roots Bedrock on a Digital Ocean Droplet running on Serverpilot via SSH
  • Linux SSH Useful Server Commands to Remember: Grep, Permissions and more.
  • How to Install Roots Sage 8.5.1 on a Digital Ocean Droplet running on Serverpilot via SSH

Copyright © 2014 | Alexander de Jong | About | Contact | Privacy | Sitemap