Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14099174
D20613.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D20613.diff
View Options
diff --git a/src/applications/phortune/worker/PhortuneSubscriptionWorker.php b/src/applications/phortune/worker/PhortuneSubscriptionWorker.php
--- a/src/applications/phortune/worker/PhortuneSubscriptionWorker.php
+++ b/src/applications/phortune/worker/PhortuneSubscriptionWorker.php
@@ -48,12 +48,15 @@
->withPHIDs($account->getMemberPHIDs())
->execute();
$actor = null;
+
+ $any_disabled = false;
foreach ($members as $member) {
// Don't act as a disabled user. If all of the users on the account are
// disabled this means we won't charge the subscription, but that's
// probably correct since it means no one can cancel or pay it anyway.
if ($member->getIsDisabled()) {
+ $any_disabled = true;
continue;
}
@@ -63,7 +66,26 @@
}
if (!$actor) {
- throw new Exception(pht('Failed to load actor to bill subscription!'));
+ if ($any_disabled) {
+ $message = pht(
+ 'All members of the account ("%s") for this subscription ("%s") '.
+ 'are disabled.',
+ $account->getPHID(),
+ $subscription->getPHID());
+ } else if ($account->getMemberPHIDs()) {
+ $message = pht(
+ 'Unable to load any of the members of the account ("%s") for this '.
+ 'subscription ("%s").',
+ $account->getPHID(),
+ $subscription->getPHID());
+ } else {
+ $message = pht(
+ 'The account ("%s") for this subscription ("%s") has no '.
+ 'members.',
+ $account->getPHID(),
+ $subscription->getPHID());
+ }
+ throw new PhabricatorWorkerPermanentFailureException($message);
}
$cart = $account->newCart($actor, $cart_implementation, $merchant);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Nov 27, 11:00 AM (13 h, 32 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6793749
Default Alt Text
D20613.diff (1 KB)
Attached To
Mode
D20613: Consider "all account members are disabled" to be a permanent failure when billing a Phortune subscription
Attached
Detach File
Event Timeline
Log In to Comment