#createitcarlos-terminals
1 messages · Page 1 of 1 (latest)
@plush nebula , WPF is a Windows platform application. So it is a .Net desktop application. The frontend is WPF/XAML Windows markup language, the server-side code is .Net
Thanks makes sense
So sounds like you are using the Server driven integration then?
More or less we are looking at the server-driven examples, but in any case, theoretcially, we would write different applicatoins with different front ends to run the Terminals and if the Stripe calls were running as a single applicatiion instead of installed per device, would it be possible to use it as a service.
Gotcha, thanks for clarifying
The examples online are using the JS web for the client and there aren't any real non-JS web-based examples using .Net
Hmm thinking. I'm not as familiar with server-driven so may need to ask a colleague if we have a strong recommendation here.
So let's say we build an iOS/Android app and a Windows app, but we only want to have Stripe run as a service on a server and just have the applications talk to the single service instead of having to manage and redeploy multiple applications each time we need to add to the Stripe API service.
I did not know if there are good examples of multiple clients talking to a single Stripe service.
Thanks for asking, that would be super helpful
My understanding is this is totally fine and we would indeed recommend just using a single server here but I'm double checking.
Thank you, help with the calls on how to differentiate or configure the traffic from and to each terminal would be very helpful too. More or less how would we know which terminal should receive which message based on the calls to the single service.
Maybe where in the documention or what API calls we should be using.
I also did a quick diagram of what we are looking for our infrastructure.
It should be possible to have multiple terminals pointing to the same server.
Sorry, still catching up on this, are you running in a specific error when trying to do this or are you trying to understand how to do a certain part of this in .NET?
Trying to understand mainly. What I am wondering is from the client what parameters would we pass to let the service know what terminal the payment is coming from and then getting the response back for that specific terminal so we can show any responses on the client application
The example for the .Net sample uses the Stripe JS with the .Net as the backend, but it does not show an example if you have multiple terminals. Which we have two currently so we can develop against both to try to develop a service.
Gotcha. Looking more in to the specifics of how to do this.
You should just need to keep track of which terminal ID maps to which client and then your client can just send the terminal ID back to your server and it can use that one to charge
Ok, can i post some code here to check to make sure I am doing this correctly then? I am trying to use the example from Stripe to get the terminal status but when I try to return my status object on the terminal, it comes back to the client empty
Mainly because I feel I am missing a step
What call is returning empty data?
And yes, please send your code if you are unsure what to pass where or if you are seeing behavior like this.
And this is your code that is trying to send the status from the server that is turning up empty on the client?
Correct. So what I am doing is currently using the JS sample project using the .Net as the server.
So my get terminal by ID in my server side code is this:
[Route("get_terminal_manually")]
[ApiController]
public class PaymentGetTerminalController : Controller
{
[HttpGet]
public ActionResult PostToGetTerminal()
{
var service = new ReaderService();
var term = service.Get("tmr_EmULswRlTPRBdX",null, null);
return Json(term); //-THIS IS SUCCESSFUL AND BRINGS BACK THE TERMINAL OBJECT, HOWEVER - SEE CLIENT CODE
}
}
//========CLIENT CODE
function getTerminal() {
console.log("trigger get terminal");
// Do not cache or hardcode the ConnectionToken. The SDK manages the ConnectionToken's lifecycle.
return fetch('/get_terminal_manually', { method: "GET" })
.then(function (response) {
console.log(JSON.stringify(response)); //--- 'response' COMES BACK BLANK
return response.json();
})
.then(function (data) {
// return data.secret;
});
}
Ok so My server side code gets the object back in the 'term' and when passed back to the JSON Return the client should pick it up and but the response comes back {}
For my JS function I just created another simple HTML button that calls the 'getTerminal()' function