@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
3 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) |
|
4 | 4 | exit('NO direct script access allowed'); |
5 | 5 | |
6 | 6 | /** |
@@ -30,11 +30,11 @@ discard block |
||
30 | 30 | class EE_Messages_Email_Pending_Approval_Validator extends EE_Messages_Validator { |
31 | 31 | |
32 | 32 | |
33 | - public function __construct( $fields, $context ) { |
|
33 | + public function __construct($fields, $context) { |
|
34 | 34 | $this->_m_name = 'email'; |
35 | 35 | $this->_mt_name = 'pending_approval'; |
36 | 36 | |
37 | - parent::__construct( $fields, $context ); |
|
37 | + parent::__construct($fields, $context); |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | /** |
@@ -47,9 +47,9 @@ discard block |
||
47 | 47 | 'shortcodes' => array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list'), |
48 | 48 | 'required' => array('[EVENT_LIST]') |
49 | 49 | ); |
50 | - $this->_MSGR->set_validator_config( $new_config ); |
|
50 | + $this->_MSGR->set_validator_config($new_config); |
|
51 | 51 | |
52 | - if ( $this->_context != 'admin' ) |
|
52 | + if ($this->_context != 'admin') |
|
53 | 53 | $this->_valid_shortcodes_modifier[$this->_context]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list'); |
54 | 54 | |
55 | 55 | $this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]'); |
@@ -1,7 +1,8 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
3 | +if (!defined('EVENT_ESPRESSO_VERSION') ) { |
|
4 | 4 | exit('NO direct script access allowed'); |
5 | +} |
|
5 | 6 | |
6 | 7 | /** |
7 | 8 | * Event Espresso |
@@ -48,8 +49,9 @@ discard block |
||
48 | 49 | ); |
49 | 50 | $this->_MSGR->set_validator_config( $new_config ); |
50 | 51 | |
51 | - if ( $this->_context != 'admin' ) |
|
52 | - $this->_valid_shortcodes_modifier[$this->_context]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list'); |
|
52 | + if ( $this->_context != 'admin' ) { |
|
53 | + $this->_valid_shortcodes_modifier[$this->_context]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list'); |
|
54 | + } |
|
53 | 55 | |
54 | 56 | $this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]'); |
55 | 57 | } |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
3 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) |
|
4 | 4 | exit('NO direct script access allowed'); |
5 | 5 | |
6 | 6 | /** |
@@ -18,11 +18,11 @@ discard block |
||
18 | 18 | class EE_Messages_Email_Registration_Summary_Validator extends EE_Messages_Validator { |
19 | 19 | |
20 | 20 | |
21 | - public function __construct( $fields, $context ) { |
|
21 | + public function __construct($fields, $context) { |
|
22 | 22 | $this->_m_name = 'email'; |
23 | 23 | $this->_mt_name = 'registration_summary'; |
24 | 24 | |
25 | - parent::__construct( $fields, $context ); |
|
25 | + parent::__construct($fields, $context); |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | /** |
@@ -35,9 +35,9 @@ discard block |
||
35 | 35 | 'shortcodes' => array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list'), |
36 | 36 | 'required' => array('[EVENT_LIST]') |
37 | 37 | ); |
38 | - $this->_MSGR->set_validator_config( $new_config ); |
|
38 | + $this->_MSGR->set_validator_config($new_config); |
|
39 | 39 | |
40 | - if ( $this->_context != 'admin' ) |
|
40 | + if ($this->_context != 'admin') |
|
41 | 41 | $this->_valid_shortcodes_modifier[$this->_context]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list'); |
42 | 42 | |
43 | 43 | $this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]'); |
@@ -1,7 +1,8 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
3 | +if (!defined('EVENT_ESPRESSO_VERSION') ) { |
|
4 | 4 | exit('NO direct script access allowed'); |
5 | +} |
|
5 | 6 | |
6 | 7 | /** |
7 | 8 | * |
@@ -37,8 +38,9 @@ discard block |
||
37 | 38 | ); |
38 | 39 | $this->_MSGR->set_validator_config( $new_config ); |
39 | 40 | |
40 | - if ( $this->_context != 'admin' ) |
|
41 | - $this->_valid_shortcodes_modifier[$this->_context]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list'); |
|
41 | + if ( $this->_context != 'admin' ) { |
|
42 | + $this->_valid_shortcodes_modifier[$this->_context]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list'); |
|
43 | + } |
|
42 | 44 | |
43 | 45 | $this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]'); |
44 | 46 | } |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
3 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) |
|
4 | 4 | exit('NO direct script access allowed'); |
5 | 5 | |
6 | 6 | /** |
@@ -30,11 +30,11 @@ discard block |
||
30 | 30 | class EE_Messages_Email_Registration_Validator extends EE_Messages_Validator { |
31 | 31 | |
32 | 32 | |
33 | - public function __construct( $fields, $context ) { |
|
33 | + public function __construct($fields, $context) { |
|
34 | 34 | $this->_m_name = 'email'; |
35 | 35 | $this->_mt_name = 'registration'; |
36 | 36 | |
37 | - parent::__construct( $fields, $context ); |
|
37 | + parent::__construct($fields, $context); |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | /** |
@@ -47,9 +47,9 @@ discard block |
||
47 | 47 | 'shortcodes' => array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list'), |
48 | 48 | 'required' => array('[EVENT_LIST]') |
49 | 49 | ); |
50 | - $this->_MSGR->set_validator_config( $new_config ); |
|
50 | + $this->_MSGR->set_validator_config($new_config); |
|
51 | 51 | |
52 | - if ( $this->_context != 'admin' ) |
|
52 | + if ($this->_context != 'admin') |
|
53 | 53 | $this->_valid_shortcodes_modifier[$this->_context]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list'); |
54 | 54 | |
55 | 55 | $this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]'); |
@@ -1,7 +1,8 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
3 | +if (!defined('EVENT_ESPRESSO_VERSION') ) { |
|
4 | 4 | exit('NO direct script access allowed'); |
5 | +} |
|
5 | 6 | |
6 | 7 | /** |
7 | 8 | * Event Espresso |
@@ -48,8 +49,9 @@ discard block |
||
48 | 49 | ); |
49 | 50 | $this->_MSGR->set_validator_config( $new_config ); |
50 | 51 | |
51 | - if ( $this->_context != 'admin' ) |
|
52 | - $this->_valid_shortcodes_modifier[$this->_context]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list'); |
|
52 | + if ( $this->_context != 'admin' ) { |
|
53 | + $this->_valid_shortcodes_modifier[$this->_context]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list'); |
|
54 | + } |
|
53 | 55 | |
54 | 56 | $this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]'); |
55 | 57 | } |
@@ -6,7 +6,7 @@ discard block |
||
6 | 6 | * @package Event Espresso |
7 | 7 | * @subpackage messages |
8 | 8 | */ |
9 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
9 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) |
|
10 | 10 | exit('NO direct script access allowed'); |
11 | 11 | |
12 | 12 | /** |
@@ -24,11 +24,11 @@ discard block |
||
24 | 24 | */ |
25 | 25 | class EE_Messages_Html_Invoice_Validator extends EE_Messages_Validator { |
26 | 26 | |
27 | - public function __construct( $fields, $context ) { |
|
27 | + public function __construct($fields, $context) { |
|
28 | 28 | $this->_m_name = 'html'; |
29 | 29 | $this->_mt_name = 'invoice'; |
30 | 30 | |
31 | - parent::__construct( $fields, $context ); |
|
31 | + parent::__construct($fields, $context); |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | /** |
@@ -6,8 +6,9 @@ |
||
6 | 6 | * @package Event Espresso |
7 | 7 | * @subpackage messages |
8 | 8 | */ |
9 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
9 | +if (!defined('EVENT_ESPRESSO_VERSION') ) { |
|
10 | 10 | exit('NO direct script access allowed'); |
11 | +} |
|
11 | 12 | |
12 | 13 | /** |
13 | 14 | * |
@@ -6,7 +6,7 @@ discard block |
||
6 | 6 | * @package Event Espresso |
7 | 7 | * @subpackage messages |
8 | 8 | */ |
9 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
9 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) |
|
10 | 10 | exit('NO direct script access allowed'); |
11 | 11 | |
12 | 12 | /** |
@@ -24,11 +24,11 @@ discard block |
||
24 | 24 | */ |
25 | 25 | class EE_Messages_Html_Receipt_Validator extends EE_Messages_Validator { |
26 | 26 | |
27 | - public function __construct( $fields, $context ) { |
|
27 | + public function __construct($fields, $context) { |
|
28 | 28 | $this->_m_name = 'html'; |
29 | 29 | $this->_mt_name = 'receipt'; |
30 | 30 | |
31 | - parent::__construct( $fields, $context ); |
|
31 | + parent::__construct($fields, $context); |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | /** |
@@ -6,8 +6,9 @@ |
||
6 | 6 | * @package Event Espresso |
7 | 7 | * @subpackage messages |
8 | 8 | */ |
9 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
9 | +if (!defined('EVENT_ESPRESSO_VERSION') ) { |
|
10 | 10 | exit('NO direct script access allowed'); |
11 | +} |
|
11 | 12 | |
12 | 13 | /** |
13 | 14 | * |
@@ -5,7 +5,7 @@ discard block |
||
5 | 5 | * |
6 | 6 | * allows gateways to be used by different systems other than Event Espresso |
7 | 7 | */ |
8 | -interface EEI_Payment extends EEI_Base{ |
|
8 | +interface EEI_Payment extends EEI_Base { |
|
9 | 9 | |
10 | 10 | /** |
11 | 11 | * @return string indicating which the payment is approved, pending, cancelled or failed |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | /** |
153 | 153 | * Interface EEI_Payment_Method |
154 | 154 | */ |
155 | -interface EEI_Payment_Method{ |
|
155 | +interface EEI_Payment_Method { |
|
156 | 156 | |
157 | 157 | } |
158 | 158 | |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | * @param string $model_name |
172 | 172 | * @return EE_Log |
173 | 173 | */ |
174 | - function gateway_log($message,$id,$model_name); |
|
174 | + function gateway_log($message, $id, $model_name); |
|
175 | 175 | } |
176 | 176 | |
177 | 177 |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | * |
25 | 25 | * ------------------------------------------------------------------------ |
26 | 26 | */ |
27 | -abstract class EE_Offsite_Gateway extends EE_Gateway{ |
|
27 | +abstract class EE_Offsite_Gateway extends EE_Gateway { |
|
28 | 28 | |
29 | 29 | /** |
30 | 30 | * whether or not the gateway uses an IPN |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | * @param string $cancel_url URL to send the user to after a cancelled payment attempt on teh payment provider's website |
57 | 57 | * @return EE_Payment |
58 | 58 | */ |
59 | - public abstract function set_redirection_info( $payment, $billing_info = array(), $return_url = NULL, $notify_url = NULL, $cancel_url = NULL); |
|
59 | + public abstract function set_redirection_info($payment, $billing_info = array(), $return_url = NULL, $notify_url = NULL, $cancel_url = NULL); |
|
60 | 60 | |
61 | 61 | |
62 | 62 | |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | * @param EEI_Transaction $transaction |
69 | 69 | * @return EEI_Payment updated |
70 | 70 | */ |
71 | - public abstract function handle_payment_update($update_info,$transaction); |
|
71 | + public abstract function handle_payment_update($update_info, $transaction); |
|
72 | 72 | |
73 | 73 | |
74 | 74 | |
@@ -94,8 +94,8 @@ discard block |
||
94 | 94 | * @access protected |
95 | 95 | * @param boolean $uses_separate_IPN_request |
96 | 96 | */ |
97 | - protected function set_uses_separate_IPN_request( $uses_separate_IPN_request ) { |
|
98 | - $this->_uses_separate_IPN_request = filter_var( $uses_separate_IPN_request, FILTER_VALIDATE_BOOLEAN ); |
|
97 | + protected function set_uses_separate_IPN_request($uses_separate_IPN_request) { |
|
98 | + $this->_uses_separate_IPN_request = filter_var($uses_separate_IPN_request, FILTER_VALIDATE_BOOLEAN); |
|
99 | 99 | } |
100 | 100 | |
101 | 101 |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | * |
25 | 25 | * ------------------------------------------------------------------------ |
26 | 26 | */ |
27 | -abstract class EE_Onsite_Gateway extends EE_Gateway{ |
|
27 | +abstract class EE_Onsite_Gateway extends EE_Gateway { |
|
28 | 28 | |
29 | 29 | /** |
30 | 30 | * @return EE_Onsite_Gateway |
@@ -53,5 +53,5 @@ discard block |
||
53 | 53 | * } unless a child class specifies these array keys are NOT present |
54 | 54 | * @return EE_Payment updated |
55 | 55 | */ |
56 | - public abstract function do_direct_payment($payment,$billing_info = null); |
|
56 | + public abstract function do_direct_payment($payment, $billing_info = null); |
|
57 | 57 | } |
@@ -442,7 +442,7 @@ discard block |
||
442 | 442 | protected function _get_billing_values_from_form( $billing_form ){ |
443 | 443 | if($billing_form instanceof EE_Form_Section_Proper ){ |
444 | 444 | return $billing_form->input_pretty_values( true ); |
445 | - }else{ |
|
445 | + } else{ |
|
446 | 446 | return NULL; |
447 | 447 | } |
448 | 448 | } |
@@ -550,7 +550,7 @@ discard block |
||
550 | 550 | public function supports_sending_refunds(){ |
551 | 551 | if($this->_gateway && $this->_gateway instanceof EE_Gateway){ |
552 | 552 | return $this->_gateway->supports_sending_refunds(); |
553 | - }else{ |
|
553 | + } else{ |
|
554 | 554 | return false; |
555 | 555 | } |
556 | 556 | } |
@@ -567,7 +567,7 @@ discard block |
||
567 | 567 | public function process_refund($payment, $refund_info = array()){ |
568 | 568 | if($this->_gateway && $this->_gateway instanceof EE_Gateway){ |
569 | 569 | return $this->_gateway->do_direct_refund( $payment, $refund_info ); |
570 | - }else{ |
|
570 | + } else{ |
|
571 | 571 | throw new EE_Error(sprintf(__("Payment Method Type '%s' does not support sending refund requests", "event_espresso"),get_class($this))); |
572 | 572 | } |
573 | 573 | } |
@@ -583,11 +583,11 @@ discard block |
||
583 | 583 | public function payment_occurs(){ |
584 | 584 | if( ! $this->_gateway){ |
585 | 585 | return EE_PMT_Base::offline; |
586 | - }elseif($this->_gateway instanceof EE_Onsite_Gateway){ |
|
586 | + } elseif($this->_gateway instanceof EE_Onsite_Gateway){ |
|
587 | 587 | return EE_PMT_Base::onsite; |
588 | - }elseif($this->_gateway instanceof EE_Offsite_Gateway){ |
|
588 | + } elseif($this->_gateway instanceof EE_Offsite_Gateway){ |
|
589 | 589 | return EE_PMT_Base::offsite; |
590 | - }else{ |
|
590 | + } else{ |
|
591 | 591 | throw new EE_Error(sprintf(__("Payment method type '%s's gateway isn't an instance of EE_Onsite_Gateway, EE_Offsite_Gateway, or null. It must be one of those", "event_espresso"),get_class($this))); |
592 | 592 | } |
593 | 593 | } |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | * @since $VID:$ |
15 | 15 | * |
16 | 16 | */ |
17 | -abstract class EE_PMT_Base{ |
|
17 | +abstract class EE_PMT_Base { |
|
18 | 18 | |
19 | 19 | const onsite = 'on-site'; |
20 | 20 | const offsite = 'off-site'; |
@@ -90,27 +90,27 @@ discard block |
||
90 | 90 | * @return EE_PMT_Base |
91 | 91 | */ |
92 | 92 | function __construct($pm_instance = NULL) { |
93 | - if ( $pm_instance instanceof EE_Payment_Method ){ |
|
93 | + if ($pm_instance instanceof EE_Payment_Method) { |
|
94 | 94 | $this->set_instance($pm_instance); |
95 | 95 | } |
96 | 96 | $this->_set_file_folder(); |
97 | 97 | $this->_set_file_url(); |
98 | - if($this->_gateway){ |
|
99 | - $this->_gateway->set_payment_model( EEM_Payment::instance() ); |
|
100 | - $this->_gateway->set_payment_log( EEM_Change_Log::instance() ); |
|
101 | - EE_Registry::instance()->load_helper( 'Template' ); |
|
102 | - $this->_gateway->set_template_helper( new EEH_Template() ); |
|
103 | - EE_Registry::instance()->load_helper( 'Line_Item' ); |
|
104 | - $this->_gateway->set_line_item_helper( new EEH_Line_Item() ); |
|
105 | - EE_Registry::instance()->load_helper( 'Money' ); |
|
106 | - $this->_gateway->set_money_helper( new EEH_Money() ); |
|
98 | + if ($this->_gateway) { |
|
99 | + $this->_gateway->set_payment_model(EEM_Payment::instance()); |
|
100 | + $this->_gateway->set_payment_log(EEM_Change_Log::instance()); |
|
101 | + EE_Registry::instance()->load_helper('Template'); |
|
102 | + $this->_gateway->set_template_helper(new EEH_Template()); |
|
103 | + EE_Registry::instance()->load_helper('Line_Item'); |
|
104 | + $this->_gateway->set_line_item_helper(new EEH_Line_Item()); |
|
105 | + EE_Registry::instance()->load_helper('Money'); |
|
106 | + $this->_gateway->set_money_helper(new EEH_Money()); |
|
107 | 107 | } |
108 | - if( ! $this->_pretty_name){ |
|
108 | + if ( ! $this->_pretty_name) { |
|
109 | 109 | throw new EE_Error(sprintf(__("You must set the pretty name for the Payment Method Type in the constructor (_pretty_name), and please make it internationalized", "event_espresso"))); |
110 | 110 | } |
111 | 111 | //if the child didn't specify a default button, use the credit card one |
112 | - if( $this->_default_button_url === NULL){ |
|
113 | - $this->_default_button_url = EE_PLUGIN_DIR_URL . 'payment_methods' . DS . 'pay-by-credit-card.png'; |
|
112 | + if ($this->_default_button_url === NULL) { |
|
113 | + $this->_default_button_url = EE_PLUGIN_DIR_URL.'payment_methods'.DS.'pay-by-credit-card.png'; |
|
114 | 114 | } |
115 | 115 | } |
116 | 116 | |
@@ -119,10 +119,10 @@ discard block |
||
119 | 119 | /** |
120 | 120 | * sets the file_folder property |
121 | 121 | */ |
122 | - protected function _set_file_folder(){ |
|
122 | + protected function _set_file_folder() { |
|
123 | 123 | $reflector = new ReflectionClass(get_class($this)); |
124 | 124 | $fn = $reflector->getFileName(); |
125 | - $this->_file_folder = dirname($fn).DS; |
|
125 | + $this->_file_folder = dirname($fn).DS; |
|
126 | 126 | } |
127 | 127 | |
128 | 128 | |
@@ -130,10 +130,10 @@ discard block |
||
130 | 130 | /** |
131 | 131 | * sets the file URL with a trailing slash for this PMT |
132 | 132 | */ |
133 | - protected function _set_file_url(){ |
|
134 | - $plugins_dir_fixed = str_replace('\\',DS,WP_PLUGIN_DIR); |
|
135 | - $file_folder_fixed = str_replace('\\',DS,$this->file_folder()); |
|
136 | - $file_path = str_replace($plugins_dir_fixed,WP_PLUGIN_URL,$file_folder_fixed); |
|
133 | + protected function _set_file_url() { |
|
134 | + $plugins_dir_fixed = str_replace('\\', DS, WP_PLUGIN_DIR); |
|
135 | + $file_folder_fixed = str_replace('\\', DS, $this->file_folder()); |
|
136 | + $file_path = str_replace($plugins_dir_fixed, WP_PLUGIN_URL, $file_folder_fixed); |
|
137 | 137 | $this->_file_url = $file_path; |
138 | 138 | } |
139 | 139 | |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | * Gets the default description on all payment methods of this type |
142 | 142 | * @return string |
143 | 143 | */ |
144 | - public function default_description(){ |
|
144 | + public function default_description() { |
|
145 | 145 | return $this->_default_description; |
146 | 146 | } |
147 | 147 | |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | * Returns the folder containing the PMT child class, with a trailing slash |
152 | 152 | * @return string |
153 | 153 | */ |
154 | - public function file_folder(){ |
|
154 | + public function file_folder() { |
|
155 | 155 | return $this->_file_folder; |
156 | 156 | } |
157 | 157 | |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | /** |
161 | 161 | * @return string |
162 | 162 | */ |
163 | - public function file_url(){ |
|
163 | + public function file_url() { |
|
164 | 164 | return $this->_file_url; |
165 | 165 | } |
166 | 166 | |
@@ -171,14 +171,14 @@ discard block |
||
171 | 171 | * Its important teh payment method instance is set before |
172 | 172 | * @param EE_Payment_Method $payment_method_instance |
173 | 173 | */ |
174 | - function set_instance($payment_method_instance){ |
|
174 | + function set_instance($payment_method_instance) { |
|
175 | 175 | $this->_pm_instance = $payment_method_instance; |
176 | 176 | //if they have already requested the settings form, make sure its |
177 | 177 | //data matches this model object |
178 | - if($this->_settings_form){ |
|
178 | + if ($this->_settings_form) { |
|
179 | 179 | $this->settings_form()->populate_model_obj($payment_method_instance); |
180 | 180 | } |
181 | - if($this->_gateway && $this->_gateway instanceof EE_Gateway){ |
|
181 | + if ($this->_gateway && $this->_gateway instanceof EE_Gateway) { |
|
182 | 182 | $this->_gateway->set_settings($payment_method_instance->settings_array()); |
183 | 183 | } |
184 | 184 | } |
@@ -189,14 +189,14 @@ discard block |
||
189 | 189 | * Gets teh form for displaying to admins where they setup the payment method |
190 | 190 | * @return EE_Payment_Method_Form |
191 | 191 | */ |
192 | - function settings_form(){ |
|
193 | - if( ! $this->_settings_form){ |
|
192 | + function settings_form() { |
|
193 | + if ( ! $this->_settings_form) { |
|
194 | 194 | $this->_settings_form = $this->generate_new_settings_form(); |
195 | - $this->_settings_form->set_payment_method_type( $this ); |
|
196 | - $this->_settings_form->_construct_finalize(NULL, NULL ); |
|
195 | + $this->_settings_form->set_payment_method_type($this); |
|
196 | + $this->_settings_form->_construct_finalize(NULL, NULL); |
|
197 | 197 | //if we have already assigned a model object to this pmt, make |
198 | 198 | //sure its reflected in teh form we just generated |
199 | - if($this->_pm_instance){ |
|
199 | + if ($this->_pm_instance) { |
|
200 | 200 | $this->_settings_form->populate_model_obj($this->_pm_instance); |
201 | 201 | } |
202 | 202 | } |
@@ -222,7 +222,7 @@ discard block |
||
222 | 222 | * this payment method type's settings form later in the request |
223 | 223 | * @param EE_Payment_Method_Form $form |
224 | 224 | */ |
225 | - public function set_settings_form($form){ |
|
225 | + public function set_settings_form($form) { |
|
226 | 226 | $this->_settings_form = $form; |
227 | 227 | } |
228 | 228 | |
@@ -236,18 +236,18 @@ discard block |
||
236 | 236 | * @param array $extra_args |
237 | 237 | * @return \EE_Billing_Attendee_Info_Form|\EE_Billing_Info_Form |
238 | 238 | */ |
239 | - public function billing_form( EE_Transaction $transaction = NULL, $extra_args = array() ){ |
|
239 | + public function billing_form(EE_Transaction $transaction = NULL, $extra_args = array()) { |
|
240 | 240 | // has billing form already been regenerated ? or overwrite cache? |
241 | - if( ! $this->_billing_form || ! $this->_cache_billing_form ){ |
|
242 | - $this->_billing_form = $this->generate_new_billing_form( $transaction, $extra_args ); |
|
241 | + if ( ! $this->_billing_form || ! $this->_cache_billing_form) { |
|
242 | + $this->_billing_form = $this->generate_new_billing_form($transaction, $extra_args); |
|
243 | 243 | } |
244 | 244 | //if we know who the attendee is, and this is a billing form |
245 | 245 | //that uses attendee info, populate it |
246 | - if( $this->_billing_form instanceof EE_Billing_Attendee_Info_Form && |
|
246 | + if ($this->_billing_form instanceof EE_Billing_Attendee_Info_Form && |
|
247 | 247 | $transaction instanceof EE_Transaction && |
248 | 248 | $transaction->primary_registration() instanceof EE_Registration && |
249 | - $transaction->primary_registration()->attendee() instanceof EE_Attendee ){ |
|
250 | - $this->_billing_form->populate_from_attendee( $transaction->primary_registration()->attendee() ); |
|
249 | + $transaction->primary_registration()->attendee() instanceof EE_Attendee) { |
|
250 | + $this->_billing_form->populate_from_attendee($transaction->primary_registration()->attendee()); |
|
251 | 251 | } |
252 | 252 | return $this->_billing_form; |
253 | 253 | } |
@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | * @param \EE_Transaction $transaction |
259 | 259 | * @return \EE_Billing_Info_Form |
260 | 260 | */ |
261 | - abstract function generate_new_billing_form( EE_Transaction $transaction = NULL ); |
|
261 | + abstract function generate_new_billing_form(EE_Transaction $transaction = NULL); |
|
262 | 262 | |
263 | 263 | |
264 | 264 | |
@@ -269,7 +269,7 @@ discard block |
||
269 | 269 | * @param \EE_Billing_Info_Form $billing_form |
270 | 270 | * @return \EE_Billing_Info_Form |
271 | 271 | */ |
272 | - public function apply_billing_form_debug_settings( EE_Billing_Info_Form $billing_form ) { |
|
272 | + public function apply_billing_form_debug_settings(EE_Billing_Info_Form $billing_form) { |
|
273 | 273 | return $billing_form; |
274 | 274 | } |
275 | 275 | |
@@ -280,7 +280,7 @@ discard block |
||
280 | 280 | * if you have form |
281 | 281 | * @param EE_Payment_Method $form |
282 | 282 | */ |
283 | - public function set_billing_form($form){ |
|
283 | + public function set_billing_form($form) { |
|
284 | 284 | $this->_billing_form = $form; |
285 | 285 | } |
286 | 286 | |
@@ -290,7 +290,7 @@ discard block |
||
290 | 290 | * Returns whether or not this payment method requires HTTPS to be used |
291 | 291 | * @return boolean |
292 | 292 | */ |
293 | - function requires_https(){ |
|
293 | + function requires_https() { |
|
294 | 294 | return $this->_requires_https; |
295 | 295 | } |
296 | 296 | |
@@ -308,9 +308,9 @@ discard block |
||
308 | 308 | * @return EE_Payment |
309 | 309 | * @throws EE_Error |
310 | 310 | */ |
311 | - function process_payment( EE_Transaction $transaction, $amount = NULL, $billing_info = NULL, $return_url = NULL,$fail_url = NULL, $method = 'CART', $by_admin = FALSE ){ |
|
311 | + function process_payment(EE_Transaction $transaction, $amount = NULL, $billing_info = NULL, $return_url = NULL, $fail_url = NULL, $method = 'CART', $by_admin = FALSE) { |
|
312 | 312 | // @todo: add surcharge for the payment method, if any |
313 | - if ( $this->_gateway ) { |
|
313 | + if ($this->_gateway) { |
|
314 | 314 | //there is a gateway, so we're going to make a payment object |
315 | 315 | //but wait! do they already have a payment in progress that we thought was failed? |
316 | 316 | $duplicate_properties = array( |
@@ -321,15 +321,15 @@ discard block |
||
321 | 321 | 'PAY_amount' => $amount !== NULL ? $amount : $transaction->remaining(), |
322 | 322 | 'PAY_gateway_response' => NULL, |
323 | 323 | ); |
324 | - $payment = EEM_Payment::instance()->get_one( array( $duplicate_properties )); |
|
324 | + $payment = EEM_Payment::instance()->get_one(array($duplicate_properties)); |
|
325 | 325 | //if we didn't already have a payment in progress for the same thing, |
326 | 326 | //then we actually want to make a new payment |
327 | - if ( ! $payment instanceof EE_Payment ){ |
|
327 | + if ( ! $payment instanceof EE_Payment) { |
|
328 | 328 | $payment = EE_Payment::new_instance( |
329 | 329 | array_merge( |
330 | 330 | $duplicate_properties, |
331 | 331 | array( |
332 | - 'PAY_timestamp' => current_time( 'mysql' ), |
|
332 | + 'PAY_timestamp' => current_time('mysql'), |
|
333 | 333 | 'PAY_txn_id_chq_nmbr' => NULL, |
334 | 334 | 'PAY_po_number' => NULL, |
335 | 335 | 'PAY_extra_accntng' => NULL, |
@@ -340,10 +340,10 @@ discard block |
||
340 | 340 | } |
341 | 341 | //make sure the payment has been saved to show we started it, and so it has an ID should the gateway try to log it |
342 | 342 | $payment->save(); |
343 | - $billing_values = $this->_get_billing_values_from_form( $billing_info ); |
|
343 | + $billing_values = $this->_get_billing_values_from_form($billing_info); |
|
344 | 344 | |
345 | 345 | // Offsite Gateway |
346 | - if( $this->_gateway instanceof EE_Offsite_Gateway ){ |
|
346 | + if ($this->_gateway instanceof EE_Offsite_Gateway) { |
|
347 | 347 | |
348 | 348 | $payment = $this->_gateway->set_redirection_info( |
349 | 349 | $payment, |
@@ -359,17 +359,17 @@ discard block |
||
359 | 359 | ); |
360 | 360 | $payment->save(); |
361 | 361 | // Onsite Gateway |
362 | - } elseif ( $this->_gateway instanceof EE_Onsite_Gateway ) { |
|
362 | + } elseif ($this->_gateway instanceof EE_Onsite_Gateway) { |
|
363 | 363 | |
364 | - $payment = $this->_gateway->do_direct_payment($payment,$billing_values); |
|
364 | + $payment = $this->_gateway->do_direct_payment($payment, $billing_values); |
|
365 | 365 | $payment->save(); |
366 | 366 | |
367 | 367 | } else { |
368 | 368 | throw new EE_Error( |
369 | 369 | sprintf( |
370 | - __('Gateway for payment method type "%s" is "%s", not a subclass of either EE_Offsite_Gateway or EE_Onsite_Gateway, or NULL (to indicate NO gateway)', 'event_espresso' ), |
|
370 | + __('Gateway for payment method type "%s" is "%s", not a subclass of either EE_Offsite_Gateway or EE_Onsite_Gateway, or NULL (to indicate NO gateway)', 'event_espresso'), |
|
371 | 371 | get_class($this), |
372 | - gettype( $this->_gateway ) |
|
372 | + gettype($this->_gateway) |
|
373 | 373 | ) |
374 | 374 | ); |
375 | 375 | } |
@@ -384,15 +384,15 @@ discard block |
||
384 | 384 | 'TXN_ID' => $transaction->ID(), |
385 | 385 | 'PMD_ID' => $transaction->payment_method_ID(), |
386 | 386 | 'PAY_amount' => 0.00, |
387 | - 'PAY_timestamp' => current_time( 'timestamp' ), |
|
387 | + 'PAY_timestamp' => current_time('timestamp'), |
|
388 | 388 | ) |
389 | 389 | ); |
390 | 390 | |
391 | 391 | } |
392 | 392 | |
393 | 393 | // if there is billing info, clean it and save it now |
394 | - if( $billing_info instanceof EE_Billing_Attendee_Info_Form ){ |
|
395 | - $this->_save_billing_info_to_attendee( $billing_info, $transaction ); |
|
394 | + if ($billing_info instanceof EE_Billing_Attendee_Info_Form) { |
|
395 | + $this->_save_billing_info_to_attendee($billing_info, $transaction); |
|
396 | 396 | } |
397 | 397 | |
398 | 398 | return $payment; |
@@ -405,10 +405,10 @@ discard block |
||
405 | 405 | * @param EE_Billing_Info_Form $billing_form |
406 | 406 | * @return array |
407 | 407 | */ |
408 | - protected function _get_billing_values_from_form( $billing_form ){ |
|
409 | - if($billing_form instanceof EE_Form_Section_Proper ){ |
|
410 | - return $billing_form->input_pretty_values( true ); |
|
411 | - }else{ |
|
408 | + protected function _get_billing_values_from_form($billing_form) { |
|
409 | + if ($billing_form instanceof EE_Form_Section_Proper) { |
|
410 | + return $billing_form->input_pretty_values(true); |
|
411 | + } else { |
|
412 | 412 | return NULL; |
413 | 413 | } |
414 | 414 | } |
@@ -422,13 +422,13 @@ discard block |
||
422 | 422 | * @return EE_Payment |
423 | 423 | * @throws EE_Error |
424 | 424 | */ |
425 | - public function handle_ipn($req_data,$transaction){ |
|
425 | + public function handle_ipn($req_data, $transaction) { |
|
426 | 426 | $transaction = EEM_Transaction::instance()->ensure_is_obj($transaction); |
427 | - if( ! $this->_gateway instanceof EE_Offsite_Gateway){ |
|
428 | - throw new EE_Error(sprintf(__("Could not handle IPN because '%s' is not an offsite gateway", "event_espresso"), print_r( $this->_gateway, TRUE ))); |
|
427 | + if ( ! $this->_gateway instanceof EE_Offsite_Gateway) { |
|
428 | + throw new EE_Error(sprintf(__("Could not handle IPN because '%s' is not an offsite gateway", "event_espresso"), print_r($this->_gateway, TRUE))); |
|
429 | 429 | |
430 | 430 | } |
431 | - $payment = $this->_gateway->handle_payment_update( $req_data, $transaction ); |
|
431 | + $payment = $this->_gateway->handle_payment_update($req_data, $transaction); |
|
432 | 432 | return $payment; |
433 | 433 | } |
434 | 434 | |
@@ -441,22 +441,22 @@ discard block |
||
441 | 441 | * @param EE_Transaction $transaction |
442 | 442 | * @return boolean success |
443 | 443 | */ |
444 | - protected function _save_billing_info_to_attendee($billing_form, $transaction){ |
|
445 | - if( ! $transaction || ! $transaction instanceof EE_Transaction){ |
|
444 | + protected function _save_billing_info_to_attendee($billing_form, $transaction) { |
|
445 | + if ( ! $transaction || ! $transaction instanceof EE_Transaction) { |
|
446 | 446 | EE_Error::add_error(__("Cannot save billing info because no transaction was specified", "event_espresso"), __FILE__, __FUNCTION__, __LINE__); |
447 | 447 | return false; |
448 | 448 | } |
449 | 449 | $primary_reg = $transaction->primary_registration(); |
450 | - if( ! $primary_reg ){ |
|
450 | + if ( ! $primary_reg) { |
|
451 | 451 | EE_Error::add_error(__("Cannot save billing info because the transaction has no primary registration", "event_espresso"), __FILE__, __FUNCTION__, __LINE__); |
452 | 452 | return false; |
453 | 453 | } |
454 | 454 | $attendee = $primary_reg->attendee(); |
455 | - if( ! $attendee ){ |
|
455 | + if ( ! $attendee) { |
|
456 | 456 | EE_Error::add_error(__("Cannot save billing info because the transaction's primary registration has no attendee!", "event_espresso"), __FILE__, __FUNCTION__, __LINE__); |
457 | 457 | return false; |
458 | 458 | } |
459 | - return $attendee->save_and_clean_billing_info_for_payment_method($billing_form, $transaction->payment_method() ); |
|
459 | + return $attendee->save_and_clean_billing_info_for_payment_method($billing_form, $transaction->payment_method()); |
|
460 | 460 | |
461 | 461 | } |
462 | 462 | |
@@ -469,7 +469,7 @@ discard block |
||
469 | 469 | * @param array $req_data |
470 | 470 | * @return EE_Payment |
471 | 471 | */ |
472 | - protected function find_payment_for_ipn( EE_Transaction $transaction, $req_data = array() ){ |
|
472 | + protected function find_payment_for_ipn(EE_Transaction $transaction, $req_data = array()) { |
|
473 | 473 | return $transaction->last_payment(); |
474 | 474 | } |
475 | 475 | |
@@ -486,8 +486,8 @@ discard block |
||
486 | 486 | * and identifies the IPN as being for this payment method (not just fo ra payment method of this type) |
487 | 487 | * @throws EE_Error |
488 | 488 | */ |
489 | - public function handle_unclaimed_ipn( $req_data = array() ){ |
|
490 | - throw new EE_Error(sprintf(__("Payment Method '%s' cannot handle unclaimed IPNs", "event_espresso"), get_class($this) )); |
|
489 | + public function handle_unclaimed_ipn($req_data = array()) { |
|
490 | + throw new EE_Error(sprintf(__("Payment Method '%s' cannot handle unclaimed IPNs", "event_espresso"), get_class($this))); |
|
491 | 491 | } |
492 | 492 | |
493 | 493 | |
@@ -503,7 +503,7 @@ discard block |
||
503 | 503 | * @param EE_Transaction $transaction |
504 | 504 | * @return EE_Payment |
505 | 505 | */ |
506 | - public function finalize_payment_for($transaction){ |
|
506 | + public function finalize_payment_for($transaction) { |
|
507 | 507 | return $transaction->last_payment(); |
508 | 508 | } |
509 | 509 | |
@@ -513,10 +513,10 @@ discard block |
||
513 | 513 | * Whether or not this payment method's gateway supports sending refund requests |
514 | 514 | * @return boolean |
515 | 515 | */ |
516 | - public function supports_sending_refunds(){ |
|
517 | - if($this->_gateway && $this->_gateway instanceof EE_Gateway){ |
|
516 | + public function supports_sending_refunds() { |
|
517 | + if ($this->_gateway && $this->_gateway instanceof EE_Gateway) { |
|
518 | 518 | return $this->_gateway->supports_sending_refunds(); |
519 | - }else{ |
|
519 | + } else { |
|
520 | 520 | return false; |
521 | 521 | } |
522 | 522 | } |
@@ -530,11 +530,11 @@ discard block |
||
530 | 530 | * @throws EE_Error |
531 | 531 | * @return EE_Payment |
532 | 532 | */ |
533 | - public function process_refund($payment, $refund_info = array()){ |
|
534 | - if($this->_gateway && $this->_gateway instanceof EE_Gateway){ |
|
535 | - return $this->_gateway->do_direct_refund( $payment, $refund_info ); |
|
536 | - }else{ |
|
537 | - throw new EE_Error(sprintf(__("Payment Method Type '%s' does not support sending refund requests", "event_espresso"),get_class($this))); |
|
533 | + public function process_refund($payment, $refund_info = array()) { |
|
534 | + if ($this->_gateway && $this->_gateway instanceof EE_Gateway) { |
|
535 | + return $this->_gateway->do_direct_refund($payment, $refund_info); |
|
536 | + } else { |
|
537 | + throw new EE_Error(sprintf(__("Payment Method Type '%s' does not support sending refund requests", "event_espresso"), get_class($this))); |
|
538 | 538 | } |
539 | 539 | } |
540 | 540 | |
@@ -546,15 +546,15 @@ discard block |
||
546 | 546 | * @return string |
547 | 547 | * @throws EE_Error |
548 | 548 | */ |
549 | - public function payment_occurs(){ |
|
550 | - if( ! $this->_gateway){ |
|
549 | + public function payment_occurs() { |
|
550 | + if ( ! $this->_gateway) { |
|
551 | 551 | return EE_PMT_Base::offline; |
552 | - }elseif($this->_gateway instanceof EE_Onsite_Gateway){ |
|
552 | + }elseif ($this->_gateway instanceof EE_Onsite_Gateway) { |
|
553 | 553 | return EE_PMT_Base::onsite; |
554 | - }elseif($this->_gateway instanceof EE_Offsite_Gateway){ |
|
554 | + }elseif ($this->_gateway instanceof EE_Offsite_Gateway) { |
|
555 | 555 | return EE_PMT_Base::offsite; |
556 | - }else{ |
|
557 | - throw new EE_Error(sprintf(__("Payment method type '%s's gateway isn't an instance of EE_Onsite_Gateway, EE_Offsite_Gateway, or null. It must be one of those", "event_espresso"),get_class($this))); |
|
556 | + } else { |
|
557 | + throw new EE_Error(sprintf(__("Payment method type '%s's gateway isn't an instance of EE_Onsite_Gateway, EE_Offsite_Gateway, or null. It must be one of those", "event_espresso"), get_class($this))); |
|
558 | 558 | } |
559 | 559 | } |
560 | 560 | |
@@ -567,9 +567,9 @@ discard block |
||
567 | 567 | * @param EE_Payment $payment |
568 | 568 | * @return string |
569 | 569 | */ |
570 | - public function payment_overview_content(EE_Payment $payment){ |
|
570 | + public function payment_overview_content(EE_Payment $payment) { |
|
571 | 571 | EE_Registry::instance()->load_helper('Template'); |
572 | - return EEH_Template::display_template(EE_LIBRARIES.'payment_methods'.DS.'templates'.DS.'payment_details_content.template.php', array('payment_method'=>$this->_pm_instance,'payment'=>$payment) , true); |
|
572 | + return EEH_Template::display_template(EE_LIBRARIES.'payment_methods'.DS.'templates'.DS.'payment_details_content.template.php', array('payment_method'=>$this->_pm_instance, 'payment'=>$payment), true); |
|
573 | 573 | } |
574 | 574 | |
575 | 575 | |
@@ -577,7 +577,7 @@ discard block |
||
577 | 577 | /** |
578 | 578 | * @return array exactly like EE_Admin_Page _page_config's 'help_tabs' attribute. @see EE_Admin_Page::_set_page_config() |
579 | 579 | */ |
580 | - public function help_tabs_config(){ |
|
580 | + public function help_tabs_config() { |
|
581 | 581 | return array(); |
582 | 582 | } |
583 | 583 | |
@@ -588,9 +588,9 @@ discard block |
||
588 | 588 | * the payment method's table's PMT_type column) |
589 | 589 | * @return string |
590 | 590 | */ |
591 | - public function system_name(){ |
|
591 | + public function system_name() { |
|
592 | 592 | $classname = get_class($this); |
593 | - return str_replace("EE_PMT_",'',$classname); |
|
593 | + return str_replace("EE_PMT_", '', $classname); |
|
594 | 594 | } |
595 | 595 | |
596 | 596 | |
@@ -599,7 +599,7 @@ discard block |
||
599 | 599 | * A pretty i18n version of the PMT name |
600 | 600 | * @return string |
601 | 601 | */ |
602 | - public function pretty_name(){ |
|
602 | + public function pretty_name() { |
|
603 | 603 | return $this->_pretty_name; |
604 | 604 | } |
605 | 605 | |
@@ -609,7 +609,7 @@ discard block |
||
609 | 609 | * Gets the default absolute URL to the payment method type's button |
610 | 610 | * @return string |
611 | 611 | */ |
612 | - public function default_button_url(){ |
|
612 | + public function default_button_url() { |
|
613 | 613 | return $this->_default_button_url; |
614 | 614 | } |
615 | 615 | |
@@ -619,7 +619,7 @@ discard block |
||
619 | 619 | * Gets the gateway used by this payment method (if any) |
620 | 620 | * @return EE_Gateway |
621 | 621 | */ |
622 | - public function get_gateway(){ |
|
622 | + public function get_gateway() { |
|
623 | 623 | return $this->_gateway; |
624 | 624 | } |
625 | 625 | |
@@ -628,9 +628,9 @@ discard block |
||
628 | 628 | /** |
629 | 629 | * @return string html for the link to a help tab |
630 | 630 | */ |
631 | - public function get_help_tab_link(){ |
|
632 | - EE_Registry::instance()->load_helper( 'Template' ); |
|
633 | - return EEH_Template::get_help_tab_link( $this->get_help_tab_name() ); |
|
631 | + public function get_help_tab_link() { |
|
632 | + EE_Registry::instance()->load_helper('Template'); |
|
633 | + return EEH_Template::get_help_tab_link($this->get_help_tab_name()); |
|
634 | 634 | } |
635 | 635 | |
636 | 636 | |
@@ -639,8 +639,8 @@ discard block |
||
639 | 639 | * Returns the name of the help tab for this PMT |
640 | 640 | * @return string |
641 | 641 | */ |
642 | - public function get_help_tab_name(){ |
|
643 | - return 'ee_' . strtolower( $this->system_name() ) . '_help_tab'; |
|
642 | + public function get_help_tab_name() { |
|
643 | + return 'ee_'.strtolower($this->system_name()).'_help_tab'; |
|
644 | 644 | } |
645 | 645 | |
646 | 646 | /** |
@@ -648,8 +648,8 @@ discard block |
||
648 | 648 | * this PMT by an admin |
649 | 649 | * @return string |
650 | 650 | */ |
651 | - public function cap_name(){ |
|
652 | - return 'ee_payment_method_' . strtolower( $this->system_name() ); |
|
651 | + public function cap_name() { |
|
652 | + return 'ee_payment_method_'.strtolower($this->system_name()); |
|
653 | 653 | } |
654 | 654 | |
655 | 655 | /** |
@@ -661,9 +661,9 @@ discard block |
||
661 | 661 | * @param EE_Payment $payment |
662 | 662 | * @return void |
663 | 663 | */ |
664 | - public function update_txn_based_on_payment( $payment ){ |
|
665 | - if( $this->_gateway instanceof EE_Gateway ){ |
|
666 | - $this->_gateway->update_txn_based_on_payment( $payment ); |
|
664 | + public function update_txn_based_on_payment($payment) { |
|
665 | + if ($this->_gateway instanceof EE_Gateway) { |
|
666 | + $this->_gateway->update_txn_based_on_payment($payment); |
|
667 | 667 | } |
668 | 668 | } |
669 | 669 |