sjaelv
Forum Replies Created
-
@msykes :
PayPal payments sometimes work on desktop browsers but consistently fail on mobile devices with a “401: rest_not_logged_in” error in the REST API.
The endpoint affected is
/wp-json/events-manager/v1/gateways/paypal_checkout/capture.Bookings seem to work more often when users are logged in.I have already taken the following steps:
I switched my theme (Enfold by Kriesi) to a standard WordPress theme. The error persisted.
I modified my Apache server’s .htaccess file to ensure the Authorization header is passed. The error persists.
I cleared all caches (plugin and server).
The analysis of network requests on mobile devices shows that the API request is answered with a 401 error, indicating that the authentication for the capture endpoint is not being transmitted correctly. Could you please check if this is a known issue related to mobile usage or specific themes? It seems that the Authorization header or the Nonce token is not being passed to the API correctly on mobile devices. Below you will find the complete curl request data that triggers the error. I hope this information helps you find the problem. http://www.werkbox3.de]
Problem with the PayPal add-on and the Events Manager Pro plugin on the website
WordPress 6.8.2
Envato 7.1.1
Events Manager Pro Version 3.6.2
Events Manager Pro PayPal Version 1.2.1 | By Pixelite
curl ‘https://www.werkbox3.de/wp-json/events-manager/v1/gateways/paypal_checkout/capture‘
-H ‘Accept: /‘
-H ‘Accept-Language: de-DE,de;q=0.9,en-US;q=0.8,en;q=0.7’
-H ‘Cache-Control: no-cache’
-H ‘Connection: keep-alive’
-H ‘Content-Type: application/json’
-b ‘PHPSESSID=XXXXXXXXXXXX’
-H ‘Origin: https://www.werkbox3.de‘
-H ‘Pragma: no-cache’
-H ‘Referer: https://www.werkbox3.de/events/testkurs-3/‘
-H ‘Sec-Fetch-Dest: empty’
-H ‘Sec-Fetch-Mode: cors’
-H ‘Sec-Fetch-Site: same-origin’
-H ‘User-Agent: Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Mobile Safari/537.36’
-H ‘X-WP-Nonce: 87b1386aea’
-H ‘sec-ch-ua: “Not;A=Brand”;v=”99″, “Google Chrome”;v=”139″, “Chromium”;v=”139″‘
-H ‘sec-ch-ua-mobile: ?1’
-H ‘sec-ch-ua-platform: “Android”‘
–data-raw ‘{“order_id”:”4C961115XG718745Y”,”payment”:{“orderID”:”4C961115XG718745Y”,”payerID”:”LVDY6SMDXX9TN”,”paymentID”:”4C961115XG718745Y”,”billingToken”:null,”facilitatorAccessToken”:”A21AANP7Q0TqF7-BwJV9AcgyaqmmctWiK0QfJDmDQVaDhiaiHUnhxznWj5VKBpRXyvcuD_I3ZjACBlhTQX9Cw2UYwwAweyODA”,”paymentSource”:”paypal”},”gateway”:{“nonce”:”2d721131f5″,”action”:”capture-booking-intent-paypal_checkout-“,”uuid”:”1cb8f358417e4d6e8dc7672bfc4475f9″}}’
Response 401: { “code”: “rest_not_logged_in”, “message”: “Du bist aktuell nicht angemeldet.”, “data”: { “status”: 401 } }