Commit | Line | Data |
---|---|---|
f9af96d6 PJ |
1 | <?php |
2 | /* | |
3 | +--------------------------------------------------------------------+ | |
bc77d7c0 | 4 | | Copyright CiviCRM LLC. All rights reserved. | |
f9af96d6 | 5 | | | |
bc77d7c0 TO |
6 | | This work is published under the GNU AGPLv3 license with some | |
7 | | permitted exceptions and without any warranty. For full license | | |
8 | | and copyright information, see https://civicrm.org/licensing | | |
f9af96d6 | 9 | +--------------------------------------------------------------------+ |
d25dd0ee | 10 | */ |
f9af96d6 PJ |
11 | |
12 | /** | |
13 | * | |
14 | * @package CRM | |
ca5cec67 | 15 | * @copyright CiviCRM LLC https://civicrm.org/licensing |
f9af96d6 PJ |
16 | */ |
17 | class CRM_Contribute_Page_PaymentInfo extends CRM_Core_Page { | |
1330f57a | 18 | |
00be9182 | 19 | public function preProcess() { |
f9af96d6 PJ |
20 | $this->_component = CRM_Utils_Request::retrieve('component', 'String', $this, TRUE); |
21 | $this->_action = CRM_Utils_Request::retrieve('action', 'String', $this, FALSE, 'browse'); | |
22 | $this->_id = CRM_Utils_Request::retrieve('id', 'Positive', $this, TRUE); | |
edc80cda | 23 | $this->_context = CRM_Utils_Request::retrieve('context', 'Alphanumeric', $this, TRUE); |
874c9be7 | 24 | $this->_cid = CRM_Utils_Request::retrieve('cid', 'String', $this, TRUE); |
f9af96d6 PJ |
25 | |
26 | $this->assign('cid', $this->_cid); | |
27 | $this->assign('id', $this->_id); | |
28 | $this->assign('context', $this->_context); | |
29 | $this->assign('component', $this->_component); | |
685dc433 PN |
30 | if ($this->_component != 'event') { |
31 | $this->assign('hideButtonLinks', TRUE); | |
32 | } | |
f9af96d6 PJ |
33 | } |
34 | ||
00be9182 | 35 | public function browse() { |
f9af96d6 | 36 | $getTrxnInfo = $this->_context == 'transaction' ? TRUE : FALSE; |
1010c4e1 | 37 | $paymentInfo = CRM_Contribute_BAO_Contribution::getPaymentInfo($this->_id, $this->_component, $getTrxnInfo, TRUE); |
f9af96d6 PJ |
38 | if ($this->_context == 'payment_info') { |
39 | $this->assign('paymentInfo', $paymentInfo); | |
40 | } | |
f9af96d6 PJ |
41 | } |
42 | ||
186c9c17 | 43 | /** |
e17598a8 | 44 | * Run page. |
45 | * | |
46 | * This typically involves assigning the appropriate | |
186c9c17 EM |
47 | * smarty variable :) |
48 | * | |
a6c01b45 CW |
49 | * @return string |
50 | * The content generated by running this page | |
186c9c17 | 51 | */ |
00be9182 | 52 | public function run() { |
f9af96d6 PJ |
53 | $this->preProcess(); |
54 | if ($this->_action) { | |
55 | $this->browse(); | |
56 | } | |
57 | ||
58 | return parent::run(); | |
59 | } | |
96025800 | 60 | |
186c9c17 | 61 | } |