#Xadacka - Termina

1 messages · Page 1 of 1 (latest)

rough current
#

HI 👋
can you provide the docs you are working from and where exactly you are getting stuck?

ocean estuary
#

absolutely, i'm just using the repo on github connected to the terminal backend with a wisepos e. everything works absolutely perfectly as stock, no issues, when i try and add code to run my command everything just falls apart. i don't really know nodejs well but can figure the basics out

#

what i want to do, if that helps, is have all this running on a pi (works fine) and then when a payment is approved run a command to play a video on the attached display. basically exec "cvlc -f file.mp4" once it gets the payment approved response from stripe

rough current
#

In the POS system your working on?

ocean estuary
#

sorry? more context... we're a fundraising company for charities, we're basically setting up a system they can have at their fundraising events. a display, few buttons, and the card reader. they'll press a button (i.e. donate €10) which i'll use the pi gpio pins to capture, send the amount they selected to the terminal so it'll activate the terminal, and once they tap and their donation goes through it'll play a little video animation. all the rest is fine and no problem i just can't get node to exec the command for the video

rough current
#

The web app is your Point of Sale application (POS).

ocean estuary
#

ah okay. well yes i've all that working, payments work, the terminal connects and works, no issues at all for the testing. it's that i need to add a terminal command into that demo but any time i try to the entire thing breaks, errors for exec not being defined even though i've called it, "exec not a function" popping up, lots of little things that i just don't know enough of js to figure out and can't seem to find any solutions online, was hoping someone here might know a quick and easy solution that can be plugged in without too much effort from anyone!

#

terminal command meaning the linux shell, sorry, probably confusing with the payments terminal also being involved

rough current
#

Okay so command line terminal fuction, yes?

ocean estuary
#

yup!

rough current
ocean estuary
#

no worries thought it was worth a shot, i've found and tried that article, works perfectly on an empty project but when adding the code to your code it breaks all your code so thought you might have seen something similar before or something. thanks anyway!

rough current
#

I am still unclear about which "Your code" you are talking about. The doc you linked didn't have explicit code snippets

ocean estuary
#

that's the codebase i'm using and running and working with

rough current
#

That is purely used to simulate events and is in no way i ntended as a working template

#

It's desinged to show you the functions that get called and the data passed back and forth

ocean estuary
#

oh i know just wanna get this part off the ground to demo to our partners and take it from there

rough current
#

I would recommend starting with the integration doc I linked earlier.

#

It will mean writing your own client and server application but it can all be run from a single machine

ocean estuary
#

i’ll do that, that’s needed anyway just wanted to quickly get this off the ground quickly but that’s cool thanks for your help

rough current
#

We do have some good starter kits for building the server-side portion too

ocean estuary
#

great thank you

rough current
#

Take a look here. This is designed for a web-based credit card interface but it has the code to create a REST API that will generate Payment Intents