• Hi, When someone buys a course is it possible to automatically set order status to completed instead of pending ? We want clients to be able to enroll immediately after payment and not for us to change their order status manually every time.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support brianvu-tp

    (@briantp)

    Hi,

    Which payment method you are using? The order just changes to complete when the payment system response status is complete.
    For example: if an order on PayPal changes status to complete it will send a request for LearnPress to change the status to complete.

    Thanks

    Thread Starter mantastic

    (@mantastic)

    We use paypal, after i disabled block outgoing connections in hosting panel it works, does that make sense? Can hosting block it somehow?

    Plugin Support brianvu-tp

    (@briantp)

    Hi,

    I think hosting can do it, this is the contribution of our customer, who has the same issue, he said” I have found the solution – it was not a problem of Thimpress, nor of PayPal. It was a settings of my provider, a so called “filter against guestbook spam”, where the IPN of PayPal was blocked. I deactivated the setting and it worked. Here the problem is described (in german, you can use deepl for translation):
    https://www.webdecker.de/artikel/items/strato-paypal-ipn-http-error-503.html”

    Hope it helpful.

    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.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘order status after payment’ is closed to new replies.