#adrianfluid_98075

1 messages ยท Page 1 of 1 (latest)

covert fiberBOT
woven junco
#

Hello

tame pine
#

I apologise, Its not retreiving the readers. But was this morning

woven junco
#

Do you have a Reader serial number you could provide where this is happening?

#

And which Terminal SDK/integration are you using?

#

Ah so you aren't able to discover readers currently at all?

tame pine
#

Javascript / PHP SDK

#

That's correct. IT was working as intended this morning as I demo'd the current WIP

#

But even switching to the simulated terminal, it is unable to connect to stripe

woven junco
#

Hmm okay so let's back up a second

tame pine
#

The error received is as such

woven junco
#

You are saying that the error you are seeing is (index):1 onFetchConnectionToken failure. Please make sure your function creates a new connection token via your backend. however when you call discoverReaders() there is no result, correct?

#

Oh oh oh

#

Okay this is specifically an issue with reaching your server it seems like

tame pine
#

hmm

woven junco
#

Have you added logs for what is happening when you attempt to fetch a connection token from your backend?

#

Do you have any logs (or seeing any errors) in that backend endpoint?

tame pine
#

I don't

#

This is our backend endpoint

#

Most of the code was a copy and tweak from the example code provided in the documentation.
Then just tweaked with how it runs

woven junco
#

Yep okay so I think the first step is to add a couple logs in this code to make sure it is running and add a log client-side right after you fetch this endpoint to ensure your connection token is appearing client side as well.

tame pine
#

The code is crashing within this section as its not getting past it. But nothing has changed code wise to this function or any other function to do with the connection.
I was working on a part which happens our side after payment has been taken

woven junco
#

I mean something is affecting the ability for this function to call your backend.

#

It is possible it is just a networking issue.

covert fiberBOT
woven junco
#

But unclear right now. I would recommend adding a log at the beginning of your backend endpoint to ensure that is getting hit at all here.

tame pine
#

Hmm, i've removed some of the security around the end point and now getting further but its then crashing with the same error after this.

#

I'll add some logs into the back end and then see what's going on. But just confused as to whats happened :/

woven junco
#

Yeah can't really say from my end, sorry.

#

Continuing to add logs and troubleshoot from there is the way to go

#

But do let us know if we can help further

tame pine
#

Got to love programming at times. Don't touch code and it breaks ๐Ÿคฆโ€โ™‚๏ธ

woven junco
#

lol yep

#

Always fun

tame pine
#

Hang on a second...
<div style="border:1px solid #990000;padding-left:20px;margin:0 0 10px 0;">

<h4>A PHP Error was encountered</h4>

<p>Severity: Error</p>
<p>Message: Class 'Stripe\StripeClient' not found</p>
<p>Filename: controllers/Payment_terminal.php</p>
<p>Line Number: 23</p>

</div>

woven junco
#

Huh that's odd

#

That seems to be saying the PHP SDK isn't getting initialized afaict

tame pine
#

Unless its because I had to switch branches which may have had different composer settings when I pushed my code

woven junco
#

That sounds very possible

tame pine
#

Ok that's annoying. It is looking that way.. Let me re-install ๐Ÿ˜ฎโ€๐Ÿ’จ

#

Yup. That was the issue ๐Ÿคฆโ€โ™‚๏ธ

woven junco
#

Well glad it is figured out at least!

tame pine
#

Instlled it on the server but forgot it in my composer.json

#

so when I switched branches and pushed that code it updated composer and got rid of it

#

Thanks for the assist / rubber duck ๐Ÿ˜‚

woven junco
#

Happy to help

tame pine
#

Have a good day ๐Ÿ™‚