How to get the value of ‘order_id’ in my payment_consultation.php?

Hi guys!

My javascript is:


         xhr.open('POST', WebsitePath + '/payment_consultation/' + order_id);
         xhr.setRequestHeader('Content-Type', 'application/json;charset=UTF-8');
         xhr.send(JSON.stringify(details));

How to get the value of ‘order_id’ in my payment_consultation.php?

Inside your PHP code, you could add var_dump($_POST); which should show the contents of that array. That’s the normal way you’d get it, but I presume you have some .htaccess magic going on so that might alter things. Perhaps you could var_dump($_GET); as well, if POST contains nothing.

1 Like

Thank you!
It worked.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.