Page MenuHomePhabricator

Kind of generate a bill for users
ClosedPublic

Authored by epriestley on Jan 30 2015, 7:33 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Nov 20, 3:42 AM
Unknown Object (File)
Mon, Nov 18, 3:15 AM
Unknown Object (File)
Fri, Nov 15, 3:47 PM
Unknown Object (File)
Oct 18 2024, 11:43 AM
Unknown Object (File)
Oct 18 2024, 11:32 AM
Unknown Object (File)
Oct 17 2024, 8:24 AM
Unknown Object (File)
Oct 12 2024, 10:34 AM
Unknown Object (File)
Oct 6 2024, 8:00 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.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.