Page MenuHomePhabricator

D17334.diff
No OneTemporary

D17334.diff

diff --git a/src/applications/phortune/controller/PhortuneSubscriptionViewController.php b/src/applications/phortune/controller/PhortuneSubscriptionViewController.php
--- a/src/applications/phortune/controller/PhortuneSubscriptionViewController.php
+++ b/src/applications/phortune/controller/PhortuneSubscriptionViewController.php
@@ -68,8 +68,23 @@
$default_method = $subscription->getDefaultPaymentMethodPHID();
if ($default_method) {
- $handles = $this->loadViewerHandles(array($default_method));
- $autopay_method = $handles[$default_method]->renderLink();
+ $method = id(new PhortunePaymentMethodQuery())
+ ->setViewer($viewer)
+ ->withPHIDs(array($default_method))
+ ->withStatuses(
+ array(
+ PhortunePaymentMethod::STATUS_ACTIVE,
+ ))
+ ->executeOne();
+ if ($method) {
+ $handles = $this->loadViewerHandles(array($default_method));
+ $autopay_method = $handles[$default_method]->renderLink();
+ } else {
+ $autopay_method = phutil_tag(
+ 'em',
+ array(),
+ pht('<Deleted Payment Method>'));
+ }
} else {
$autopay_method = phutil_tag(
'em',

File Metadata

Mime Type
text/plain
Expires
Sun, Mar 30, 10:35 AM (3 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7716971
Default Alt Text
D17334.diff (1 KB)

Event Timeline