#reyanshsharma
1 messages ยท Page 1 of 1 (latest)
Hi ๐ what part of the flow are you trying to understand?
Terminal server-side implementation:
- I created a PI --> Successfully created.
- Called ProcessPaymentIntent method to start the payment process on reader --> Got reader busy exception. Got 400 errors --> request to stripe failed.
- Retried ProcessPaymentIntent but got null as a response.(We have a retry logic so in case of this exception we recall ProcessPaymentIntent). Got request to stripe completed.
That seems to align with what I'm seeing.
Intent creation: https://dashboard.stripe.com/test/logs/req_cHLQ567KHNFIjI
Process payment failing due to busy reader: https://dashboard.stripe.com/test/logs/req_pdeh2Xriyhx0Yt
Process payment succeeding: https://dashboard.stripe.com/test/logs/req_LfnXBLQkGHTOl3
Intent being confirmed: https://dashboard.stripe.com/test/logs/req_L4KfT2K32Sgxuk
What are you looking for clarity on regarding the flow?
Are we supposed to get a null response from ProcessPaymentIntent endpoint/request? My assumption was it can't be null if no exception so I have some further steps based on that assumption.
If this can be null I have to change the logic.
I would not have expected it to return a null response. My understanding is expected return values are either a Reader object or an error.
Do you by chance have a request ID from the request that returned null that I could take a closer look at?
I am only able to find the one which resulted in exception
req_pdeh2Xriyhx0Yt
and the one which succeeded req_LfnXBLQkGHTOl3
Gotcha, and that aligns with the behavior I'd expect to see, where an error is returned. I do think it's unexpected for a null value to be returned, but I'm not sure offhand hat could have caused that behavior. I would recommend adding logging to check for a null value being returned, and try to capture as much relevant data as possible when that happens so we can try to get a better understanding of what is going on.
Sure will add logging on else block in the code
Though I ended up getting return from else block from point 3
Any recommendations for the type of info I can log as only info I have in hand is null reader ๐
Oh, I may have misunderstood the concern initially. I see you have that wrapped in a try block, what type of exceptions is the associated catch block catching?
Trying retry for ProcessPaymentIntent 3 times before actually throwing an error.
- terminal_reader_timeout
- TerminalReader_Status_Busy
In my scenario, there was an exception when I tried calling [ProcessPaymentIntent] the first time so retried. There was no exception on the second try but the reader was null hence I got response
Success = false, ExceptionMessage = "Unable to process the payment intent: " + paymentIntent.Id
Also before retry e are waiting for 1 second.
Hm, is ReaderActionStatus something you added? (I'm having trouble finding references to it)
And is there an additional catch block further down that catches any other exceptions? I'm wondering if there is an exception that is being thrown that isn't being caught/detected.