cocalc
cocalc copied to clipboard
License purchase for the past went through
Something is really weird with transaction 33351 - it broke my downloading scripts because it cannot be serialized to feather, with the error
An error occurred while writing to cache: ("Expected bytes, got a 'int' object", 'Conversion failed for column description with type object')
I never had any issues for half a year until this one. Looking at the transaction itself I see
Note that it is a transaction purchased today for one day of the LAST year, which just should not be possible. Looking at it as the user we get
i.e. it seems that the past start was kept, but the duration got shifted to start from the purchase moment or something like this.
My guess is that there is some handling for the case "get a license from now until later" which, by the time the license is actually purchased, turns into "from 3 minutes ago until later". It is certainly a very important case that should be handled. But if the start is in the past by more than a sensible amount, we should refuse the transaction with a sensible error message. "Sensible amount" is certainly not greater than an hour. In this case the intention was probably to purchase a license for the exam.
Incidentally, this license was in the cart with another one and the whole cart was paid for twice, so I had to refund one of the payment. I don't think this is related, but who knows...
I wonder if #7258 is related.
Well, I can't figure out how to attempt to buy a license in the past. Using widgets past dates are not selectable and if I enter them manually, they seem to get reset to future ones. So let's hope that nobody will ever do it again. Although some sanity check during purchase may be useful.