Updated WordPress, PayPal IPN no longer works
286
post-template-default,single,single-post,postid-286,single-format-standard,bridge-core-3.0.1,qodef-qi--no-touch,qi-addons-for-elementor-1.5.3,qode-page-transition-enabled,ajax_updown,page_not_loaded,,vertical_menu_enabled,side_area_uncovered_from_content,qode-theme-ver-28.7,qode-theme-bridge,disabled_footer_top,qode_header_in_grid,wpb-js-composer js-comp-ver-6.8.0,vc_responsive,elementor-default,elementor-kit-6

Updated WordPress, PayPal IPN no longer works

Updated WordPress, PayPal IPN no longer works

I recently updated a client’s WordPress to 3.9.2. There was a page on that WordPress that served as the PayPal notify_url and it had been working fine up until I updated. The page simply used a shortcode that I created in the functions.php file to process the incoming PayPal parameters.

After the update, what I noticed is that when I tested the page myself, the Apache log reported that 44810 bytes were being sent to the requester (me), which is the full rendered page. And the shortcode function was running properly. I added logging at the head of the function so that I could verify that it was being called.

But when PayPal requested the page, only 16620 bytes where being sent and the shortcode function was not being called. The only difference that I could see was that I was using HTTP 1.1 and PayPal was using HTTP 1.0.

I never did figure out why the difference in response bytes. And I ran out of ideas of what to test.

So what I did instead was to implement the notify_url as a standalone PHP script and that took care of the problem. It now works fine with PayPal.

It is clear to me that there was something subtle that I was missing now that WordPress was at 3.9.2. But what it is, I have no idea.

Tags:


Mastodon