Open phinjensen opened 6 years ago
original author: Jon Jensen
date: 2010-09-29T18:36:21-04:00
Carl, good explanation of the complexity lurking beneath the surface of even "simple" gift certificate implementation.
I'm curious about the race conditions you mention. Can you elaborate on those? I'm not clear on how gift certificates add any new race condition risk -- with or without them, at final order submission time the cart and all payments have to be validated and finalized, right? Is there more that I'm not thinking of?
original author: Carl Bailey
date: 2010-10-05T12:42:02-04:00
Jon,
Probably not. I am referring to posting the transaction against the certificate. Care has to be exercised: The first thought is to check and see if the certificate has enough of a balance to cover the current transaction, and then post the transaction if the certificate is clear. But the race condition happens between checking and posting.
original author: Jon Jensen
date: 2010-10-05T15:02:51-04:00
Ok, thanks, Carl. I assume (using a traditional RDBMS) that at final order consummation time a transaction is begun and the gift certificate data will be locked till the order is complete.
Probably that should not be simply assumed as I've done. :)
original author: yanger
date: 2012-01-31T23:50:21-05:00
i only have issues with counterfeits.. besides printing on a special paper, or using special pigments, not much you can do to check authenticity unless there's some sort of hash that is printed on each gift certificate that is not copyable ... hmm..
Comments for https://www.endpointdev.com/blog/2010/09/gift-certificates-easy-to-say-hard-to/ By Carl Bailey
To enter a comment: