1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-20 12:30:56 +01:00
phorge-phorge/src/applications/phortune/controller
epriestley 07d640d2b6 Show invoices on account information page
Summary:
Ref T6881. This is basically just some UX.

Right now, if we invoice you, you can //technically// pay it but since we don't tell you about it and don't show it in the UI you'd have to guess the ID by manipulating the URI. We should probably be at least a little more aggressive about billing.

In the common case when we generate a cart/order, we don't show it to the user or merchant in Phortune until the user takes a payment action (basically, Phortune doesn't recognize the cart until you actually check out with it). In the current use case in Fund (and other reasonable use cases) an un-acted-upon cart hasn't been ordered yet, and is just a place for the application to store state as it hands off the workflow to Phortune.

Even if we had a real "Shop for physical goods" app, I think the same rule would apply -- the application itself would probably track and show your current cart, but it wouldn't make sense to put it into your order history in Phortune until you actually buy it.

Since invoices from subscriptions are essentially identical to not-yet-ordered-carts, that mean they also did not show up in the UI (although I think this is also desirable).

This change carves out a place for them:

  - Add an "invoices" section with unpaid invoices.
  - The UI shows that you have unpaid invoices.
  - Invoices have a slightly different rendering, inclduing an alluring "Pay Now" button.

Some considerations:

  - One thing I'm vaguely thinking about is the possibilty that users may be able to invoice one another directly, eventually. For example, we might invoice a contracting client.
  - Considering this, I thought about making these carts have a special status like `STATUS_DUE`, which replaces `STATUS_READY`, or a flag like `isInvoice`.
  - However, this approach was pretty involved and made the //billing// logic more complicated, so I backed off. The ultimate approach here puts more of the complexity into the display logic, which feels better to me.
  - We might need an `isInvoice` flag eventually, but `subscriptionPHID` is a reasonable stand-in for now.
  - The OrderTable serving double duty for rendering subscriptions feels a little muddy, but I think splitting it into two highly-redundant classes would be worse.

Test Plan:
{F279348}

{F279349}

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T6881

Differential Revision: https://secure.phabricator.com/D11593
2015-02-01 06:08:34 -08:00
..
PhortuneAccountEditController.php Make Phortune account members editable and modernize the edge constant 2014-10-10 15:00:06 -07:00
PhortuneAccountListController.php Show only recent orders and charges on Phortune account profile page 2014-10-13 11:14:50 -07:00
PhortuneAccountViewController.php Show invoices on account information page 2015-02-01 06:08:34 -08:00
PhortuneCartAcceptController.php Add a "Review" status to Phortune 2014-10-10 11:29:13 -07:00
PhortuneCartCancelController.php Make Fund transactions more informative and complete 2014-10-10 11:29:31 -07:00
PhortuneCartCheckoutController.php Add a "Review" status to Phortune 2014-10-10 11:29:13 -07:00
PhortuneCartController.php Mostly implement order refunds and cancellations 2014-10-08 15:33:25 -07:00
PhortuneCartListController.php Kind of generate a bill for users 2015-01-30 11:52:50 -08:00
PhortuneCartUpdateController.php Implement Phortune charge updates 2014-10-09 16:57:52 -07:00
PhortuneCartViewController.php Move ActionList mobile links to better location 2015-01-12 07:24:35 -08:00
PhortuneChargeListController.php Fix method visibility for PhabricatorController subclasses 2015-01-07 07:34:59 +11:00
PhortuneController.php Build a very basic subscription detail page in Phortune 2015-01-30 11:28:49 -08:00
PhortuneLandingController.php Transactions - deploy buildTransactionTimeline to remaining applications 2014-12-03 15:35:47 -08:00
PhortuneMerchantController.php Fix method visibility for PhabricatorController subclasses 2015-01-07 07:34:59 +11:00
PhortuneMerchantEditController.php Don't show meme Remarkup hint button if Macro application is not usable 2014-11-24 15:25:25 -08:00
PhortuneMerchantListController.php Fix method visibility for PhabricatorController subclasses 2015-01-07 07:34:59 +11:00
PhortuneMerchantViewController.php Build a very basic subscription detail page in Phortune 2015-01-30 11:28:49 -08:00
PhortunePaymentMethodCreateController.php Use real icons for payment providers 2014-10-07 15:07:01 -07:00
PhortunePaymentMethodDisableController.php Make payment method management somewhat more reasonable in Phortune 2014-08-11 12:07:35 -07:00
PhortunePaymentMethodEditController.php Make payment method management somewhat more reasonable in Phortune 2014-08-11 12:07:35 -07:00
PhortuneProductListController.php Make Currency a more formal type 2014-10-06 10:26:48 -07:00
PhortuneProductViewController.php Move ActionList mobile links to better location 2015-01-12 07:24:35 -08:00
PhortuneProviderActionController.php Add a HOLD state to Phortune and handle unusual states better 2014-10-09 04:30:47 -07:00
PhortuneProviderDisableController.php Allow merchants to disable payment providers and show more UI info 2014-10-08 08:31:24 -07:00
PhortuneProviderEditController.php Make payment providers a configurable property of Merchants in Phortune 2014-10-07 14:41:41 -07:00
PhortuneSubscriptionListController.php Build a very basic subscription detail page in Phortune 2015-01-30 11:28:49 -08:00
PhortuneSubscriptionViewController.php Kind of generate a bill for users 2015-01-30 11:52:50 -08:00