Coding Help Please (Not Poo Related)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • CurrentlySober
    Too lazy to wipe my ass
    • Aug 2002
    • 38940

    #1

    Tech 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:

    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


    👁️ 👍️ 💩
  • Nitzer Ebb
    Confirmed User
    • Apr 2015
    • 797

    #2
    Has he tried "Honey Bucket for dummies" tutorial?
    -= Krampus Productions =-

    Comment

    • blackmonsters
      Making PHP work
      • Nov 2002
      • 20961

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


      Free Open Source Live Aggregated Cams Script (FOSLACS)

      Comment

      • rocky1234
        Confirmed User
        • Jun 2012
        • 273

        #4
        Originally posted by CurrentlySober
        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
        why wouldn't he join GFY?? then he could ask questions about other things too like how to pick up chicks.

        Comment

        • LaSexorcisto
          Confirmed User
          • Mar 2022
          • 95

          #5
          Originally posted by CurrentlySober
          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.

          Comment

          • baodb
            Confirmed User
            • Jan 2021
            • 103

            #6
            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.

            Comment

            • CurrentlySober
              Too lazy to wipe my ass
              • Aug 2002
              • 38940

              #7
              This just in!

              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.


              👁️ 👍️ 💩

              Comment

              • LaSexorcisto
                Confirmed User
                • Mar 2022
                • 95

                #8
                Originally posted by CurrentlySober
                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

                Comment

                • plsureking
                  bored
                  • Aug 2003
                  • 4904

                  #9
                  Originally posted by CurrentlySober
                  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.

                  #
                  PornCMS / low cost paysite management with hosting

                  Comment

                  • CurrentlySober
                    Too lazy to wipe my ass
                    • Aug 2002
                    • 38940

                    #10


                    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


                    👁️ 👍️ 💩

                    Comment

                    • LaSexorcisto
                      Confirmed User
                      • Mar 2022
                      • 95

                      #11
                      He can email me if he needs directions

                      Comment

                      • CurrentlySober
                        Too lazy to wipe my ass
                        • Aug 2002
                        • 38940

                        #12
                        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


                        👁️ 👍️ 💩

                        Comment

                        • zijlstravideo
                          Confirmed User
                          • Sep 2013
                          • 806

                          #13
                          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/
                          Contact: email

                          Comment

                          Working...