evazion
74ed2a8b96
user upgrades: add UserUpgrade model.
...
Add a model to store the status of user upgrades.
* Store the upgrade purchaser and the upgrade receiver (these are
different for a gifted upgrade, the same for a self upgrade).
* Store the upgrade type: gold, platinum, or gold-to-platinum upgrades.
* Store the upgrade status:
** pending: User is still on the Stripe checkout page, no payment
received yet.
** processing: User has completed checkout, but the checkout status in
Stripe is still 'unpaid'.
** complete: We've received notification from Stripe that the payment
has gone through and the user has been upgraded.
* Store the Stripe checkout ID, to cross-reference the upgrade record on
Danbooru with the checkout record on Stripe.
This is the upgrade flow:
* When the user clicks the upgrade button on the upgrade page, we call
POST /user_upgrades and create a pending UserUpgrade.
* We redirect the user to the checkout page on Stripe.
* When the user completes checkout on Stripe, Stripe sends us a webhook
notification at POST /webhooks/receive.
* When we receive the webhook, we check the payment status, and if it's
paid we mark the UserUpgrade as complete and upgrade the user.
* After Stripe sees that we have successfully processed the webhook,
they redirect the user to the /user_upgrades/:id page, where we show
the user their upgrade receipt.
2020-12-24 21:15:04 -06:00
..
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2019-12-22 21:23:37 -06:00
2018-04-26 15:31:06 -07:00
2019-12-22 21:23:37 -06:00
2019-12-22 21:23:37 -06:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2020-03-18 03:32:40 -05:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2019-12-22 21:23:37 -06:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2019-12-22 21:23:37 -06:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2019-12-22 21:23:37 -06:00
2019-12-22 21:23:37 -06:00
2019-12-22 21:23:37 -06:00
2018-04-26 15:31:06 -07:00
2019-12-22 21:23:37 -06:00
2019-12-22 21:23:37 -06:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2019-12-22 21:23:37 -06:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2019-12-22 21:23:37 -06:00
2019-12-22 21:23:37 -06:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2019-12-22 21:23:37 -06:00
2019-12-22 21:23:37 -06:00
2019-12-22 21:23:37 -06:00
2018-04-26 15:31:06 -07:00
2019-12-22 21:23:37 -06:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2019-12-22 21:23:37 -06:00
2019-12-22 21:23:37 -06:00
2019-12-22 21:23:37 -06:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2018-04-26 15:31:06 -07:00
2019-12-22 21:23:37 -06:00
2018-04-06 18:09:57 -07:00
2019-12-22 21:23:37 -06:00
2018-04-06 18:09:57 -07:00
2018-04-06 18:09:57 -07:00
2018-04-06 18:09:57 -07:00
2018-04-06 18:09:57 -07:00
2018-04-26 15:31:06 -07:00
2018-04-06 18:09:57 -07:00
2018-04-26 15:31:06 -07:00
2018-04-25 14:31:11 -07:00
2018-05-16 16:04:05 -07:00
2018-06-14 17:52:41 -07:00
2018-06-14 17:52:41 -07:00
2018-08-04 16:32:15 -07:00
2018-08-24 12:10:51 -07:00
2018-09-12 15:19:27 -07:00
2018-09-13 11:44:11 -07:00
2019-12-22 21:23:37 -06:00
2018-11-08 15:09:31 -06:00
2018-11-08 14:24:45 -08:00
2018-11-13 19:18:11 -06:00
2018-12-10 17:51:57 -08:00
2018-12-10 17:51:57 -08:00
2018-11-28 13:55:02 -08:00
2018-11-29 16:51:46 -08:00
2018-12-02 11:45:57 -06:00
2019-01-09 16:20:34 -06:00
2019-01-28 17:23:33 -08:00
2019-07-12 10:48:48 -07:00
2019-08-27 18:13:30 -05:00
2019-08-27 18:13:30 -05:00
2019-08-27 18:45:40 -05:00
2019-08-27 18:48:48 -05:00
2019-08-27 19:58:05 -05:00
2019-08-29 00:52:23 -05:00
2019-08-29 02:06:35 -05:00
2019-09-02 18:53:27 -05:00
2019-09-07 22:21:55 -05:00
2019-09-07 23:06:20 -05:00
2019-09-19 13:20:06 -05:00
2019-09-23 02:22:54 -05:00
2019-09-25 21:43:01 -05:00
2019-10-23 21:36:48 -05:00
2019-10-24 19:48:30 -05:00
2019-11-11 21:03:07 -06:00
2019-11-11 21:03:07 -06:00
2019-11-15 22:44:13 -06:00
2019-11-15 22:44:22 -06:00
2019-11-16 19:34:30 -06:00
2019-11-17 01:52:36 -06:00
2019-11-17 02:10:24 -06:00
2019-11-17 02:45:28 -06:00
2019-11-17 14:39:41 -06:00
2019-11-19 00:13:24 -06:00
2019-12-23 00:02:54 -06:00
2020-01-16 21:40:14 +00:00
2020-01-17 00:19:20 -06:00
2020-01-18 06:40:20 +00:00
2020-01-17 22:24:29 -06:00
2020-01-21 00:10:20 -06:00
2020-01-21 00:10:21 -06:00
2020-01-27 00:47:35 -06:00
2020-02-16 23:09:00 -06:00
2020-02-22 22:37:36 -06:00
2020-02-23 17:52:38 -06:00
2020-03-06 14:50:21 -06:00
2020-03-06 23:23:38 -06:00
2020-03-08 23:18:15 -05:00
2020-03-12 21:18:53 -05:00
2020-03-20 16:08:20 -05:00
2020-03-25 18:48:21 -05:00
2020-03-25 18:48:42 -05:00
2020-04-03 23:44:02 -05:00
2020-04-06 14:13:22 -05:00
2020-04-27 19:11:47 -05:00
2020-08-06 20:55:45 -05:00
2020-08-16 14:31:47 -05:00
2020-12-01 18:58:45 -06:00
2020-12-13 04:10:48 -06:00
2020-12-19 14:26:07 -06:00
2020-12-24 21:15:04 -06:00