consensusRealityIO / RSBP

Real Simple Bitcoin Payments
GNU General Public License v3.0
14 stars 25 forks source link

all http calls are now async and display network errors #8

Closed viorels closed 7 years ago

viorels commented 8 years ago

also refactored some functions to make the code more readable

dykstranet commented 8 years ago

I see that you upgraded to jquery-1.12.1. Just curious, did you need new functionality contained in the new version?

I have tested your version and it looks very good. This is definitely an improvement over the last version and I like the way that you have refactored the code. It is more readable now.

In my testing, I noticed that the error message does not appear until the time interval has elapsed and a connectivity check is performed. This leaves open a window where the customer can initiate a payment, but RSBP cannot confirm that the payment was received. This may leave restaurant staff confused as to if there was a problem. Is there a way to check connectivity right when the "PAY" button is pressed?

I will commit your changes once we've sorted out these few issues. Great work man!

viorels commented 8 years ago

I had no strong reason for updating jQuery. Just that it was kind of old (may 2014) and thought it doesn't hurt (no incompatible changes, just bug fixes). About network errors, right now there is a balance check after displaying the qr modal. You are right, it may take a while before it times out and an error is displayed. Maybe it would be better to display the modal only after we get the initial balance. How should the UI look during balance check? That could take 1 second (success) to 30 seconds (timeout) so we should display some kind of "initializing payment" or "loading..." indicator.

dykstranet commented 8 years ago

Ok cool. Makes sense to upgrade jQuery. Yes.

Question: Is there a way to monitor internet connectivity without doing a full balance check? Maybe ping bitcoin average and blockchain.info? Then display an error if either is unreachable?

Also, I'm getting some unusual behaviour as I test today. I have an instance of your software running at http://consensusreality.io/viorel/pay.html?currency=USD. When payment is made, the success message pops up for a quick second then disappears. Have you seen this happen?

dykstranet commented 8 years ago

@viorels I've been doing more testing this afternoon and I noticed that the green success message sometimes still shows from the last successful transaction. I'm not sure why this is happening but it could be confusing for the staff using it. Perhaps we could force a refresh of the page when the modal window is dismissed?

viorels commented 8 years ago

Ok, I will look into that.

On Thu, Mar 31, 2016, 11:27 PM dykstranet notifications@github.com wrote:

@viorels https://github.com/viorels I've been doing more testing this afternoon and I noticed that the green success message sometimes still shows from the last successful transaction. I'm not sure why this is happening but it could be confusing for the staff using it. Perhaps we could force a refresh of the page when the modal window is dismissed?

— You are receiving this because you were mentioned.

Reply to this email directly or view it on GitHub https://github.com/consensusRealityIO/RSBP/pull/8#issuecomment-203986256

dykstranet commented 8 years ago

Hi @viorels. After further testing, I can confirm that the Green Success message does not consistently appear upon successful completion of the transaction. Sometimes it appears and then disappears. Not sure why this is happening but it does not seem to happen with the previous code base. Also, the green success message from a previous success will still appear briefly when re-using the same page for another transaction. Hope that is clear.

viorels commented 8 years ago

I'll think about how to better design the message display so we don't get leftovers like that. I'll have some time for this at the beginning of next week. Thanks

On Thu, Apr 21, 2016, 8:17 PM dykstranet notifications@github.com wrote:

Hi @viorels https://github.com/viorels. After further testing, I can confirm that the Green Success message does not consistently appear upon successful completion of the transaction. Sometimes it appears and then disappears. Not sure why this is happening but it does not seem to happen with the previous code base. Also, the green success message from a previous success will still appear briefly when re-using the same page for another transaction. Hope that is clear.

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/consensusRealityIO/RSBP/pull/8#issuecomment-212888166