3 final class PhortuneSubscriptionAutopayTransaction
4 extends PhortuneSubscriptionTransactionType
{
6 const TRANSACTIONTYPE
= 'autopay';
8 public function generateOldValue($object) {
9 return $object->getDefaultPaymentMethodPHID();
12 public function applyInternalEffects($object, $value) {
13 $object->setDefaultPaymentMethodPHID($value);
16 public function getTitle() {
17 $old_phid = $this->getOldValue();
18 $new_phid = $this->getNewValue();
20 if ($old_phid && $new_phid) {
22 '%s changed the automatic payment method for this subscription.',
23 $this->renderAuthor());
24 } else if ($new_phid) {
26 '%s configured an automatic payment method for this subscription.',
27 $this->renderAuthor());
30 '%s stopped automatic payments for this subscription.',
31 $this->renderAuthor());
35 public function shouldTryMFA(
37 PhabricatorApplicationTransaction
$xaction) {