From 2fcf571bfd8dd367cb44dcca4cee08ccefc2ea89 Mon Sep 17 00:00:00 2001 From: epriestley Date: Fri, 8 Jan 2016 09:18:53 -0800 Subject: [PATCH] Use more reassuring UI and copy for removing payment methods Summary: The old treatment was fairly technical. Give this UI a more human-friendly flow: - Use language "remove" instead of "disable". We keep the record that the card existed around for auditing/historical purposes, but it is no longer a valid payment method going forward and can not be undone. I think this aligns with user expectation and actual behavior better than "disable". - Only show active methods on the profile screen. Test Plan: {F1057153} Reviewers: chad Reviewed By: chad Differential Revision: https://secure.phabricator.com/D14973 --- .../controller/PhortuneAccountViewController.php | 4 ++++ .../PhortunePaymentMethodDisableController.php | 9 ++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/applications/phortune/controller/PhortuneAccountViewController.php b/src/applications/phortune/controller/PhortuneAccountViewController.php index f4791d8bb6..b5387b935e 100644 --- a/src/applications/phortune/controller/PhortuneAccountViewController.php +++ b/src/applications/phortune/controller/PhortuneAccountViewController.php @@ -132,6 +132,10 @@ final class PhortuneAccountViewController extends PhortuneController { $methods = id(new PhortunePaymentMethodQuery()) ->setViewer($viewer) ->withAccountPHIDs(array($account->getPHID())) + ->withStatuses( + array( + PhortunePaymentMethod::STATUS_ACTIVE, + )) ->execute(); foreach ($methods as $method) { diff --git a/src/applications/phortune/controller/PhortunePaymentMethodDisableController.php b/src/applications/phortune/controller/PhortunePaymentMethodDisableController.php index 659ae2f53e..d00db2725f 100644 --- a/src/applications/phortune/controller/PhortunePaymentMethodDisableController.php +++ b/src/applications/phortune/controller/PhortunePaymentMethodDisableController.php @@ -38,11 +38,10 @@ final class PhortunePaymentMethodDisableController } return $this->newDialog() - ->setTitle(pht('Disable Payment Method?')) - ->setShortTitle(pht('Disable Payment Method')) + ->setTitle(pht('Remove Payment Method')) ->appendParagraph( pht( - 'Disable the payment method "%s"?', + 'Remove the payment method "%s" from your account?', phutil_tag( 'strong', array(), @@ -50,9 +49,9 @@ final class PhortunePaymentMethodDisableController ->appendParagraph( pht( 'You will no longer be able to make payments using this payment '. - 'method. Disabled payment methods can not be reactivated.')) + 'method.')) ->addCancelButton($account_uri) - ->addSubmitButton(pht('Disable Payment Method')); + ->addSubmitButton(pht('Remove Payment Method')); } }