Thank you all. I think the issuee is different.
in gateways/paypal/paypal-ipn/ipnlistener.php line 322 requires POST method to pass parameters from ipn to learnpress
I’ve verified with the ipn history feature in paypal, and PayPAl send datas by a get method, with all the parameters.
So LearnPress asks for method post, but paypal uses method get.
This is why ipn_errors.log contains: “Invalid HTTP request method.”
I’m quite confident I could jump this control, or adding something like:
$_POST = $_GET;
or better:
$_POST = $_REQUEST;
instead of throwing an exception.
But it’s strange the error. Everyone uses WooCommerce ?
OR ….
Or is it possible that there is a redirect, in wordpress, loosing $_post datas ?
I have https://xxx.it/?learn_press_paypal=1 and in .htaccess I have a LITESPEED cache support.
In this case the solution could be different: instead an url to root, passing an url directly to domain/…/gateways/paypal/paypal-ipn/ipn.php
In this case \wp-content\plugins\learnpress\inc\gateways\paypal\class-lp-gateway-paypal.php shouldn’t use:
‘notify_url’ => get_home_url() . ‘/?’ . learn_press_get_web_hook( ‘paypal’ ) . ‘=1’,
get home is different of actual location of the script. But what about “paypal=1” ? Is it possible to point directly to the script: \wp-content\plugins\learnpress\inc\gateways\paypal\paypal-ipn\ipn.php (in my case) ?
-
This reply was modified 3 years, 3 months ago by vspatarante.
-
This reply was modified 3 years, 3 months ago by vspatarante.
-
This reply was modified 3 years, 3 months ago by vspatarante.
-
This reply was modified 3 years, 3 months ago by vspatarante.