Index: branches/fundraising/extensions/DonationInterface/gateway_common/gateway.adapter.php |
— | — | @@ -82,6 +82,16 @@ |
83 | 83 | protected $accountInfo; |
84 | 84 | protected $url; |
85 | 85 | protected $transactions; |
| 86 | + |
| 87 | + /** |
| 88 | + * $transaction_type will be set in the GatewayForm::execute() |
| 89 | + * |
| 90 | + * @var string|false |
| 91 | + * |
| 92 | + * @see GatewayForm::execute() |
| 93 | + */ |
| 94 | + protected $transaction_type = false; |
| 95 | + |
86 | 96 | protected $return_value_map; |
87 | 97 | protected $postdata; |
88 | 98 | protected $postdatadefaults; |
— | — | @@ -94,7 +104,7 @@ |
95 | 105 | const COMMUNICATION_TYPE = 'xml'; //this needs to be either 'xml' or 'namevalue' |
96 | 106 | const GLOBAL_PREFIX = 'wgDonationGateway'; //...for example. |
97 | 107 | |
98 | | - function __construct() { |
| 108 | + public function __construct() { |
99 | 109 | global $wgDonationInterfaceTest; //this is so the forms can see it. |
100 | 110 | //TODO: Alter the forms so they don't need the global? |
101 | 111 | if ( !self::getGlobal( 'Test' ) ) { |
— | — | @@ -786,4 +796,25 @@ |
787 | 797 | return $ret; |
788 | 798 | } |
789 | 799 | |
| 800 | + /** |
| 801 | + * Get the transaction type |
| 802 | + * |
| 803 | + * @return string|false |
| 804 | + */ |
| 805 | + public function getTransactionType() { |
| 806 | + |
| 807 | + return $this->transaction_type; |
| 808 | + } |
| 809 | + |
| 810 | + /** |
| 811 | + * Set the transaction type |
| 812 | + * |
| 813 | + * @param string|false $transaction_type |
| 814 | + */ |
| 815 | + public function setTransactionType( $transaction_type ) { |
| 816 | + |
| 817 | + $transaction_type = empty( $transaction_type ) ? false : $transaction_type; |
| 818 | + |
| 819 | + $this->transaction_type = $transaction_type; |
| 820 | + } |
790 | 821 | } |