#mangel_terminal-error
1 messages ¡ Page 1 of 1 (latest)
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- mangell03_code, 1 hour ago, 25 messages
- mangell03_code, 19 hours ago, 16 messages
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1260653047101784158
đ Have more to share? Add details, code, screenshots, videos, etc. below.
@pallid bolt uyes we would start fresh. We help in real time in this server and if you prefer async help it's best to work directly with our support team instead: https://support.stripe.com/contact
If you read through the old thread, you can see that the previous tech could not see any errors with the intent that was sent be presentPaymentMethod. The device shows the correct ammount, and allows me to tap my test card and get "Approved"- then the async call happens to processPaymentMethod, and it never retruns, hanging the script. He suggested it is a network problem and I should try another network. That seems like a red hearing- if I can communicated to it with presentPaymentMethod, that would indicate all inbound/outbound traffic is working.
I'm sorry I am helping many people at once. Can you please write a clear question with a clear summary of what you need help with and the relevant object ids
Code
processResult = await stripe.terminal.readers.processPaymentIntent(reader.id,{payment_intent: intent.id});
Question
I have been using my server based code in test mode with a simulated reader very successfully. I am now attempting to use my physical WisePose which is registered in the HQ location in test mode. The only change I have made is the reader ID of the WisePos. The await processPaymentIntent never return (hangs). The paymentIntent has an error that the sim reader never showed.
What have you already attempted?
{"id":"tmr_Fopv6whhPid2at","object":"terminal.reader","action":{"failure_code":null,"failure_message":null,"process_payment_intent":{"payment_intent":"pi_3Pb1u6EPuIFxKCqt18Xeo2i6"},"status":"in_progress","type":"process_payment_intent"},"device_sw_version":"2.24.2.0","device_type":"bbpos_wisepos_e","ip_address":"192.168.87.124","label":"Machine WisePose","last_seen_at":1720623208573,"livemode":false,"location":"tml_FiuXCQpknBASRm","metadata":{},"serial_number":"WSC51315102060
What are you working on?
Trying to get my node.js serverd based code to work with my WisePos in test mode.
Intent ID: pi_3Pb1u6EPuIFxKCqt18Xeo2i6
The "what have you attempted" is the paymentIntent retruned by the reader which got cut off. I can provide it again. I have also tried to change the paymentIntents JSON:
const paymentIntent = await stripe.paymentIntents.create(
{
amount: adjustedAmount,
currency: 'usd',
payment_method_types: ['card_present'],
capture_method: 'manual',
// automatic_payment_methods: {
// enabled: true
// }
}
that was from hours ago. Can you please try with a fresh attempt on the reader and then share the exact relevant newer ids to ensure we are looking at the same thing?
thanks, please try to send one clear message all in one, not many separate messages. Then I'll have a look into our logs
mangel_terminal-error
I made a purchase, and the reader is displaying the ammount and asking me to tap:
INTENT ID:pi_3Pb4iHEPuIFxKCqt0B8bm5CY
processResult: {"id":"tmr_Fopv6whhPid2at","object":"terminal.reader","action":{"failure_code":null,"failure_message":null,"process_payment_intent":{"payment_intent":"pi_3Pb4iHEPuIFxKCqt0B8bm5CY"},"status":"in_progress","type":"process_payment_intent"},"device_sw_version":"2.24.2.0","device_type":"bbpos_wisepos_e","ip_address":"192.168.87.124","label":"Machine WisePose","last_seen_at":1720633982790,"livemode":false,"location":"tml_FiuXCQpknBASRm","metadata":{},"serial_number":"WSC513151020607","status":"online"}
I will now go tap the test card
please read my message above. Don't post small short sentence. Write a clear one message with a full summary
The reader says "Approved" and went back to splash screen
And now the script is hung on:
reader = await stripe.testHelpers.terminal.readers.presentPaymentMethod(reader.id);
Why are you using TestHelpers?
I was using the sim with success previously. Registered the reader in my location in Test Mode, and changed the terminal ID to the registered WisePos (in test mode), and proceeded.
I'm not sure what test helpers are, other than my location is in test mode in the dashboard.
I'm not sure what other information I can provide at this point to describe the flow I am using.
TestHelpers are used to simulate something happening on the Reader without having to do a physical presentment.
Try to move away from that for now and call the real API to accept a payment
Where do I do that in the code?
See https://docs.stripe.com/terminal/quickstart?reader=wpe&platform=server-driven and follow those instructions.
I don't really get what you are asking still sadly. You literally shared the code processResult = await stripe.terminal.readers.processPaymentIntent(reader.id,{payment_intent: intent.id}); earlier without the TestHelper part but now you shared it with it
Ah. Ok. That was code from a while back that always worked with the sim. I will try it without that.
Hold...
Okay, what's the exact PaymentIntent id? And what happened? Like did you present the card on the Reader? Did it succeed? Are you seeing Events on your WebhookEndpoint?
koopajah: Okay, what's the exact PaymentIntent id? And what happened? Like did you present the card on the Reader? Did it succeed? Are you seeing Events on your WebhookEndpoint?
Only place where testHelpers was present. To answer your questions
This is what I get back from processResult = await stripe.terminal.readers.processPaymentIntent(reader.id,{payment_intent: intent.id});
processResult: {"id":"tmr_Fopv6whhPid2at","object":"terminal.reader","action":{"failure_code":null,"failure_message":null,"process_payment_intent":{"payment_intent":"pi_3Pb4trEPuIFxKCqt0eP5Btu4"},"status":"in_progress","type":"process_payment_intent"},"device_sw_version":"2.24.2.0","device_type":"bbpos_wisepos_e","ip_address":"192.168.87.124","label":"Machine WisePose","last_seen_at":1720634743345,"livemode":false,"location":"tml_FiuXCQpknBASRm","metadata":{},"serial_number":"WSC513151020607","status":"online"}
And that is what is returned after I tap my test card and see "Approved"
looking
Okay so looks like it's all working. For example https://dashboard.stripe.com/test/events/evt_1Pb4tyEPuIFxKCqteo0L8GAZ is the Event that shows the processPaymentIntent worked successfully
So if you are still having the issue, can you explain what the problem is?
Yes.
This is the relevant code:
processResult = await stripe.terminal.readers.processPaymentIntent(reader.id,{payment_intent: intent.id});
console.log("processResult: "+JSON.stringify(processResult));
// reader = await stripe.testHelpers.terminal.readers.presentPaymentMethod(reader.id);
reader = await stripe.terminal.readers.presentPaymentMethod(reader.id);
console.log("READER2: "+JSON.stringify(reader));
WHen using the WisePos, the log for READER2 is never executed. Using the simluator with the testHelpers, everything works.
This doc is how I got the simulator to work WEEKS ago: https://docs.stripe.com/api/terminal/readers/present_payment_method
that's where I got testHelpers from, but now that is not there, and still having same issues with the async on the WisePos.
why ae you calling presentPaymentMethod()? processPaymentIntent does everything for you already
That's how I read it in the docs- the sim was working perfectly. My recollection was that I was advised I had to do that- maybe just for the sim?
Let me remove it and see what happens.
yeah I think it's just for the sim maybe
My understanding is that you have a Terminal Reader, you create a PaymentIntent and you tell us "please handle accepting payments for pi_1234 on the Reader tmr_abc" and then we do everything like showing the UI screen to ask to tap, detect the card, confirm the PaymentIntent, etc.
Let me try it out now!
Now I get:
Error: StripeInvalidRequestError: This PaymentIntent could not be captured because it has a status of requires_payment_method. Only a PaymentIntent with one of the following statuses may be captured: requires_capture.
at StripeError.generate (/home/mangell/vend/server/node_modules/stripe/cjs/Error.js:10:20)
at res.toJSON.then.Error_js_1.StripeAPIError.message (/home/mangell/vend/server/node_modules/stripe/cjs/RequestSender.js:105:54)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
type: 'StripeInvalidRequestError',
raw: {
Is that because there are more discrpeancies with the Sim? Maybe the create intent:
const paymentIntent = await stripe.paymentIntents.create(
{
amount: adjustedAmount,
currency: 'usd',
payment_method_types: ['card_present'],
capture_method: 'manual',
// automatic_payment_methods: {
// enabled: true
// }
}
The sim seems to provide a false sense of security,
What is the status of that PaymentIntent exactly? Make sure to carefully check the relevant objects, look at the associated Events, etc.
INTENT: {"id":"pi_3Pb5NzEPuIFxKCqt1nCgs3pF","object":"payment_intent","amount":2200,"amount_capturable":0,"amount_details":{"tip":{}},"amount_received":0,"application":null,"application_fee_amount":null,"automatic_payment_methods":null,"canceled_at":null,"cancellation_reason":null,"capture_method":"manual","client_secret":"pi_3Pb5NzEPuIFxKCqt1nCgs3pF_secret_Go6yfku0BNJFnw53omvqGPZzy","confirmation_method":"automatic","created":1720636623,"currency":"usd","customer":null,"description":null,"invoice":null,"last_payment_error":null,"latest_charge":null,"livemode":false,"metadata":{},"next_action":null,"on_behalf_of":null,"payment_method":null,"payment_method_configuration_details":null,"payment_method_options":{"card_present":{"request_extended_authorization":false,"request_incremental_authorization_support":false}},"payment_method_types":["card_present"],"processing":null,"receipt_email":null,"review":null,"setup_future_usage":null,"shipping":null,"source":null,"statement_descriptor":null,"statement_descriptor_suffix":null,"status":"requires_payment_method","transfer_data":null,"transfer_group":null}
Please take the time to look at it and debug first