@@ -6,7 +6,7 @@ discard block |
||
6 | 6 | <tr class="item"> |
7 | 7 | <td>[LINE_ITEM_NAME][LINE_ITEM_TAXABLE_*]</td> |
8 | 8 | <td colspan="2">[LINE_ITEM_DESCRIPTION] |
9 | - <p class="ticket-note"><?php echo sprintf( __( 'This ticket can be used once at %s of the dates/times below.', 'event_espresso' ), '[TKT_USES_* schema=' . __( 'any', 'event_espresso' ) . ']' ); ?></p> |
|
9 | + <p class="ticket-note"><?php echo sprintf(__('This ticket can be used once at %s of the dates/times below.', 'event_espresso'), '[TKT_USES_* schema='.__('any', 'event_espresso').']'); ?></p> |
|
10 | 10 | </td> |
11 | 11 | <td class="item_c">[LINE_ITEM_QUANTITY]</td> |
12 | 12 | <td class="item_c">[LINE_ITEM_AMOUNT]</td> |
@@ -15,6 +15,6 @@ discard block |
||
15 | 15 | [PRICE_MODIFIER_LINE_ITEM_LIST] |
16 | 16 | <tr class="total_tr odd"> |
17 | 17 | <td colspan="4"></td> |
18 | - <td class="total" nowrap="nowrap"><?php _e( "Ticket Total:", "event_espresso" ); ?></td> |
|
18 | + <td class="total" nowrap="nowrap"><?php _e("Ticket Total:", "event_espresso"); ?></td> |
|
19 | 19 | <td class="item_r">[LINE_ITEM_TOTAL]</td> |
20 | 20 | </tr> |
@@ -8,11 +8,11 @@ discard block |
||
8 | 8 | <table class="invoice-amount"> |
9 | 9 | <thead> |
10 | 10 | <tr class="header_row"> |
11 | - <th class="name-column"><?php _e( "Ticket", "event_espresso" ); ?></th> |
|
12 | - <th colspan="2" class="desc-column"><?php _e( "Description", "event_espresso" ); ?></th> |
|
13 | - <th class="number-column item_c"><?php _e( "Quantity", "event_espresso" ); ?></th> |
|
14 | - <th class="number-column item_c"><?php _e( "Price", "event_espresso" ); ?></th> |
|
15 | - <th class="number-column item_r"><?php _e( "Total", "event_espresso" ); ?></th> |
|
11 | + <th class="name-column"><?php _e("Ticket", "event_espresso"); ?></th> |
|
12 | + <th colspan="2" class="desc-column"><?php _e("Description", "event_espresso"); ?></th> |
|
13 | + <th class="number-column item_c"><?php _e("Quantity", "event_espresso"); ?></th> |
|
14 | + <th class="number-column item_c"><?php _e("Price", "event_espresso"); ?></th> |
|
15 | + <th class="number-column item_r"><?php _e("Total", "event_espresso"); ?></th> |
|
16 | 16 | </tr> |
17 | 17 | </thead> |
18 | 18 | <tbody>[TICKET_LINE_ITEM_LIST]</tbody> |
@@ -22,25 +22,25 @@ discard block |
||
22 | 22 | <div class="ticket-time-and-place-details"> |
23 | 23 | <div class="ticket-time-details"> |
24 | 24 | <h4 class="sub-section-title no-bottom-margin"> |
25 | - <img class="icon" src="<?php echo EE_IMAGES_URL . 'clock-16x16.png'; ?>"><?php _e( 'Date/Time:', 'event_espresso' ); ?> |
|
25 | + <img class="icon" src="<?php echo EE_IMAGES_URL.'clock-16x16.png'; ?>"><?php _e('Date/Time:', 'event_espresso'); ?> |
|
26 | 26 | </h4> |
27 | 27 | <ul class="event-dates">[DATETIME_LIST]</ul> |
28 | 28 | </div> |
29 | 29 | <div class="ticket-place-details"> |
30 | 30 | <h4 class="sub-section-title no-bottom-margin"> |
31 | - <img class="icon" src="<?php echo EE_IMAGES_URL . 'location-pin-16x16.png'; ?>"><?php _e( 'Venue', 'event_espresso' ); ?> |
|
31 | + <img class="icon" src="<?php echo EE_IMAGES_URL.'location-pin-16x16.png'; ?>"><?php _e('Venue', 'event_espresso'); ?> |
|
32 | 32 | </h4> |
33 | 33 | <ul class="event-venues"> |
34 | 34 | <li>[VENUE_TITLE] |
35 | - <span class="small-text">( <a href="[VENUE_URL]"><?php _e( 'view', 'event_espresso' ); ?></a> )</span> |
|
35 | + <span class="small-text">( <a href="[VENUE_URL]"><?php _e('view', 'event_espresso'); ?></a> )</span> |
|
36 | 36 | </li> |
37 | 37 | </ul> |
38 | 38 | </div> |
39 | 39 | </div> |
40 | 40 | <div class="ticket-registrations-area"> |
41 | 41 | <h4 class="sub-section-title"> |
42 | - <img class="icon" src="<?php echo EE_IMAGES_URL . 'users-16x16.png'; ?>"><?php _e( "Registration Details", "event_espresso" ); ?> |
|
43 | - <span class="small-text link">( <a class="print_button noPrint" href="[PRIMARY_REGISTRANT_FRONTEND_EDIT_REG_LINK]"><?php _e( 'edit', 'event_espresso' ); ?></a> )</span> |
|
42 | + <img class="icon" src="<?php echo EE_IMAGES_URL.'users-16x16.png'; ?>"><?php _e("Registration Details", "event_espresso"); ?> |
|
43 | + <span class="small-text link">( <a class="print_button noPrint" href="[PRIMARY_REGISTRANT_FRONTEND_EDIT_REG_LINK]"><?php _e('edit', 'event_espresso'); ?></a> )</span> |
|
44 | 44 | </h4> |
45 | 45 | <ul class="ticket-registrations-list">[ATTENDEE_LIST]</ul> |
46 | 46 | </div> |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | |
33 | 33 | |
34 | 34 | protected function _set_admin_pages() { |
35 | - $this->admin_registered_pages = array( 'events_edit' => TRUE ); |
|
35 | + $this->admin_registered_pages = array('events_edit' => TRUE); |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | |
@@ -45,17 +45,17 @@ discard block |
||
45 | 45 | |
46 | 46 | protected function _set_with_messengers() { |
47 | 47 | $this->_with_messengers = array( |
48 | - 'html' => array( 'pdf' ) |
|
48 | + 'html' => array('pdf') |
|
49 | 49 | ); |
50 | 50 | } |
51 | 51 | |
52 | 52 | |
53 | 53 | |
54 | - protected function _get_data_for_context( $context, EE_Registration $registration, $id ) { |
|
54 | + protected function _get_data_for_context($context, EE_Registration $registration, $id) { |
|
55 | 55 | //receipt message type data handler is 'Gateways' and it expects a transaction object. |
56 | 56 | $transaction = $registration->transaction(); |
57 | - if ( $transaction instanceof EE_Transaction ) { |
|
58 | - return array( $transaction ); |
|
57 | + if ($transaction instanceof EE_Transaction) { |
|
58 | + return array($transaction); |
|
59 | 59 | } |
60 | 60 | return array(); |
61 | 61 | } |
@@ -5,7 +5,9 @@ |
||
5 | 5 | * @subpackage messages |
6 | 6 | * @since 4.5.0 |
7 | 7 | */ |
8 | -if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed'); |
|
8 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
|
9 | + exit('No direct script access allowed'); |
|
10 | +} |
|
9 | 11 | |
10 | 12 | /** |
11 | 13 | * The message type for invoices. |
@@ -87,12 +87,12 @@ |
||
87 | 87 | |
88 | 88 | |
89 | 89 | /** |
90 | - * used to set the valid shortcodes for the receipt message type |
|
91 | - * |
|
92 | - * @since 4.5.0 |
|
93 | - * |
|
94 | - * @return void |
|
95 | - */ |
|
90 | + * used to set the valid shortcodes for the receipt message type |
|
91 | + * |
|
92 | + * @since 4.5.0 |
|
93 | + * |
|
94 | + * @return void |
|
95 | + */ |
|
96 | 96 | protected function _set_valid_shortcodes() { |
97 | 97 | $this->_valid_shortcodes['purchaser'] = array( |
98 | 98 | 'attendee_list', 'attendee', 'datetime_list', 'datetime', 'event_list', 'event', 'event_meta', 'messenger', 'organization', 'primary_registration_list', 'primary_registration_details', 'ticket_list', 'ticket', 'transaction', 'venue', 'line_item_list', 'payment_list', 'line_item', 'payment' |
@@ -5,7 +5,9 @@ |
||
5 | 5 | * @subpackage messages |
6 | 6 | * @since 4.5.0 |
7 | 7 | */ |
8 | -if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed'); |
|
8 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
|
9 | + exit('No direct script access allowed'); |
|
10 | +} |
|
9 | 11 | |
10 | 12 | /** |
11 | 13 | * The message type for transaction receipts. |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | |
56 | 56 | |
57 | 57 | protected function _set_admin_pages() { |
58 | - $this->admin_registered_pages = array( 'events_edit' => TRUE ); |
|
58 | + $this->admin_registered_pages = array('events_edit' => TRUE); |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | |
@@ -68,17 +68,17 @@ discard block |
||
68 | 68 | |
69 | 69 | protected function _set_with_messengers() { |
70 | 70 | $this->_with_messengers = array( |
71 | - 'html' => array( 'pdf' ) |
|
71 | + 'html' => array('pdf') |
|
72 | 72 | ); |
73 | 73 | } |
74 | 74 | |
75 | 75 | |
76 | 76 | |
77 | - protected function _get_data_for_context( $context, EE_Registration $registration, $id ) { |
|
77 | + protected function _get_data_for_context($context, EE_Registration $registration, $id) { |
|
78 | 78 | //receipt message type data handler is 'Gateways' and it expects a transaction object. |
79 | 79 | $transaction = $registration->transaction(); |
80 | - if ( $transaction instanceof EE_Transaction ) { |
|
81 | - return array( $transaction ); |
|
80 | + if ($transaction instanceof EE_Transaction) { |
|
81 | + return array($transaction); |
|
82 | 82 | } |
83 | 83 | return array(); |
84 | 84 | } |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | * @return void |
118 | 118 | */ |
119 | 119 | protected function _set_valid_shortcodes() { |
120 | - $this->_valid_shortcodes[ 'purchaser' ] = array( |
|
120 | + $this->_valid_shortcodes['purchaser'] = array( |
|
121 | 121 | 'attendee_list', |
122 | 122 | 'attendee', |
123 | 123 | 'datetime_list', |
@@ -110,12 +110,12 @@ |
||
110 | 110 | |
111 | 111 | |
112 | 112 | /** |
113 | - * used to set the valid shortcodes for the receipt message type |
|
114 | - * |
|
115 | - * @since 4.5.0 |
|
116 | - * |
|
117 | - * @return void |
|
118 | - */ |
|
113 | + * used to set the valid shortcodes for the receipt message type |
|
114 | + * |
|
115 | + * @since 4.5.0 |
|
116 | + * |
|
117 | + * @return void |
|
118 | + */ |
|
119 | 119 | protected function _set_valid_shortcodes() { |
120 | 120 | $this->_valid_shortcodes[ 'purchaser' ] = array( |
121 | 121 | 'attendee_list', |
@@ -1,7 +1,8 @@ |
||
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 | * |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
2 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) |
|
3 | 3 | exit('NO direct script access allowed'); |
4 | 4 | |
5 | 5 | /** |
@@ -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 | * |
@@ -214,7 +214,7 @@ |
||
214 | 214 | if($payment instanceof EEI_Payment){ |
215 | 215 | $type='Payment'; |
216 | 216 | $id = $payment->ID(); |
217 | - }else{ |
|
217 | + } else{ |
|
218 | 218 | $type = 'Payment_Method'; |
219 | 219 | $id = $this->_ID; |
220 | 220 | } |
@@ -74,15 +74,15 @@ discard block |
||
74 | 74 | */ |
75 | 75 | protected $_line_item; |
76 | 76 | |
77 | - /** |
|
78 | - * @var GatewayDataFormatterInterface |
|
79 | - */ |
|
80 | - protected $_gateway_data_formatter; |
|
77 | + /** |
|
78 | + * @var GatewayDataFormatterInterface |
|
79 | + */ |
|
80 | + protected $_gateway_data_formatter; |
|
81 | 81 | |
82 | - /** |
|
83 | - * @var FormatterInterface |
|
84 | - */ |
|
85 | - protected $_unsupported_character_remover; |
|
82 | + /** |
|
83 | + * @var FormatterInterface |
|
84 | + */ |
|
85 | + protected $_unsupported_character_remover; |
|
86 | 86 | |
87 | 87 | /** |
88 | 88 | * The ID of the payment method using this gateway |
@@ -211,75 +211,75 @@ discard block |
||
211 | 211 | |
212 | 212 | |
213 | 213 | |
214 | - /** |
|
215 | - * Sets the gateway data formatter helper |
|
216 | - * @param GatewayDataFormatterInterface $gateway_data_formatter |
|
217 | - * @throws InvalidEntityException if it's not set properly |
|
218 | - */ |
|
214 | + /** |
|
215 | + * Sets the gateway data formatter helper |
|
216 | + * @param GatewayDataFormatterInterface $gateway_data_formatter |
|
217 | + * @throws InvalidEntityException if it's not set properly |
|
218 | + */ |
|
219 | 219 | public function set_gateway_data_formatter( GatewayDataFormatterInterface $gateway_data_formatter){ |
220 | - if( ! $gateway_data_formatter instanceof GatewayDataFormatterInterface){ |
|
221 | - throw new InvalidEntityException( |
|
222 | - is_object($gateway_data_formatter) |
|
223 | - ? get_class($gateway_data_formatter) |
|
224 | - : esc_html__('Not an object','event_espresso'), |
|
225 | - '\\EventEspresso\\core\\services\\payment_methods\\gateways\\GatewayDataFormatterInterface' |
|
226 | - ); |
|
227 | - } |
|
228 | - $this->_gateway_data_formatter = $gateway_data_formatter; |
|
229 | - } |
|
230 | - |
|
231 | - /** |
|
232 | - * Gets the gateway data formatter |
|
233 | - * @return GatewayDataFormatterInterface |
|
234 | - * @throws InvalidEntityException if it's not set properly |
|
235 | - */ |
|
236 | - protected function _get_gateway_formatter(){ |
|
237 | - if( ! $this->_gateway_data_formatter instanceof GatewayDataFormatterInterface){ |
|
238 | - throw new InvalidEntityException( |
|
239 | - is_object($this->_gateway_data_formatter) |
|
240 | - ? get_class($this->_gateway_data_formatter) |
|
241 | - : esc_html__('Not an object','event_espresso'), |
|
242 | - '\\EventEspresso\\core\\services\\payment_methods\\gateways\\GatewayDataFormatterInterface' |
|
243 | - ); |
|
244 | - } |
|
245 | - return $this->_gateway_data_formatter; |
|
246 | - } |
|
247 | - |
|
248 | - |
|
249 | - |
|
250 | - /** |
|
251 | - * Sets the helper which will remove unsupported characters for most gateways |
|
252 | - * @param FormatterInterface $formatter |
|
253 | - * @return FormatterInterface |
|
254 | - * @throws InvalidEntityException |
|
255 | - */ |
|
256 | - public function set_unsupported_character_remover( FormatterInterface $formatter){ |
|
257 | - if( ! $formatter instanceof FormatterInterface){ |
|
258 | - throw new InvalidEntityException( |
|
259 | - is_object($formatter) |
|
260 | - ? get_class($formatter) |
|
261 | - : esc_html__('Not an object','event_espresso'), |
|
262 | - '\\EventEspresso\\core\\services\\formatters\\FormatterInterface' |
|
263 | - ); |
|
264 | - } |
|
265 | - $this->_unsupported_character_remover = $formatter; |
|
266 | - } |
|
267 | - /** |
|
268 | - * Gets the helper which removes characters which gateways might not support, like emojis etc. |
|
269 | - * @return FormatterInterface |
|
270 | - * @throws InvalidEntityException |
|
271 | - */ |
|
272 | - protected function _get_unsupported_character_remover(){ |
|
273 | - if( ! $this->_unsupported_character_remover instanceof FormatterInterface){ |
|
274 | - throw new InvalidEntityException( |
|
275 | - is_object($this->_unsupported_character_remover) |
|
276 | - ? get_class($this->_unsupported_character_remover) |
|
277 | - : esc_html__('Not an object','event_espresso'), |
|
278 | - '\\EventEspresso\\core\\services\\formatters\\FormatterInterface' |
|
279 | - ); |
|
280 | - } |
|
281 | - return $this->_unsupported_character_remover; |
|
282 | - } |
|
220 | + if( ! $gateway_data_formatter instanceof GatewayDataFormatterInterface){ |
|
221 | + throw new InvalidEntityException( |
|
222 | + is_object($gateway_data_formatter) |
|
223 | + ? get_class($gateway_data_formatter) |
|
224 | + : esc_html__('Not an object','event_espresso'), |
|
225 | + '\\EventEspresso\\core\\services\\payment_methods\\gateways\\GatewayDataFormatterInterface' |
|
226 | + ); |
|
227 | + } |
|
228 | + $this->_gateway_data_formatter = $gateway_data_formatter; |
|
229 | + } |
|
230 | + |
|
231 | + /** |
|
232 | + * Gets the gateway data formatter |
|
233 | + * @return GatewayDataFormatterInterface |
|
234 | + * @throws InvalidEntityException if it's not set properly |
|
235 | + */ |
|
236 | + protected function _get_gateway_formatter(){ |
|
237 | + if( ! $this->_gateway_data_formatter instanceof GatewayDataFormatterInterface){ |
|
238 | + throw new InvalidEntityException( |
|
239 | + is_object($this->_gateway_data_formatter) |
|
240 | + ? get_class($this->_gateway_data_formatter) |
|
241 | + : esc_html__('Not an object','event_espresso'), |
|
242 | + '\\EventEspresso\\core\\services\\payment_methods\\gateways\\GatewayDataFormatterInterface' |
|
243 | + ); |
|
244 | + } |
|
245 | + return $this->_gateway_data_formatter; |
|
246 | + } |
|
247 | + |
|
248 | + |
|
249 | + |
|
250 | + /** |
|
251 | + * Sets the helper which will remove unsupported characters for most gateways |
|
252 | + * @param FormatterInterface $formatter |
|
253 | + * @return FormatterInterface |
|
254 | + * @throws InvalidEntityException |
|
255 | + */ |
|
256 | + public function set_unsupported_character_remover( FormatterInterface $formatter){ |
|
257 | + if( ! $formatter instanceof FormatterInterface){ |
|
258 | + throw new InvalidEntityException( |
|
259 | + is_object($formatter) |
|
260 | + ? get_class($formatter) |
|
261 | + : esc_html__('Not an object','event_espresso'), |
|
262 | + '\\EventEspresso\\core\\services\\formatters\\FormatterInterface' |
|
263 | + ); |
|
264 | + } |
|
265 | + $this->_unsupported_character_remover = $formatter; |
|
266 | + } |
|
267 | + /** |
|
268 | + * Gets the helper which removes characters which gateways might not support, like emojis etc. |
|
269 | + * @return FormatterInterface |
|
270 | + * @throws InvalidEntityException |
|
271 | + */ |
|
272 | + protected function _get_unsupported_character_remover(){ |
|
273 | + if( ! $this->_unsupported_character_remover instanceof FormatterInterface){ |
|
274 | + throw new InvalidEntityException( |
|
275 | + is_object($this->_unsupported_character_remover) |
|
276 | + ? get_class($this->_unsupported_character_remover) |
|
277 | + : esc_html__('Not an object','event_espresso'), |
|
278 | + '\\EventEspresso\\core\\services\\formatters\\FormatterInterface' |
|
279 | + ); |
|
280 | + } |
|
281 | + return $this->_unsupported_character_remover; |
|
282 | + } |
|
283 | 283 | |
284 | 284 | |
285 | 285 | /** |
@@ -300,7 +300,7 @@ discard block |
||
300 | 300 | * Formats the amount so it can generally be sent to gateways |
301 | 301 | * @param float $amount |
302 | 302 | * @return string |
303 | - * @deprecated since 4.9.31 insetad use EventEspresso\core\services\payment_methods\gateways\GatewayDataFormatter::format_currency() |
|
303 | + * @deprecated since 4.9.31 insetad use EventEspresso\core\services\payment_methods\gateways\GatewayDataFormatter::format_currency() |
|
304 | 304 | */ |
305 | 305 | public function format_currency($amount){ |
306 | 306 | return $this->_get_gateway_formatter()->formatCurrency($amount); |
@@ -370,7 +370,7 @@ discard block |
||
370 | 370 | * Gets the first event for this payment (it's possible that it could be for multiple) |
371 | 371 | * @param EEI_Payment $payment |
372 | 372 | * @return EEI_Event|null |
373 | - * @deprecated since 4.9.31 instead use EEI_Payment::get_first_event() |
|
373 | + * @deprecated since 4.9.31 instead use EEI_Payment::get_first_event() |
|
374 | 374 | */ |
375 | 375 | protected function _get_first_event_for_payment( EEI_Payment $payment ) { |
376 | 376 | return $payment->get_first_event(); |
@@ -380,14 +380,14 @@ discard block |
||
380 | 380 | * Gets the name of the first event for which is being paid |
381 | 381 | * @param EEI_Payment $payment |
382 | 382 | * @return string |
383 | - * @deprecated since 4.9.31 instead use EEI_Payment::get_first_event_name() |
|
383 | + * @deprecated since 4.9.31 instead use EEI_Payment::get_first_event_name() |
|
384 | 384 | */ |
385 | 385 | protected function _get_first_event_name_for_payment( EEI_Payment $payment ) { |
386 | 386 | return $payment->get_first_event_name(); |
387 | 387 | } |
388 | 388 | /** |
389 | 389 | * Gets the text to use for a gateway's line item name when this is a partial payment |
390 | - * @deprecated since 4.9.31 instead use $this->_get_gateway_formatter()->formatPartialPaymentLineItemName($payment) |
|
390 | + * @deprecated since 4.9.31 instead use $this->_get_gateway_formatter()->formatPartialPaymentLineItemName($payment) |
|
391 | 391 | * @param EE_Payment $payment |
392 | 392 | * @return string |
393 | 393 | */ |
@@ -396,7 +396,7 @@ discard block |
||
396 | 396 | } |
397 | 397 | /** |
398 | 398 | * Gets the text to use for a gateway's line item description when this is a partial payment |
399 | - * @deprecated since 4.9.31 instead use $this->_get_gateway_formatter()->formatPartialPaymentLineItemDesc() |
|
399 | + * @deprecated since 4.9.31 instead use $this->_get_gateway_formatter()->formatPartialPaymentLineItemDesc() |
|
400 | 400 | * @param EEI_Payment $payment |
401 | 401 | * @return string |
402 | 402 | */ |
@@ -405,9 +405,9 @@ discard block |
||
405 | 405 | } |
406 | 406 | |
407 | 407 | /** |
408 | - * Gets the name to use for a line item when sending line items to the gateway |
|
409 | - * @deprecated since 4.9.31 instead use $this->_get_gateway_formatter()->formatLineItemName($line_item,$payment) |
|
410 | - * @param EEI_Line_Item $line_item |
|
408 | + * Gets the name to use for a line item when sending line items to the gateway |
|
409 | + * @deprecated since 4.9.31 instead use $this->_get_gateway_formatter()->formatLineItemName($line_item,$payment) |
|
410 | + * @param EEI_Line_Item $line_item |
|
411 | 411 | * @param EEI_Payment $payment |
412 | 412 | * @return string |
413 | 413 | */ |
@@ -417,7 +417,7 @@ discard block |
||
417 | 417 | |
418 | 418 | /** |
419 | 419 | * Gets the description to use for a line item when sending line items to the gateway |
420 | - * @deprecated since 4.9.31 instead use $this->_get_gateway_formatter()->formatLineItemDesc($line_item, $payment)) |
|
420 | + * @deprecated since 4.9.31 instead use $this->_get_gateway_formatter()->formatLineItemDesc($line_item, $payment)) |
|
421 | 421 | * @param EEI_Line_Item $line_item |
422 | 422 | * @param EEI_Payment $payment |
423 | 423 | * @return string |
@@ -428,7 +428,7 @@ discard block |
||
428 | 428 | |
429 | 429 | /** |
430 | 430 | * Gets the order description that should generlly be sent to gateways |
431 | - * @deprecated since 4.9.31 instead use $this->_get_gateway_formatter()->formatOrderDescription($payment) |
|
431 | + * @deprecated since 4.9.31 instead use $this->_get_gateway_formatter()->formatOrderDescription($payment) |
|
432 | 432 | * @param EEI_Payment $payment |
433 | 433 | * @return type |
434 | 434 | */ |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | * @subpackage core/libraries/payment_methods |
21 | 21 | * @author Mike Nelson |
22 | 22 | */ |
23 | -abstract class EE_Gateway{ |
|
23 | +abstract class EE_Gateway { |
|
24 | 24 | /** |
25 | 25 | * a constant used as a possible value for $_currencies_supported to indicate |
26 | 26 | * that ALL currencies are supported by this gateway |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | /** |
109 | 109 | * @return EE_Gateway |
110 | 110 | */ |
111 | - public function __construct(){ |
|
111 | + public function __construct() { |
|
112 | 112 | } |
113 | 113 | |
114 | 114 | /** |
@@ -120,9 +120,9 @@ discard block |
||
120 | 120 | * beginning again) |
121 | 121 | * @return array |
122 | 122 | */ |
123 | - public function __sleep(){ |
|
123 | + public function __sleep() { |
|
124 | 124 | $properties = get_object_vars($this); |
125 | - unset( $properties[ '_pay_model' ], $properties[ '_pay_log' ] ); |
|
125 | + unset($properties['_pay_model'], $properties['_pay_log']); |
|
126 | 126 | return array_keys($properties); |
127 | 127 | } |
128 | 128 | /** |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | * see $_supports_sending_refunds |
131 | 131 | * @return boolean |
132 | 132 | */ |
133 | - public function supports_sending_refunds(){ |
|
133 | + public function supports_sending_refunds() { |
|
134 | 134 | return $this->_supports_sending_refunds; |
135 | 135 | } |
136 | 136 | /** |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | * see $_supports_receiving_refunds |
139 | 139 | * @return boolean |
140 | 140 | */ |
141 | - public function supports_receiving_refunds(){ |
|
141 | + public function supports_receiving_refunds() { |
|
142 | 142 | return $this->_supports_receiving_refunds; |
143 | 143 | } |
144 | 144 | |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | * @return EE_Payment for the refund |
154 | 154 | * @throws EE_Error |
155 | 155 | */ |
156 | - public function do_direct_refund( EE_Payment $payment, $refund_info = null ) { |
|
156 | + public function do_direct_refund(EE_Payment $payment, $refund_info = null) { |
|
157 | 157 | return NULL; |
158 | 158 | } |
159 | 159 | |
@@ -164,8 +164,8 @@ discard block |
||
164 | 164 | * etc |
165 | 165 | * @param array $settings_array |
166 | 166 | */ |
167 | - public function set_settings($settings_array){ |
|
168 | - foreach($settings_array as $name => $value){ |
|
167 | + public function set_settings($settings_array) { |
|
168 | + foreach ($settings_array as $name => $value) { |
|
169 | 169 | $property_name = "_".$name; |
170 | 170 | $this->{$property_name} = $value; |
171 | 171 | } |
@@ -174,14 +174,14 @@ discard block |
||
174 | 174 | * See this class description |
175 | 175 | * @param EEMI_Payment $payment_model |
176 | 176 | */ |
177 | - public function set_payment_model($payment_model){ |
|
177 | + public function set_payment_model($payment_model) { |
|
178 | 178 | $this->_pay_model = $payment_model; |
179 | 179 | } |
180 | 180 | /** |
181 | 181 | * See this class description |
182 | 182 | * @param EEMI_Payment_Log $payment_log_model |
183 | 183 | */ |
184 | - public function set_payment_log($payment_log_model){ |
|
184 | + public function set_payment_log($payment_log_model) { |
|
185 | 185 | $this->_pay_log = $payment_log_model; |
186 | 186 | } |
187 | 187 | |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | * See this class description |
190 | 190 | * @param EEHI_Template $template_helper |
191 | 191 | */ |
192 | - public function set_template_helper($template_helper){ |
|
192 | + public function set_template_helper($template_helper) { |
|
193 | 193 | $this->_template = $template_helper; |
194 | 194 | } |
195 | 195 | |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | * See this class description |
198 | 198 | * @param EEHI_Line_Item $line_item_helper |
199 | 199 | */ |
200 | - public function set_line_item_helper( $line_item_helper ){ |
|
200 | + public function set_line_item_helper($line_item_helper) { |
|
201 | 201 | $this->_line_item = $line_item_helper; |
202 | 202 | } |
203 | 203 | |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | * See this class description |
206 | 206 | * @param EEHI_Money $money_helper |
207 | 207 | */ |
208 | - public function set_money_helper( $money_helper ){ |
|
208 | + public function set_money_helper($money_helper) { |
|
209 | 209 | $this->_money = $money_helper; |
210 | 210 | } |
211 | 211 | |
@@ -216,12 +216,12 @@ discard block |
||
216 | 216 | * @param GatewayDataFormatterInterface $gateway_data_formatter |
217 | 217 | * @throws InvalidEntityException if it's not set properly |
218 | 218 | */ |
219 | - public function set_gateway_data_formatter( GatewayDataFormatterInterface $gateway_data_formatter){ |
|
220 | - if( ! $gateway_data_formatter instanceof GatewayDataFormatterInterface){ |
|
219 | + public function set_gateway_data_formatter(GatewayDataFormatterInterface $gateway_data_formatter) { |
|
220 | + if ( ! $gateway_data_formatter instanceof GatewayDataFormatterInterface) { |
|
221 | 221 | throw new InvalidEntityException( |
222 | 222 | is_object($gateway_data_formatter) |
223 | 223 | ? get_class($gateway_data_formatter) |
224 | - : esc_html__('Not an object','event_espresso'), |
|
224 | + : esc_html__('Not an object', 'event_espresso'), |
|
225 | 225 | '\\EventEspresso\\core\\services\\payment_methods\\gateways\\GatewayDataFormatterInterface' |
226 | 226 | ); |
227 | 227 | } |
@@ -233,12 +233,12 @@ discard block |
||
233 | 233 | * @return GatewayDataFormatterInterface |
234 | 234 | * @throws InvalidEntityException if it's not set properly |
235 | 235 | */ |
236 | - protected function _get_gateway_formatter(){ |
|
237 | - if( ! $this->_gateway_data_formatter instanceof GatewayDataFormatterInterface){ |
|
236 | + protected function _get_gateway_formatter() { |
|
237 | + if ( ! $this->_gateway_data_formatter instanceof GatewayDataFormatterInterface) { |
|
238 | 238 | throw new InvalidEntityException( |
239 | 239 | is_object($this->_gateway_data_formatter) |
240 | 240 | ? get_class($this->_gateway_data_formatter) |
241 | - : esc_html__('Not an object','event_espresso'), |
|
241 | + : esc_html__('Not an object', 'event_espresso'), |
|
242 | 242 | '\\EventEspresso\\core\\services\\payment_methods\\gateways\\GatewayDataFormatterInterface' |
243 | 243 | ); |
244 | 244 | } |
@@ -253,12 +253,12 @@ discard block |
||
253 | 253 | * @return FormatterInterface |
254 | 254 | * @throws InvalidEntityException |
255 | 255 | */ |
256 | - public function set_unsupported_character_remover( FormatterInterface $formatter){ |
|
257 | - if( ! $formatter instanceof FormatterInterface){ |
|
256 | + public function set_unsupported_character_remover(FormatterInterface $formatter) { |
|
257 | + if ( ! $formatter instanceof FormatterInterface) { |
|
258 | 258 | throw new InvalidEntityException( |
259 | 259 | is_object($formatter) |
260 | 260 | ? get_class($formatter) |
261 | - : esc_html__('Not an object','event_espresso'), |
|
261 | + : esc_html__('Not an object', 'event_espresso'), |
|
262 | 262 | '\\EventEspresso\\core\\services\\formatters\\FormatterInterface' |
263 | 263 | ); |
264 | 264 | } |
@@ -269,12 +269,12 @@ discard block |
||
269 | 269 | * @return FormatterInterface |
270 | 270 | * @throws InvalidEntityException |
271 | 271 | */ |
272 | - protected function _get_unsupported_character_remover(){ |
|
273 | - if( ! $this->_unsupported_character_remover instanceof FormatterInterface){ |
|
272 | + protected function _get_unsupported_character_remover() { |
|
273 | + if ( ! $this->_unsupported_character_remover instanceof FormatterInterface) { |
|
274 | 274 | throw new InvalidEntityException( |
275 | 275 | is_object($this->_unsupported_character_remover) |
276 | 276 | ? get_class($this->_unsupported_character_remover) |
277 | - : esc_html__('Not an object','event_espresso'), |
|
277 | + : esc_html__('Not an object', 'event_espresso'), |
|
278 | 278 | '\\EventEspresso\\core\\services\\formatters\\FormatterInterface' |
279 | 279 | ); |
280 | 280 | } |
@@ -286,15 +286,15 @@ discard block |
||
286 | 286 | * @param $message |
287 | 287 | * @param $payment |
288 | 288 | */ |
289 | - public function log($message,$payment){ |
|
290 | - if($payment instanceof EEI_Payment){ |
|
291 | - $type='Payment'; |
|
289 | + public function log($message, $payment) { |
|
290 | + if ($payment instanceof EEI_Payment) { |
|
291 | + $type = 'Payment'; |
|
292 | 292 | $id = $payment->ID(); |
293 | - }else{ |
|
293 | + } else { |
|
294 | 294 | $type = 'Payment_Method'; |
295 | 295 | $id = $this->_ID; |
296 | 296 | } |
297 | - $this->_pay_log->gateway_log($message,$id,$type); |
|
297 | + $this->_pay_log->gateway_log($message, $id, $type); |
|
298 | 298 | } |
299 | 299 | /** |
300 | 300 | * Formats the amount so it can generally be sent to gateways |
@@ -302,7 +302,7 @@ discard block |
||
302 | 302 | * @return string |
303 | 303 | * @deprecated since 4.9.31 insetad use EventEspresso\core\services\payment_methods\gateways\GatewayDataFormatter::format_currency() |
304 | 304 | */ |
305 | - public function format_currency($amount){ |
|
305 | + public function format_currency($amount) { |
|
306 | 306 | return $this->_get_gateway_formatter()->formatCurrency($amount); |
307 | 307 | } |
308 | 308 | |
@@ -311,7 +311,7 @@ discard block |
||
311 | 311 | * or a string indicating they're all supported (EE_gateway::all_currencies_supported) |
312 | 312 | * @return mixed array or string |
313 | 313 | */ |
314 | - public function currencies_supported(){ |
|
314 | + public function currencies_supported() { |
|
315 | 315 | return $this->_currencies_supported; |
316 | 316 | } |
317 | 317 | |
@@ -323,14 +323,14 @@ discard block |
||
323 | 323 | * @param EE_Transaction $transaction |
324 | 324 | * @return float |
325 | 325 | */ |
326 | - protected function _sum_items_and_taxes( EE_Transaction $transaction){ |
|
326 | + protected function _sum_items_and_taxes(EE_Transaction $transaction) { |
|
327 | 327 | $total_line_item = $transaction->total_line_item(); |
328 | 328 | $total = 0; |
329 | - foreach($total_line_item->get_items() as $item_line_item ){ |
|
330 | - $total += max( $item_line_item->total(), 0 ); |
|
329 | + foreach ($total_line_item->get_items() as $item_line_item) { |
|
330 | + $total += max($item_line_item->total(), 0); |
|
331 | 331 | } |
332 | - foreach($total_line_item->tax_descendants() as $tax_line_item ){ |
|
333 | - $total += max( $tax_line_item->total(), 0 ); |
|
332 | + foreach ($total_line_item->tax_descendants() as $tax_line_item) { |
|
333 | + $total += max($tax_line_item->total(), 0); |
|
334 | 334 | } |
335 | 335 | return $total; |
336 | 336 | } |
@@ -341,9 +341,9 @@ discard block |
||
341 | 341 | * @param EEI_Payment $payment |
342 | 342 | * @return boolean |
343 | 343 | */ |
344 | - protected function _can_easily_itemize_transaction_for( EEI_Payment $payment ){ |
|
344 | + protected function _can_easily_itemize_transaction_for(EEI_Payment $payment) { |
|
345 | 345 | return $this->_money->compare_floats( |
346 | - $this->_sum_items_and_taxes( $payment->transaction() ), |
|
346 | + $this->_sum_items_and_taxes($payment->transaction()), |
|
347 | 347 | $payment->transaction()->total() ) && |
348 | 348 | $this->_money->compare_floats( |
349 | 349 | $payment->amount(), |
@@ -361,7 +361,7 @@ discard block |
||
361 | 361 | * @param EE_Payment $payment |
362 | 362 | * @return void |
363 | 363 | */ |
364 | - public function update_txn_based_on_payment( $payment ){ |
|
364 | + public function update_txn_based_on_payment($payment) { |
|
365 | 365 | //maybe update the transaction or line items or registrations |
366 | 366 | //but most gateways don't need to do this, because they only update the payment |
367 | 367 | } |
@@ -372,7 +372,7 @@ discard block |
||
372 | 372 | * @return EEI_Event|null |
373 | 373 | * @deprecated since 4.9.31 instead use EEI_Payment::get_first_event() |
374 | 374 | */ |
375 | - protected function _get_first_event_for_payment( EEI_Payment $payment ) { |
|
375 | + protected function _get_first_event_for_payment(EEI_Payment $payment) { |
|
376 | 376 | return $payment->get_first_event(); |
377 | 377 | } |
378 | 378 | |
@@ -382,7 +382,7 @@ discard block |
||
382 | 382 | * @return string |
383 | 383 | * @deprecated since 4.9.31 instead use EEI_Payment::get_first_event_name() |
384 | 384 | */ |
385 | - protected function _get_first_event_name_for_payment( EEI_Payment $payment ) { |
|
385 | + protected function _get_first_event_name_for_payment(EEI_Payment $payment) { |
|
386 | 386 | return $payment->get_first_event_name(); |
387 | 387 | } |
388 | 388 | /** |
@@ -391,7 +391,7 @@ discard block |
||
391 | 391 | * @param EE_Payment $payment |
392 | 392 | * @return string |
393 | 393 | */ |
394 | - protected function _format_partial_payment_line_item_name( EEI_Payment $payment ){ |
|
394 | + protected function _format_partial_payment_line_item_name(EEI_Payment $payment) { |
|
395 | 395 | return $this->_get_gateway_formatter()->formatPartialPaymentLineItemName($payment); |
396 | 396 | } |
397 | 397 | /** |
@@ -400,7 +400,7 @@ discard block |
||
400 | 400 | * @param EEI_Payment $payment |
401 | 401 | * @return string |
402 | 402 | */ |
403 | - protected function _format_partial_payment_line_item_desc( EEI_Payment $payment ) { |
|
403 | + protected function _format_partial_payment_line_item_desc(EEI_Payment $payment) { |
|
404 | 404 | return $this->_get_gateway_formatter()->formatPartialPaymentLineItemDesc($payment); |
405 | 405 | } |
406 | 406 | |
@@ -411,8 +411,8 @@ discard block |
||
411 | 411 | * @param EEI_Payment $payment |
412 | 412 | * @return string |
413 | 413 | */ |
414 | - protected function _format_line_item_name( EEI_Line_Item $line_item, EEI_Payment $payment ) { |
|
415 | - return $this->_get_gateway_formatter()->formatLineItemName($line_item,$payment); |
|
414 | + protected function _format_line_item_name(EEI_Line_Item $line_item, EEI_Payment $payment) { |
|
415 | + return $this->_get_gateway_formatter()->formatLineItemName($line_item, $payment); |
|
416 | 416 | } |
417 | 417 | |
418 | 418 | /** |
@@ -422,7 +422,7 @@ discard block |
||
422 | 422 | * @param EEI_Payment $payment |
423 | 423 | * @return string |
424 | 424 | */ |
425 | - protected function _format_line_item_desc( EEI_Line_Item $line_item, EEI_Payment $payment ) { |
|
425 | + protected function _format_line_item_desc(EEI_Line_Item $line_item, EEI_Payment $payment) { |
|
426 | 426 | return $this->_get_gateway_formatter()->formatLineItemDesc($line_item, $payment); |
427 | 427 | } |
428 | 428 | |
@@ -432,7 +432,7 @@ discard block |
||
432 | 432 | * @param EEI_Payment $payment |
433 | 433 | * @return type |
434 | 434 | */ |
435 | - protected function _format_order_description( EEI_Payment $payment ) { |
|
435 | + protected function _format_order_description(EEI_Payment $payment) { |
|
436 | 436 | return $this->_get_gateway_formatter()->formatOrderDescription($payment); |
437 | 437 | } |
438 | 438 | } |
439 | 439 | \ No newline at end of file |
@@ -430,7 +430,7 @@ |
||
430 | 430 | * Gets the order description that should generlly be sent to gateways |
431 | 431 | * @deprecated since 4.9.31 instead use $this->_get_gateway_formatter()->formatOrderDescription($payment) |
432 | 432 | * @param EEI_Payment $payment |
433 | - * @return type |
|
433 | + * @return string |
|
434 | 434 | */ |
435 | 435 | protected function _format_order_description( EEI_Payment $payment ) { |
436 | 436 | return $this->_get_gateway_formatter()->formatOrderDescription($payment); |
@@ -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 | } |