• Resolved adamindset

    (@adamindset)


    Hi,

    I’m using Tutor LMS Free 4.0.7 with Native eCommerce and the PayPal gateway in Sandbox mode.

    The PayPal checkout works correctly and the buyer approves the order. PayPal then sends the CHECKOUT.ORDER.APPROVED webhook to the Tutor LMS endpoint, but the endpoint returns HTTP 500.

    PayPal Webhook Event Logs show:

    • Event: CHECKOUT.ORDER.APPROVED
    • Delivery status: FAILURE
    • HTTP status: 500 Internal Server Error
    • Webhook endpoint: /wp-json/tutor/v1/ecommerce-webhook/paypal

    The Tutor LMS order consequently remains Unpaid / Incomplete.

    The PHP error log points to the Tutor LMS PayPal payment gateway during webhook processing / capture and returns a PayPal INVALID_REQUEST error with validation details including:

    must match "^[a-zA-Z0-9]+$"
    size must be between 0 and 50

    I also checked the Tutor LMS PayPal implementation. During CHECKOUT.ORDER.APPROVED, verifyAndCreateOrderData() calls Api::capturePayment($payload_stream), and this is where the request fails.

    The PayPal webhook is configured for both required events:

    • CHECKOUT.ORDER.APPROVED
    • PAYMENT.CAPTURE.COMPLETED

    Could you please confirm whether this is a known issue with Tutor LMS 4.0.7 Native PayPal and advise how to resolve it?

    Thank you.

Viewing 1 replies (of 1 total)
  • Hey @adamindset ,

    Thank you for reaching out and for providing the detailed information. Could you please check all the webhook events configured in PayPal and ensure they are properly set up? Also, please make sure your site is publicly accessible and has an active SSL certificate. Ref: https://tutorlms.com/docs/native-ecommerce/payment-gateways/paypal/

    We tested the PayPal checkout and webhook flow in our test environment but were unable to reproduce the issue.

    Please let us know the results after checking the above.

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.