View Issue Details

IDProjectCategoryView StatusLast Update
0006581Talermechant backendpublic2020-09-10 01:07
ReporterFlorian Dold Assigned Tojonathanbuchanan  
PrioritynormalSeveritytweakReproducibilityhave not tried
Status assignedResolutionfixed 
Product Versiongit (master) 
Target Version0.8.1 
Summary0006581: long polling on /orders/{order_id} must return when already_paid_order_id becomes available [test needed]
DescriptionCurrently, the request blocks even if the wallet pays for the same fulfillment_url in the current session for an existing order.

This causes the re-purchase detection flow to now work unless the page is manually refreshed.
TagsNo tags attached.

Activities

Christian Grothoff

2020-09-07 14:07

manager   ~0016900

Assuming this was in conjunction with a /paid request, this should be fixed in f19e58b..229fbc1.

I looked at the /pay code, there it seems everything was already OK.

Did NOT test, as I am not sure what you did to produce the issue in the first place.

Christian Grothoff

2020-09-09 10:42

manager   ~0016943

Florian reports this is fixed.

Florian Dold

2020-09-09 10:45

manager   ~0016944

It's actually not! I still have to manually refresh the page, as the long-polling request made by the JavaScript on the page doesn't return.

Florian Dold

2020-09-09 10:49

manager   ~0016945

(To reproduce, but article on shop.test.taler.net, delete cookies, refresh page, pay again. Instead of the page auto-refreshing, you have to refresh manually after scanning the QR code. Looking at the dev tools, the long-polling request doesn't return a response, even though it should!)

Christian Grothoff

2020-09-09 23:19

manager   ~0016954

I've implemented a fix for this in 7302e0c..e12f64d. Untested, and needs testcase.

I will test next, and if it works this will do for 0.8.0.

Jonathan: please (eventually) implement a test for this in test_merchant_api.c (for 0.8.1) -- we don't want to see regressions on this stuff!

Christian Grothoff

2020-09-10 01:07

manager   ~0016955

Ok, finally got it to work. Jonathan: please do write tests with good coverage for the repurchase detection logic.
See diff from 7302e0cc35bd3de6e84fa1310be094243372a3bc..a29e81dd6356a9897c6eb299feee80a173f60562 for relevant code paths.

Issue History

Date Modified Username Field Change
2020-09-07 11:48 Florian Dold New Issue
2020-09-07 11:48 Florian Dold Status new => assigned
2020-09-07 11:48 Florian Dold Assigned To => Christian Grothoff
2020-09-07 14:07 Christian Grothoff Note Added: 0016900
2020-09-07 14:07 Christian Grothoff Assigned To Christian Grothoff => Florian Dold
2020-09-07 14:07 Christian Grothoff Status assigned => feedback
2020-09-09 10:42 Christian Grothoff Status feedback => resolved
2020-09-09 10:42 Christian Grothoff Resolution open => fixed
2020-09-09 10:42 Christian Grothoff Fixed in Version => 0.8
2020-09-09 10:42 Christian Grothoff Note Added: 0016943
2020-09-09 10:45 Florian Dold Note Added: 0016944
2020-09-09 10:45 Florian Dold Status resolved => assigned
2020-09-09 10:49 Florian Dold Note Added: 0016945
2020-09-09 10:49 Florian Dold Assigned To Florian Dold => Christian Grothoff
2020-09-09 23:19 Christian Grothoff Note Added: 0016954
2020-09-09 23:19 Christian Grothoff Fixed in Version 0.8 =>
2020-09-10 01:07 Christian Grothoff Note Added: 0016955
2020-09-10 01:07 Christian Grothoff Assigned To Christian Grothoff => jonathanbuchanan
2020-09-10 01:07 Christian Grothoff Severity minor => tweak
2020-09-10 01:07 Christian Grothoff Target Version 0.8 => 0.8.1
2020-09-10 01:07 Christian Grothoff Summary long polling on /orders/{order_id} must return when already_paid_order_id becomes available => long polling on /orders/{order_id} must return when already_paid_order_id becomes available [test needed]