Page MenuHomePhabricator

Kind of generate a bill for users
ClosedPublic

Authored by epriestley on Jan 30 2015, 7:33 PM.
Tags
None
Referenced Files
F13211684: D11580.diff
Fri, May 17, 5:59 AM
F13206373: D11580.id.diff
Wed, May 15, 8:13 AM
F13198944: D11580.diff
Mon, May 13, 10:32 AM
F13178139: D11580.diff
Wed, May 8, 8:13 PM
Unknown Object (File)
Thu, Apr 25, 1:32 AM
Unknown Object (File)
Mon, Apr 22, 7:21 PM
Unknown Object (File)
Fri, Apr 19, 4:42 PM
Unknown Object (File)
Fri, Apr 19, 8:43 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.