GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Tech Coding Help Please (Not Poo Related) (https://gfy.com/showthread.php?t=1357044)

CurrentlySober 08-15-2022 10:44 AM

Coding Help Please (Not Poo Related)
 
OK, so someone I know, who isn't a member of GFY has asked me to post the following question for them. This is copy/pasted verbatim from the email they sent me:

Quote:

I am looking for a for an online resource to teach me how to code to actually do something from an POST webhook. Everything I find only explains what it is then goes on to try and sell their service

I hoping to do it in JavaScript, but right now it's pure html
Now that means NOTHING to me, but probably does to some of you. If you want to reply in this thread, they can read it, and if any specific info is needed, ask and they can email me it, for me to post...

Appricuiate if you can help them - Like I said, NOT a GFY member, but someone I know.

Spankz :upsidedow

Nitzer Ebb 08-15-2022 02:45 PM

Has he tried "Honey Bucket for dummies" tutorial?

blackmonsters 08-15-2022 05:44 PM

He needs a programmer to do this on the back end(server side) and sanitize the POST content.


:2 cents:

rocky1234 08-15-2022 06:31 PM

Quote:

Originally Posted by CurrentlySober (Post 23033533)
OK, so someone I know, who isn't a member of GFY has asked me to post the following question for them. This is copy/pasted verbatim from the email they sent me:



Now that means NOTHING to me, but probably does to some of you. If you want to reply in this thread, they can read it, and if any specific info is needed, ask and they can email me it, for me to post...

Appricuiate if you can help them - Like I said, NOT a GFY member, but someone I know.

Spankz :upsidedow

why wouldn't he join GFY?? then he could ask questions about other things too like how to pick up chicks.

LaSexorcisto 08-15-2022 09:49 PM

Quote:

Originally Posted by CurrentlySober (Post 23033533)
I am looking for a for an online resource to teach me how to code to actually do something from an POST webhook. Everything I find only explains what it is then goes on to try and sell their service

I hoping to do it in JavaScript, but right now it's pure html

If you want to accept an inbound POST from a webhook then you need a backend serverside script to do that. I'm not sure what he means by "it's pure HTML" because you can't use HTML to process a webhook.

If you want to do it in JavaScript then Node will be the best way to go. There are hundreds of resources form learning Node but you can check out one of many online Node courses.

baodb 08-16-2022 02:55 AM

Why not keep it simple and just use a service like https://hookdoo.com/ to receive and parse the webhook calls, then use your own script to process it. Pipedream would be another free alternative.

CurrentlySober 08-16-2022 03:10 PM

This just in!

Quote:

follow up to the question you posted for me
-------------------------------------

i've installed btc pay server and i'm trying to make it direct to a secure webpage after payment has been processed.

The problem is that i can find plenty of resources that give me examples of what a webhook's raw data looks like, how ever i can't find for the love of me any example of js (or some other language) that "reads" the data so that it can be presented in a user friendly way on a webpage.

LaSexorcisto 08-16-2022 04:51 PM

Quote:

Originally Posted by CurrentlySober (Post 23033987)
i've installed btc pay server and i'm trying to make it direct to a secure webpage after payment has been processed.

The problem is that i can find plenty of resources that give me examples of what a webhook's raw data looks like, how ever i can't find for the love of me any example of js (or some other language) that "reads" the data so that it can be presented in a user friendly way on a webpage.

He might be mistaken a postback for a webhook. In either case my last response answers his questions.

If he's looking to read POST data in JavaScript client-side, it can't be done. That's why he can't find examples.

https://stackoverflow.com/questions/...ing-javascript

Learn Node

plsureking 08-17-2022 04:38 AM

Quote:

Originally Posted by CurrentlySober (Post 23033987)
This just in!

yea most webhooks are sending either JSON or XML code to you, which are just other writeup languages like HTML. on your recipient end, you need to receive and parse that message. so you need PHP to convert the message and do something with the data (like store it).

regarding the 2nd issue of the secure page after payment, that is usually called an "approval url" and you'd either set it at your vendor/biller, or redirect your own script after payment success if you built your own checkout.

any deeper explanation would need much more details.

#

CurrentlySober 08-21-2022 07:09 AM

https://i.imgur.com/kp6TSdv.jpg

Good Morning,

I need some more help and hopefully you can post this for me. Sadly, I'm having a really shitty day with this bitcoin server.

I'm trying to test out the API on my BTC pay server with postman but I can't seem to authenticate with my API key

Here's a screen capture : https://i.imgur.com/kp6TSdv.jpg

LaSexorcisto 08-21-2022 09:26 PM

He can email me if he needs directions

CurrentlySober 08-25-2022 11:24 AM

I'm looking for a guide that will help me set up node.js on a local machine.

I want to be able to post data to it from my website, have it run an API query with data from said post call, parse the data and load an HTML page depending on the results of the API query

zijlstravideo 08-25-2022 03:34 PM

Install NWJS, it's node with an embedded browser app: https://nwjs.io/

Download, install, copy and paste your javascript code into the index file, save it and go launch the NWJS app... and you're pretty much done setting up your local node server.

Edit: I just noticed you want to be able to send the request the other way around, right?
So, http request goes from your public website server -> to your client PC at home, which will return it back to the webserver and serves it to the visitor? Your public website would become a reversed proxy pointing to your local machine...

You would probably need a static IP address and open up a port in your router, if you want to have your VPS or webserver make a direct connection with your PC at home, as you would either need to open up a port to expose your local HTTP server at home. You probably want this for the webhook to return the status of the payment, I assume?

Wouldn't it be easier to just run a tiny script on your local pc, that simply sends the latest "data" every 30 seconds or whatever, to a public url on your hosting/VPS? Basically a cron job.


If you do need a quick and dirty way to expose a port on your local machine, LocalXpose is a working and out of the box solution by allowing you to route it through their servers to your home PC.
Easy, one click setup basically: https://localxpose.io/


All times are GMT -7. The time now is 04:20 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc