PayPal Native eCommerce webhook returns HTTP 500 – Tutor LMS 4.0.7
-
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.APPROVEDwebhook 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_REQUESTerror with validation details including:must match "^[a-zA-Z0-9]+$"size must be between 0 and 50I also checked the Tutor LMS PayPal implementation. During
CHECKOUT.ORDER.APPROVED,verifyAndCreateOrderData()callsApi::capturePayment($payload_stream), and this is where the request fails.The PayPal webhook is configured for both required events:
CHECKOUT.ORDER.APPROVEDPAYMENT.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.
- Event:
You must be logged in to reply to this topic.