Page MenuHomePhabricator

Kind of generate a bill for users
ClosedPublic

Authored by epriestley on Jan 30 2015, 7:33 PM.
Tags
None
Referenced Files
F15415573: D11580.id27869.diff
Thu, Mar 20, 6:44 AM
F15412489: D11580.diff
Wed, Mar 19, 1:14 PM
F15399761: D11580.id27869.diff
Mon, Mar 17, 7:28 AM
Unknown Object (File)
Mon, Feb 24, 5:36 AM
Unknown Object (File)
Sun, Feb 23, 11:01 AM
Unknown Object (File)
Feb 14 2025, 2:30 AM
Unknown Object (File)
Feb 8 2025, 2:09 AM
Unknown Object (File)
Feb 8 2025, 2:09 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.