@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add an after-purchase hook to subscriptions in Phortune

Summary:
Ref T12681. We need this to update the "paid until" window on support pacts.

(Instance billing doesn't use this because everything just checks if you have unpaid invoices, nothing actually happens when you pay them.)

Test Plan: See D18187.

Reviewers: chad, amckinley

Reviewed By: chad

Maniphest Tasks: T12681

Differential Revision: https://secure.phabricator.com/D18188

+20 -2
+3 -2
src/applications/phortune/product/PhortuneSubscriptionProduct.php
··· 50 50 public function didPurchaseProduct( 51 51 PhortuneProduct $product, 52 52 PhortunePurchase $purchase) { 53 - // TODO: Callback the subscription. 54 - return; 53 + return $this->getSubscription()->didPurchaseProduct( 54 + $product, 55 + $purchase); 55 56 } 56 57 57 58 public function didRefundProduct(
+9
src/applications/phortune/storage/PhortuneSubscription.php
··· 232 232 $purchase); 233 233 } 234 234 235 + public function didPurchaseProduct( 236 + PhortuneProduct $product, 237 + PhortunePurchase $purchase) { 238 + return $this->getImplementation()->didPurchaseProduct( 239 + $this, 240 + $product, 241 + $purchase); 242 + } 243 + 235 244 236 245 /* -( PhabricatorPolicyInterface )----------------------------------------- */ 237 246
+8
src/applications/phortune/subscription/PhortuneSubscriptionImplementation.php
··· 48 48 PhortunePurchase $purchase) { 49 49 return null; 50 50 } 51 + 52 + public function didPurchaseProduct( 53 + PhortuneSubscription $subscription, 54 + PhortuneProduct $product, 55 + PhortunePurchase $purchase) { 56 + return null; 57 + } 58 + 51 59 }