I would like to add a crypto payment to my website. The thing is, I’m doing raw PHP without any plugin or such, which means I also setup files by hand, not using composer or others.
The online documentation seems kinda light for that.
Now I created embedded buttons, but when someone pays I have to update my database and store their payment among other stuff. I guess I have to use webhooks ? Is there an example of a webhook in PHP ? I checked the PHP github but it’s unclear to me.
Thanks in advance.
EDIT : Ok I managed to make the webhook.php to work, but when I try to send a test in the dashboard, I get a Failed to establish a connection to the remote server error, though when I access the endpoint via the browser I get the page and error message saying that ther’s no JSON data which is normal. How can I make this work ?
Hi @ganon551 !Thank you for taking an interest in trying out Coinbase APIs. For the details regarding your inquiry, we will check on this for you with our team to see how we can best assist. We’ll get back to you once we have more information. Keep in touch!
Hi @ganon551! Welcome to the forum!
We’re happy to help, but first we need you provide the following information in order for us to investigate your concern further:
- Can you confirm if your server is publicly available without any restrictions?
- If possible, can you share a more detailed error log from your server?
Looking forward on your response. Thank you and have a nice day!
Thank you for your answer.
I have no error from my server, which is of course publicly available. The error occurs when I try to send a test json from coinbase dashboard. Which ever event I try I receive a failed to establish connection to the server error from coinbase.
Hi @ganon551! Thank you for providing details regarding your concern. If possible, can you also share a screenshot after trying to send a JSON test from the Coinbase dashboard wherein you received a failed to establish connection to the server error? This will be of much help to the investigation of your case. Thank you so much!