Page MenuHomePhabricator

Kind of generate a bill for users
ClosedPublic

Authored by epriestley on Jan 30 2015, 7:33 PM.
Tags
None
Referenced Files
F15506683: D11580.diff
Tue, Apr 15, 1:19 PM
F15437597: D11580.id.diff
Tue, Mar 25, 8:37 PM
F15437596: D11580.id27872.diff
Tue, Mar 25, 8:37 PM
F15437451: D11580.id27869.diff
Tue, Mar 25, 7:29 PM
F15437415: D11580.diff
Tue, Mar 25, 7:17 PM
F15429201: D11580.id27872.diff
Mon, Mar 24, 1:07 AM
F15418123: D11580.id.diff
Thu, Mar 20, 9:00 PM
F15415573: D11580.id27869.diff
Thu, Mar 20, 6:44 AM
Subscribers
Tokens
"Piece of Eight" token, awarded by chad.

Details

Summary

Ref T6881. This generates a product, purchase and invoice for users, and there's sort of some UI for them. Stuff it doesn't do yet:

  • Try to autobill when we have a CC;
  • actually tell the user they should pay it;
  • ask the application for anything like "how much should we charge", or tell the application anything like "the user paid".

However, these work:

  • You can technically pay the invoices.
  • You can see the invoices you paid in the past.
Test Plan

Used bin/phriction invoice to double-bill myself over and over again. Paid one of the invoices.

Event Timeline

epriestley retitled this revision from to Kind of generate a bill for users.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: btrahan.

One architecture note here: we don't technically need the subscriptionPHID on the cart, since we could find carts which contain a Purchase of the Product which is uniquely associated with the Subscription.

However, it's way cleaner/easier to just let Carts know about Subscriptions, and Subscriptions are a "native" object to Phortune, and some other UI is going to need to know about them anyway, so I don't think there's any real downside to this.

In general, Subscriptions are just normal purchases which are made for you every month, except that you provide a SubscriptionImplementation instead of a ProductImplementation + CartImplementaiton, and Phortune automatically builds a reasonable Product + Cart for you since they aren't very interesting in this case.

btrahan edited edge metadata.

I like the comments in PhortuneSubscriptionWorker... :D

This revision is now accepted and ready to land.Jan 30 2015, 7:50 PM
This revision was automatically updated to reflect the committed changes.