Correct a parameter order swap in "diffusion.historyquery" for Mercurial
[phabricator.git] / src / applications / phortune / storage / PhortuneCartTransaction.php
blobc7a1e36e731be5599a9b335fc93d1c2780c41a3a
1 <?php
3 final class PhortuneCartTransaction
4 extends PhabricatorApplicationTransaction {
6 const TYPE_CREATED = 'cart:created';
7 const TYPE_HOLD = 'cart:hold';
8 const TYPE_REVIEW = 'cart:review';
9 const TYPE_CANCEL = 'cart:cancel';
10 const TYPE_REFUND = 'cart:refund';
11 const TYPE_PURCHASED = 'cart:purchased';
12 const TYPE_INVOICED = 'cart:invoiced';
14 public function getApplicationName() {
15 return 'phortune';
18 public function getApplicationTransactionType() {
19 return PhortuneCartPHIDType::TYPECONST;
22 public function shouldHideForMail(array $xactions) {
23 switch ($this->getTransactionType()) {
24 case self::TYPE_CREATED:
25 return true;
28 return parent::shouldHideForMail($xactions);
31 public function getTitle() {
32 $old = $this->getOldValue();
33 $new = $this->getNewValue();
35 switch ($this->getTransactionType()) {
36 case self::TYPE_CREATED:
37 return pht('This order was created.');
38 case self::TYPE_HOLD:
39 return pht('This order was put on hold until payment clears.');
40 case self::TYPE_REVIEW:
41 return pht(
42 'This order was flagged for manual processing by the merchant.');
43 case self::TYPE_CANCEL:
44 return pht('This order was cancelled.');
45 case self::TYPE_REFUND:
46 return pht('This order was refunded.');
47 case self::TYPE_PURCHASED:
48 return pht('Payment for this order was completed.');
49 case self::TYPE_INVOICED:
50 return pht('This order was invoiced.');
53 return parent::getTitle();
56 public function getTitleForMail() {
57 switch ($this->getTransactionType()) {
58 case self::TYPE_INVOICED:
59 return pht('You have a new invoice due.');
62 return parent::getTitleForMail();
65 public function getActionName() {
66 switch ($this->getTransactionType()) {
67 case self::TYPE_CREATED:
68 return pht('Created');
69 case self::TYPE_HOLD:
70 return pht('Hold');
71 case self::TYPE_REVIEW:
72 return pht('Review');
73 case self::TYPE_CANCEL:
74 return pht('Cancelled');
75 case self::TYPE_REFUND:
76 return pht('Refunded');
77 case self::TYPE_PURCHASED:
78 return pht('Complete');
79 case self::TYPE_INVOICED:
80 return pht('New Invoice');
83 return parent::getActionName();