- Nov 06, 2019
-
-
Jean-Paul Calderone authored
-
Jean-Paul Calderone authored
-
Ramakrishnan Muthukrishnan authored
let more "fixed" parameters come first and then the dynamic ones so that one can do currying with the immutable parameters applied.
-
Ramakrishnan Muthukrishnan authored
Stripe developer dashboard provides a few keys and we specifically need to use the secret key.
-
Ramakrishnan Muthukrishnan authored
-
Ramakrishnan Muthukrishnan authored
-
Ramakrishnan Muthukrishnan authored
If for "some reason" Stripe servers returned a mismatched voucher code, return http 500 status.
-
Ramakrishnan Muthukrishnan authored
-
Ramakrishnan Muthukrishnan authored
-
Ramakrishnan Muthukrishnan authored
-
- Nov 05, 2019
-
-
Ramakrishnan Muthukrishnan authored
-
Ramakrishnan Muthukrishnan authored
-
Ramakrishnan Muthukrishnan authored
-
Ramakrishnan Muthukrishnan authored
-
Ramakrishnan Muthukrishnan authored
Mark the voucher as paid if the stripe charge API returns a Charge object.
-
Ramakrishnan Muthukrishnan authored
-
Ramakrishnan Muthukrishnan authored
-
Ramakrishnan Muthukrishnan authored
The skeleton is in place, a lot of actual work still needs to be done.
-
Ramakrishnan Muthukrishnan authored
-
Ramakrishnan Muthukrishnan authored
-
- Oct 29, 2019
-
-
Jean-Paul Calderone authored
-
Jean-Paul Calderone authored
-
- Oct 25, 2019
-
-
Jean-Paul Calderone authored
Also, explode the tuple that made its way into `redeemVoucherHelper`
-
- Oct 24, 2019
-
-
Ramakrishnan Muthukrishnan authored
`redeemVoucher' reads stuff from the db, makes decisions and then writes to the db. However if there is another client doing a simultaneous `redeemVoucher' for the same `voucher', then both of them would redeem the voucher, which is incorrect. The operations should have exclusive access to the db and this is achieved with `withExclusiveTransaction`.
-
Ramakrishnan Muthukrishnan authored
-
Ramakrishnan Muthukrishnan authored
-
Ramakrishnan Muthukrishnan authored
-
Ramakrishnan Muthukrishnan authored
Vouchers table contain all paid vouchers, so to find if a given voucher is unpaid, all we need to do is check membership in the `vouchers' table.
-
Ramakrishnan Muthukrishnan authored
-
Ramakrishnan Muthukrishnan authored
-
Ramakrishnan Muthukrishnan authored
-
- Oct 23, 2019
-
-
Ramakrishnan Muthukrishnan authored
-
Ramakrishnan Muthukrishnan authored
-
Ramakrishnan Muthukrishnan authored
-
Ramakrishnan Muthukrishnan authored
Type class instances for `redeemVoucher` function has a lot of code duplication. This change refactors them to reuse the main logic of the code and abstract out parts that differ between instances.
-
Ramakrishnan Muthukrishnan authored
A few cosmetic changes.
-
- Oct 21, 2019
-
-
Ramakrishnan Muthukrishnan authored
-
- Oct 20, 2019
-
-
Ramakrishnan Muthukrishnan authored
Rename the `Memory' constructor that constructs MemoryVoucherDatabase into `MemoryDB' to avoid conflict.
-
Ramakrishnan Muthukrishnan authored
Also expose all functions for now, for testing via "stack ghci".
-
- Oct 18, 2019
-
-
Ramakrishnan Muthukrishnan authored
-