0

Is it possible to trigger php code on JS Callbacks? I have a payment process which on successful payment (Moneris) I would like to run code to update my local server data..

My understanding is that the php on a page will have completely loaded by the time the Callback gets its response. So not sure how to send a fresh piece of pho code triggered by the callback response.

  • 1
    PHP is executed on server and JS on client. What you want to do can be achieved by AJAX calls – Cid Jul 30 '23 at 19:35
  • Welcome to Stack Overflow, please use the search before creating a new question. Upvote those answers that were useful for you. /E: And what Cid just wrote. You're likel looking for that Ajax thing. Payment gateways may also have webhooks, you can also search for those if that's the case. – hakre Jul 30 '23 at 19:36

0 Answers0