@@ -3,27 +3,27 @@ |
||
3 | 3 | if (!defined('EVENT_ESPRESSO_VERSION')) |
4 | 4 | exit('No direct script access allowed'); |
5 | 5 | /** |
6 | - * Event Espresso |
|
7 | - * |
|
8 | - * Event Registration and Management Plugin for WordPress |
|
9 | - * |
|
10 | - * @ package Event Espresso |
|
11 | - * @ author Seth Shoultes |
|
12 | - * @ copyright (c) 2008-2011 Event Espresso All Rights Reserved. |
|
13 | - * @ license http://eventespresso.com/support/terms-conditions/ * see Plugin Licensing * |
|
14 | - * @ link http://www.eventespresso.com |
|
15 | - * @ version 4.3 |
|
16 | - * |
|
17 | - * ------------------------------------------------------------------------ |
|
18 | - * |
|
19 | - * invoice_payment_details_content |
|
20 | - * |
|
21 | - * @package Event Espresso |
|
22 | - * @subpackage |
|
23 | - * @author Mike Nelson |
|
24 | - * |
|
25 | - * ------------------------------------------------------------------------ |
|
26 | - */ |
|
6 | + * Event Espresso |
|
7 | + * |
|
8 | + * Event Registration and Management Plugin for WordPress |
|
9 | + * |
|
10 | + * @ package Event Espresso |
|
11 | + * @ author Seth Shoultes |
|
12 | + * @ copyright (c) 2008-2011 Event Espresso All Rights Reserved. |
|
13 | + * @ license http://eventespresso.com/support/terms-conditions/ * see Plugin Licensing * |
|
14 | + * @ link http://www.eventespresso.com |
|
15 | + * @ version 4.3 |
|
16 | + * |
|
17 | + * ------------------------------------------------------------------------ |
|
18 | + * |
|
19 | + * invoice_payment_details_content |
|
20 | + * |
|
21 | + * @package Event Espresso |
|
22 | + * @subpackage |
|
23 | + * @author Mike Nelson |
|
24 | + * |
|
25 | + * ------------------------------------------------------------------------ |
|
26 | + */ |
|
27 | 27 | ?> |
28 | 28 | <div class="event-display-boxes"> |
29 | 29 | <?php |
@@ -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 | * Event Espresso |
@@ -27,10 +27,10 @@ discard block |
||
27 | 27 | ?> |
28 | 28 | <div class="event-display-boxes"> |
29 | 29 | <?php |
30 | - if ( ! empty( $page_title )) { |
|
31 | - echo '<h4 id="invoice_title" class="payment_type_title section-heading">' . stripslashes_deep( $page_title ) . '</h4>'; |
|
30 | + if ( ! empty($page_title)) { |
|
31 | + echo '<h4 id="invoice_title" class="payment_type_title section-heading">'.stripslashes_deep($page_title).'</h4>'; |
|
32 | 32 | } |
33 | - if ( ! empty( $invoice_url )) { |
|
33 | + if ( ! empty($invoice_url)) { |
|
34 | 34 | ?> |
35 | 35 | <p> |
36 | 36 | <a href="<?php echo $invoice_url; ?>" class="ee-button-lnk inline-button" target="_blank"> |
@@ -40,10 +40,10 @@ discard block |
||
40 | 40 | <?php |
41 | 41 | |
42 | 42 | if (isset($page_confirmation_text)) { |
43 | - echo '<div class="event-messages ui-state-highlight"><span class="ui-icon ui-icon-alert"></span><p class="instruct">' . stripslashes_deep($page_confirmation_text) . '</p></div>'; |
|
43 | + echo '<div class="event-messages ui-state-highlight"><span class="ui-icon ui-icon-alert"></span><p class="instruct">'.stripslashes_deep($page_confirmation_text).'</p></div>'; |
|
44 | 44 | } |
45 | 45 | |
46 | - if ( ! empty( $page_extra_info )) { |
|
46 | + if ( ! empty($page_extra_info)) { |
|
47 | 47 | ?> |
48 | 48 | <div class="address-block"> |
49 | 49 | <?php echo wpautop(stripslashes_deep($page_extra_info)); ?> |
@@ -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 | * Event Espresso |
7 | 8 | * |
@@ -3,27 +3,27 @@ |
||
3 | 3 | if (!defined('EVENT_ESPRESSO_VERSION')) |
4 | 4 | exit('No direct script access allowed'); |
5 | 5 | /** |
6 | - * Event Espresso |
|
7 | - * |
|
8 | - * Event Registration and Management Plugin for WordPress |
|
9 | - * |
|
10 | - * @ package Event Espresso |
|
11 | - * @ author Seth Shoultes |
|
12 | - * @ copyright (c) 2008-2011 Event Espresso All Rights Reserved. |
|
13 | - * @ license http://eventespresso.com/support/terms-conditions/ * see Plugin Licensing * |
|
14 | - * @ link http://www.eventespresso.com |
|
15 | - * @ version 4.3 |
|
16 | - * |
|
17 | - * ------------------------------------------------------------------------ |
|
18 | - * |
|
19 | - * invoice_settings_header_display |
|
20 | - * |
|
21 | - * @package Event Espresso |
|
22 | - * @subpackage |
|
23 | - * @author Mike Nelson |
|
24 | - * |
|
25 | - * ------------------------------------------------------------------------ |
|
26 | - */ |
|
6 | + * Event Espresso |
|
7 | + * |
|
8 | + * Event Registration and Management Plugin for WordPress |
|
9 | + * |
|
10 | + * @ package Event Espresso |
|
11 | + * @ author Seth Shoultes |
|
12 | + * @ copyright (c) 2008-2011 Event Espresso All Rights Reserved. |
|
13 | + * @ license http://eventespresso.com/support/terms-conditions/ * see Plugin Licensing * |
|
14 | + * @ link http://www.eventespresso.com |
|
15 | + * @ version 4.3 |
|
16 | + * |
|
17 | + * ------------------------------------------------------------------------ |
|
18 | + * |
|
19 | + * invoice_settings_header_display |
|
20 | + * |
|
21 | + * @package Event Espresso |
|
22 | + * @subpackage |
|
23 | + * @author Mike Nelson |
|
24 | + * |
|
25 | + * ------------------------------------------------------------------------ |
|
26 | + */ |
|
27 | 27 | ?> |
28 | 28 | <tr> |
29 | 29 | <th><h4><?php _e("Invoice Display Settings", 'event_espresso');?></h4></th> |
@@ -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 | * Event Espresso |
@@ -26,9 +26,9 @@ discard block |
||
26 | 26 | */ |
27 | 27 | ?> |
28 | 28 | <tr> |
29 | - <th><h4><?php _e("Invoice Display Settings", 'event_espresso');?></h4></th> |
|
29 | + <th><h4><?php _e("Invoice Display Settings", 'event_espresso'); ?></h4></th> |
|
30 | 30 | <td> |
31 | - <span class="description"><?php _e("The following settings affect the content and/or appearance of the downloadable PDF invoice.", 'event_espresso');?></span> |
|
31 | + <span class="description"><?php _e("The following settings affect the content and/or appearance of the downloadable PDF invoice.", 'event_espresso'); ?></span> |
|
32 | 32 | </td> |
33 | 33 | </tr> |
34 | 34 | <?php |
@@ -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 | * Event Espresso |
7 | 8 | * |
@@ -3,27 +3,27 @@ |
||
3 | 3 | if (!defined('EVENT_ESPRESSO_VERSION')) |
4 | 4 | exit('No direct script access allowed'); |
5 | 5 | /** |
6 | - * Event Espresso |
|
7 | - * |
|
8 | - * Event Registration and Management Plugin for WordPress |
|
9 | - * |
|
10 | - * @ package Event Espresso |
|
11 | - * @ author Seth Shoultes |
|
12 | - * @ copyright (c) 2008-2011 Event Espresso All Rights Reserved. |
|
13 | - * @ license http://eventespresso.com/support/terms-conditions/ * see Plugin Licensing * |
|
14 | - * @ link http://www.eventespresso.com |
|
15 | - * @ version 4.3 |
|
16 | - * |
|
17 | - * ------------------------------------------------------------------------ |
|
18 | - * |
|
19 | - * invoice_settings_header_gateway |
|
20 | - * |
|
21 | - * @package Event Espresso |
|
22 | - * @subpackage |
|
23 | - * @author Mike Nelson |
|
24 | - * |
|
25 | - * ------------------------------------------------------------------------ |
|
26 | - */ |
|
6 | + * Event Espresso |
|
7 | + * |
|
8 | + * Event Registration and Management Plugin for WordPress |
|
9 | + * |
|
10 | + * @ package Event Espresso |
|
11 | + * @ author Seth Shoultes |
|
12 | + * @ copyright (c) 2008-2011 Event Espresso All Rights Reserved. |
|
13 | + * @ license http://eventespresso.com/support/terms-conditions/ * see Plugin Licensing * |
|
14 | + * @ link http://www.eventespresso.com |
|
15 | + * @ version 4.3 |
|
16 | + * |
|
17 | + * ------------------------------------------------------------------------ |
|
18 | + * |
|
19 | + * invoice_settings_header_gateway |
|
20 | + * |
|
21 | + * @package Event Espresso |
|
22 | + * @subpackage |
|
23 | + * @author Mike Nelson |
|
24 | + * |
|
25 | + * ------------------------------------------------------------------------ |
|
26 | + */ |
|
27 | 27 | ?> |
28 | 28 | <tr> |
29 | 29 | <th><h4><?php _e("Invoice Gateway Settings", 'event_espresso');?></h4></th> |
@@ -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 | * Event Espresso |
@@ -26,9 +26,9 @@ discard block |
||
26 | 26 | */ |
27 | 27 | ?> |
28 | 28 | <tr> |
29 | - <th><h4><?php _e("Invoice Gateway Settings", 'event_espresso');?></h4></th> |
|
29 | + <th><h4><?php _e("Invoice Gateway Settings", 'event_espresso'); ?></h4></th> |
|
30 | 30 | <td> |
31 | - <span class="description"><?php _e("The following settings affect the functioning of the Invoice gateway.", 'event_espresso');?></span> |
|
31 | + <span class="description"><?php _e("The following settings affect the functioning of the Invoice gateway.", 'event_espresso'); ?></span> |
|
32 | 32 | </td> |
33 | 33 | </tr> |
34 | 34 | <?php |
@@ -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 | * Event Espresso |
7 | 8 | * |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | parent::set_settings($settings_array); |
78 | 78 | if($this->_debug_mode){ |
79 | 79 | $this->_gateway_url = 'https://www.sandbox.paypal.com/cgi-bin/webscr'; |
80 | - }else{ |
|
80 | + } else{ |
|
81 | 81 | $this->_gateway_url = 'https://www.paypal.com/cgi-bin/webscr'; |
82 | 82 | } |
83 | 83 | } |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | if( ! $this->_paypal_taxes ){ |
127 | 127 | $redirect_args['tax_cart'] = $total_line_item->get_total_tax(); |
128 | 128 | } |
129 | - }else{ |
|
129 | + } else{ |
|
130 | 130 | //this is a partial payment, so we can't really show all the line items |
131 | 131 | $redirect_args['item_name_' . $item_num] = substr( sprintf(__('Payment of %1$s for %2$s', "event_espresso"),$payment->amount(), $primary_registrant->reg_code()), 0, 127 ); |
132 | 132 | $redirect_args['amount_' . $item_num] = $payment->amount(); |
@@ -306,8 +306,9 @@ discard block |
||
306 | 306 | $update_info = array(); |
307 | 307 | foreach ( $raw_post_array as $keyval ) { |
308 | 308 | $keyval = explode( '=', $keyval ); |
309 | - if ( count( $keyval ) == 2 ) |
|
310 | - $update_info[ $keyval[ 0 ] ] = urldecode( $keyval[ 1 ] ); |
|
309 | + if ( count( $keyval ) == 2 ) { |
|
310 | + $update_info[ $keyval[ 0 ] ] = urldecode( $keyval[ 1 ] ); |
|
311 | + } |
|
311 | 312 | } |
312 | 313 | // read the IPN message sent from PayPal and prepend 'cmd=_notify-validate' |
313 | 314 | $req = 'cmd=_notify-validate'; |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | * @return EEG_Paypal_Standard |
64 | 64 | */ |
65 | 65 | public function __construct() { |
66 | - $this->set_uses_separate_IPN_request( true ) ; |
|
66 | + $this->set_uses_separate_IPN_request(true); |
|
67 | 67 | parent::__construct(); |
68 | 68 | } |
69 | 69 | |
@@ -73,11 +73,11 @@ discard block |
||
73 | 73 | * Also sets the gateway url class variable based on whether debug mode is enabled or not |
74 | 74 | * @param array $settings_array |
75 | 75 | */ |
76 | - public function set_settings($settings_array){ |
|
76 | + public function set_settings($settings_array) { |
|
77 | 77 | parent::set_settings($settings_array); |
78 | - if($this->_debug_mode){ |
|
78 | + if ($this->_debug_mode) { |
|
79 | 79 | $this->_gateway_url = 'https://www.sandbox.paypal.com/cgi-bin/webscr'; |
80 | - }else{ |
|
80 | + } else { |
|
81 | 81 | $this->_gateway_url = 'https://www.paypal.com/cgi-bin/webscr'; |
82 | 82 | } |
83 | 83 | } |
@@ -92,47 +92,47 @@ discard block |
||
92 | 92 | * @param string $cancel_url URL to send the user to after a cancelled payment attempt on teh payment provider's website |
93 | 93 | * @return EEI_Payment |
94 | 94 | */ |
95 | - public function set_redirection_info( $payment, $billing_info = array(), $return_url = NULL, $notify_url = NULL, $cancel_url = NULL ){ |
|
95 | + public function set_redirection_info($payment, $billing_info = array(), $return_url = NULL, $notify_url = NULL, $cancel_url = NULL) { |
|
96 | 96 | $redirect_args = array(); |
97 | 97 | $transaction = $payment->transaction(); |
98 | 98 | $primary_registrant = $transaction->primary_registration(); |
99 | 99 | $item_num = 1; |
100 | 100 | $total_line_item = $transaction->total_line_item(); |
101 | - if( $this->_can_easily_itemize_transaction_for( $payment ) ){ |
|
101 | + if ($this->_can_easily_itemize_transaction_for($payment)) { |
|
102 | 102 | //this payment is for the entire transaction, |
103 | 103 | //so let's show all the line items |
104 | - foreach($total_line_item->get_items() as $line_item){ |
|
105 | - if ( $line_item instanceof EE_Line_Item ) { |
|
104 | + foreach ($total_line_item->get_items() as $line_item) { |
|
105 | + if ($line_item instanceof EE_Line_Item) { |
|
106 | 106 | //if this is a re-attempt at paying, don't re-add PayPal's shipping |
107 | - if ( $line_item->code() == 'paypal_shipping' ) { |
|
107 | + if ($line_item->code() == 'paypal_shipping') { |
|
108 | 108 | continue; |
109 | 109 | } |
110 | - $redirect_args[ 'item_name_' . $item_num ] = substr( |
|
111 | - sprintf( __( '%1$s for %2$s', 'event_espresso' ), $line_item->name(), $line_item->ticket_event_name() ), 0, 127 ); |
|
112 | - $redirect_args[ 'amount_' . $item_num ] = $line_item->unit_price(); |
|
113 | - $redirect_args[ 'quantity_' . $item_num ] = $line_item->quantity(); |
|
114 | - if ( ! $line_item->is_taxable() ) { |
|
115 | - $redirect_args[ 'tax_' . $item_num ] = 0; |
|
110 | + $redirect_args['item_name_'.$item_num] = substr( |
|
111 | + sprintf(__('%1$s for %2$s', 'event_espresso'), $line_item->name(), $line_item->ticket_event_name()), 0, 127 ); |
|
112 | + $redirect_args['amount_'.$item_num] = $line_item->unit_price(); |
|
113 | + $redirect_args['quantity_'.$item_num] = $line_item->quantity(); |
|
114 | + if ( ! $line_item->is_taxable()) { |
|
115 | + $redirect_args['tax_'.$item_num] = 0; |
|
116 | 116 | } |
117 | 117 | //if we're not letting PayPal calculate shipping, tell them its 0 |
118 | - if ( ! $this->_paypal_shipping ) { |
|
119 | - $redirect_args[ 'shipping_' . $item_num ] = '0'; |
|
120 | - $redirect_args[ 'shipping2_' . $item_num ] = '0'; |
|
118 | + if ( ! $this->_paypal_shipping) { |
|
119 | + $redirect_args['shipping_'.$item_num] = '0'; |
|
120 | + $redirect_args['shipping2_'.$item_num] = '0'; |
|
121 | 121 | } |
122 | 122 | $item_num++; |
123 | 123 | } |
124 | 124 | } |
125 | 125 | //add our taxes to the order if we're NOT using PayPal's |
126 | - if( ! $this->_paypal_taxes ){ |
|
126 | + if ( ! $this->_paypal_taxes) { |
|
127 | 127 | $redirect_args['tax_cart'] = $total_line_item->get_total_tax(); |
128 | 128 | } |
129 | - }else{ |
|
129 | + } else { |
|
130 | 130 | //this is a partial payment, so we can't really show all the line items |
131 | - $redirect_args['item_name_' . $item_num] = substr( sprintf(__('Payment of %1$s for %2$s', "event_espresso"),$payment->amount(), $primary_registrant->reg_code()), 0, 127 ); |
|
132 | - $redirect_args['amount_' . $item_num] = $payment->amount(); |
|
131 | + $redirect_args['item_name_'.$item_num] = substr(sprintf(__('Payment of %1$s for %2$s', "event_espresso"), $payment->amount(), $primary_registrant->reg_code()), 0, 127); |
|
132 | + $redirect_args['amount_'.$item_num] = $payment->amount(); |
|
133 | 133 | //if we aren't allowing PayPal to calculate shipping, set it to 0 |
134 | - $redirect_args['shipping_' . $item_num ] = '0'; |
|
135 | - $redirect_args['shipping2_' . $item_num ] = '0'; |
|
134 | + $redirect_args['shipping_'.$item_num] = '0'; |
|
135 | + $redirect_args['shipping2_'.$item_num] = '0'; |
|
136 | 136 | //PayPal can't calculate taxes because we don't know what parts of it are taxable |
137 | 137 | $redirect_args['tax_cart'] = '0'; |
138 | 138 | |
@@ -141,16 +141,16 @@ discard block |
||
141 | 141 | |
142 | 142 | |
143 | 143 | } |
144 | - if($this->_debug_mode){ |
|
145 | - $redirect_args['item_name_' . $item_num] = 'DEBUG INFO (this item only added in sandbox mode'; |
|
146 | - $redirect_args['amount_' . $item_num] = 0; |
|
144 | + if ($this->_debug_mode) { |
|
145 | + $redirect_args['item_name_'.$item_num] = 'DEBUG INFO (this item only added in sandbox mode'; |
|
146 | + $redirect_args['amount_'.$item_num] = 0; |
|
147 | 147 | $redirect_args['on0_'.$item_num] = 'NOTIFY URL'; |
148 | - $redirect_args['os0_' . $item_num] = $notify_url; |
|
148 | + $redirect_args['os0_'.$item_num] = $notify_url; |
|
149 | 149 | $redirect_args['on1_'.$item_num] = 'RETURN URL'; |
150 | - $redirect_args['os1_' . $item_num] = $return_url; |
|
150 | + $redirect_args['os1_'.$item_num] = $return_url; |
|
151 | 151 | // $redirect_args['option_index_' . $item_num] = 1; // <-- dunno if this is needed ? |
152 | - $redirect_args['shipping_' . $item_num ] = '0'; |
|
153 | - $redirect_args['shipping2_' . $item_num ] = '0'; |
|
152 | + $redirect_args['shipping_'.$item_num] = '0'; |
|
153 | + $redirect_args['shipping2_'.$item_num] = '0'; |
|
154 | 154 | } |
155 | 155 | |
156 | 156 | $redirect_args['business'] = $this->_paypal_id; |
@@ -160,14 +160,14 @@ discard block |
||
160 | 160 | $redirect_args['cmd'] = '_cart'; |
161 | 161 | $redirect_args['upload'] = 1; |
162 | 162 | $redirect_args['currency_code'] = $payment->currency_code(); |
163 | - $redirect_args['rm'] = 2;//makes the user return with method=POST |
|
164 | - if($this->_image_url){ |
|
163 | + $redirect_args['rm'] = 2; //makes the user return with method=POST |
|
164 | + if ($this->_image_url) { |
|
165 | 165 | $redirect_args['image_url'] = $this->_image_url; |
166 | 166 | } |
167 | 167 | $redirect_args['no_shipping'] = $this->_shipping_details; |
168 | - $redirect_args['bn'] = 'EventEspresso_SP';//EE will blow up if you change this |
|
168 | + $redirect_args['bn'] = 'EventEspresso_SP'; //EE will blow up if you change this |
|
169 | 169 | |
170 | - $redirect_args = apply_filters( "FHEE__EEG_Paypal_Standard__set_redirection_info__arguments", $redirect_args ); |
|
170 | + $redirect_args = apply_filters("FHEE__EEG_Paypal_Standard__set_redirection_info__arguments", $redirect_args); |
|
171 | 171 | |
172 | 172 | $payment->set_redirect_url($this->_gateway_url); |
173 | 173 | $payment->set_redirect_args($redirect_args); |
@@ -185,55 +185,55 @@ discard block |
||
185 | 185 | * @return \EEI_Payment updated |
186 | 186 | * @throws \EE_Error |
187 | 187 | */ |
188 | - public function handle_payment_update( $update_info, $transaction ){ |
|
188 | + public function handle_payment_update($update_info, $transaction) { |
|
189 | 189 | //verify there's payment data that's been sent |
190 | - if ( empty( $update_info[ 'payment_status' ] ) || empty( $update_info[ 'txn_id' ] ) ) { |
|
190 | + if (empty($update_info['payment_status']) || empty($update_info['txn_id'])) { |
|
191 | 191 | // waaaait... is this a PDT request? (see https://developer.paypal.com/docs/classic/products/payment-data-transfer/) |
192 | 192 | // indicated by the "tx" argument? If so, we don't need it. We'll just use the IPN data when it comes |
193 | - if ( isset( $update_info[ 'tx' ] ) ) { |
|
193 | + if (isset($update_info['tx'])) { |
|
194 | 194 | return $transaction->last_payment(); |
195 | 195 | } else { |
196 | 196 | return null; |
197 | 197 | } |
198 | 198 | } |
199 | - $payment = $this->_pay_model->get_payment_by_txn_id_chq_nmbr( $update_info[ 'txn_id' ] ); |
|
200 | - if ( ! $payment instanceof EEI_Payment ) { |
|
199 | + $payment = $this->_pay_model->get_payment_by_txn_id_chq_nmbr($update_info['txn_id']); |
|
200 | + if ( ! $payment instanceof EEI_Payment) { |
|
201 | 201 | $payment = $transaction->last_payment(); |
202 | 202 | } |
203 | 203 | // ok, then validate the IPN. Even if we've already processed this payment, |
204 | 204 | // let PayPal know we don't want to hear from them anymore! |
205 | - if ( ! $this->validate_ipn( $update_info, $payment ) ) { |
|
205 | + if ( ! $this->validate_ipn($update_info, $payment)) { |
|
206 | 206 | return $payment; |
207 | 207 | } |
208 | 208 | //ok, well let's process this payment then! |
209 | - switch ( $update_info[ 'payment_status' ] ) { |
|
209 | + switch ($update_info['payment_status']) { |
|
210 | 210 | |
211 | 211 | case 'Completed' : |
212 | 212 | $status = $this->_pay_model->approved_status(); |
213 | - $gateway_response = __( 'The payment is approved.', 'event_espresso' ); |
|
213 | + $gateway_response = __('The payment is approved.', 'event_espresso'); |
|
214 | 214 | break; |
215 | 215 | |
216 | 216 | case 'Pending' : |
217 | 217 | $status = $this->_pay_model->pending_status(); |
218 | - $gateway_response = __( 'The payment is in progress. Another message will be sent when payment is approved.', 'event_espresso' ); |
|
218 | + $gateway_response = __('The payment is in progress. Another message will be sent when payment is approved.', 'event_espresso'); |
|
219 | 219 | break; |
220 | 220 | |
221 | 221 | case 'Denied' : |
222 | 222 | $status = $this->_pay_model->declined_status(); |
223 | - $gateway_response = __( 'The payment has been declined.', 'event_espresso' ); |
|
223 | + $gateway_response = __('The payment has been declined.', 'event_espresso'); |
|
224 | 224 | break; |
225 | 225 | |
226 | 226 | case 'Expired' : |
227 | 227 | case 'Failed' : |
228 | 228 | $status = $this->_pay_model->failed_status(); |
229 | - $gateway_response = __( 'The payment failed for technical reasons or expired.', 'event_espresso' ); |
|
229 | + $gateway_response = __('The payment failed for technical reasons or expired.', 'event_espresso'); |
|
230 | 230 | break; |
231 | 231 | |
232 | 232 | case 'Refunded' : |
233 | 233 | case 'Partially_Refunded' : |
234 | 234 | // even though it's a refund, we consider the payment as approved, it just has a negative value |
235 | 235 | $status = $this->_pay_model->approved_status(); |
236 | - $gateway_response = __( 'The payment has been refunded. Please update registrations accordingly.', 'event_espresso' ); |
|
236 | + $gateway_response = __('The payment has been refunded. Please update registrations accordingly.', 'event_espresso'); |
|
237 | 237 | break; |
238 | 238 | |
239 | 239 | case 'Voided' : |
@@ -241,25 +241,25 @@ discard block |
||
241 | 241 | case 'Canceled_Reversal' : |
242 | 242 | default : |
243 | 243 | $status = $this->_pay_model->cancelled_status(); |
244 | - $gateway_response = __( 'The payment was cancelled, reversed, or voided. Please update registrations accordingly.', 'event_espresso' ); |
|
244 | + $gateway_response = __('The payment was cancelled, reversed, or voided. Please update registrations accordingly.', 'event_espresso'); |
|
245 | 245 | break; |
246 | 246 | |
247 | 247 | } |
248 | 248 | |
249 | 249 | //check if we've already processed this payment |
250 | - if ( $payment instanceof EEI_Payment ) { |
|
250 | + if ($payment instanceof EEI_Payment) { |
|
251 | 251 | //payment exists. if this has the exact same status and amount, don't bother updating. just return |
252 | - if ( $payment->status() == $status && $payment->amount() == $update_info[ 'mc_gross' ] ) { |
|
252 | + if ($payment->status() == $status && $payment->amount() == $update_info['mc_gross']) { |
|
253 | 253 | // DUPLICATED IPN! dont bother updating transaction foo!; |
254 | - $message_log = sprintf( __( 'It appears we have received a duplicate IPN from PayPal for payment %d', 'event_espresso' ), $payment->ID() ); |
|
254 | + $message_log = sprintf(__('It appears we have received a duplicate IPN from PayPal for payment %d', 'event_espresso'), $payment->ID()); |
|
255 | 255 | } else { |
256 | 256 | // new payment yippee !!! |
257 | - $payment->set_status( $status ); |
|
258 | - $payment->set_amount( floatval( $update_info[ 'mc_gross' ] ) ); |
|
259 | - $payment->set_gateway_response( $gateway_response ); |
|
260 | - $payment->set_details( $update_info ); |
|
261 | - $payment->set_txn_id_chq_nmbr( $update_info[ 'txn_id' ] ); |
|
262 | - $message_log = sprintf( __( 'Updated payment either from IPN or as part of POST from PayPal', 'event_espresso' ) ); |
|
257 | + $payment->set_status($status); |
|
258 | + $payment->set_amount(floatval($update_info['mc_gross'])); |
|
259 | + $payment->set_gateway_response($gateway_response); |
|
260 | + $payment->set_details($update_info); |
|
261 | + $payment->set_txn_id_chq_nmbr($update_info['txn_id']); |
|
262 | + $message_log = sprintf(__('Updated payment either from IPN or as part of POST from PayPal', 'event_espresso')); |
|
263 | 263 | } |
264 | 264 | $this->log( |
265 | 265 | array( |
@@ -271,11 +271,11 @@ discard block |
||
271 | 271 | $payment |
272 | 272 | ); |
273 | 273 | } |
274 | - do_action( 'FHEE__EEG_Paypal_Standard__handle_payment_update__payment_processed', $payment, $this ); |
|
274 | + do_action('FHEE__EEG_Paypal_Standard__handle_payment_update__payment_processed', $payment, $this); |
|
275 | 275 | // kill request here if this is a refund |
276 | - if ( $update_info[ 'payment_status' ] == 'Refunded' || $update_info[ 'payment_status' ] == 'Partially_Refunded' ) { |
|
277 | - if ( apply_filters( 'FHEE__EEG_Paypal_Standard__handle_payment_update__kill_refund_request', true ) ) { |
|
278 | - status_header( 200 ); |
|
276 | + if ($update_info['payment_status'] == 'Refunded' || $update_info['payment_status'] == 'Partially_Refunded') { |
|
277 | + if (apply_filters('FHEE__EEG_Paypal_Standard__handle_payment_update__kill_refund_request', true)) { |
|
278 | + status_header(200); |
|
279 | 279 | exit(); |
280 | 280 | } |
281 | 281 | } |
@@ -291,9 +291,9 @@ discard block |
||
291 | 291 | * @param EE_Payment|EEI_Payment $payment |
292 | 292 | * @return boolean |
293 | 293 | */ |
294 | - public function validate_ipn( $update_info, $payment ) { |
|
294 | + public function validate_ipn($update_info, $payment) { |
|
295 | 295 | //allow us to skip validating IPNs with PayPal (useful for testing) |
296 | - if ( apply_filters( 'FHEE__EEG_Paypal_Standard__validate_ipn__skip', false ) ) { |
|
296 | + if (apply_filters('FHEE__EEG_Paypal_Standard__validate_ipn__skip', false)) { |
|
297 | 297 | return true; |
298 | 298 | } |
299 | 299 | //...otherwise, we actually don't care what the $update_info is, we need to look |
@@ -301,22 +301,22 @@ discard block |
||
301 | 301 | // Reading POSTed data directly from $_POST causes serialization issues with array data in the POST. |
302 | 302 | // Instead, read raw POST data from the input stream. |
303 | 303 | // @see https://gist.github.com/xcommerce-gists/3440401 |
304 | - $raw_post_data = file_get_contents( 'php://input' ); |
|
305 | - $raw_post_array = explode( '&', $raw_post_data ); |
|
304 | + $raw_post_data = file_get_contents('php://input'); |
|
305 | + $raw_post_array = explode('&', $raw_post_data); |
|
306 | 306 | $update_info = array(); |
307 | - foreach ( $raw_post_array as $keyval ) { |
|
308 | - $keyval = explode( '=', $keyval ); |
|
309 | - if ( count( $keyval ) == 2 ) |
|
310 | - $update_info[ $keyval[ 0 ] ] = urldecode( $keyval[ 1 ] ); |
|
307 | + foreach ($raw_post_array as $keyval) { |
|
308 | + $keyval = explode('=', $keyval); |
|
309 | + if (count($keyval) == 2) |
|
310 | + $update_info[$keyval[0]] = urldecode($keyval[1]); |
|
311 | 311 | } |
312 | 312 | // read the IPN message sent from PayPal and prepend 'cmd=_notify-validate' |
313 | 313 | $req = 'cmd=_notify-validate'; |
314 | - $get_magic_quotes_exists = function_exists( 'get_magic_quotes_gpc' ) ? true : false; |
|
315 | - foreach ( $update_info as $key => $value ) { |
|
316 | - if ( $get_magic_quotes_exists && get_magic_quotes_gpc() == 1 ) { |
|
317 | - $value = urlencode( stripslashes( $value ) ); |
|
314 | + $get_magic_quotes_exists = function_exists('get_magic_quotes_gpc') ? true : false; |
|
315 | + foreach ($update_info as $key => $value) { |
|
316 | + if ($get_magic_quotes_exists && get_magic_quotes_gpc() == 1) { |
|
317 | + $value = urlencode(stripslashes($value)); |
|
318 | 318 | } else { |
319 | - $value = urlencode( $value ); |
|
319 | + $value = urlencode($value); |
|
320 | 320 | } |
321 | 321 | $req .= "&$key=$value"; |
322 | 322 | } |
@@ -326,21 +326,21 @@ discard block |
||
326 | 326 | array( |
327 | 327 | 'body' => $req, |
328 | 328 | 'sslverify' => false, |
329 | - 'timeout' => 60 , |
|
329 | + 'timeout' => 60, |
|
330 | 330 | // make sure to set a site specific unique "user-agent" string since the WordPres default gets declined by PayPal |
331 | 331 | // plz see: https://github.com/websharks/s2member/issues/610 |
332 | - 'user-agent' => 'Event Espresso v' . EVENT_ESPRESSO_VERSION . '; ' . home_url(), |
|
332 | + 'user-agent' => 'Event Espresso v'.EVENT_ESPRESSO_VERSION.'; '.home_url(), |
|
333 | 333 | ) |
334 | 334 | ); |
335 | 335 | // then check the response |
336 | - if ( ! is_wp_error( $response ) && array_key_exists( 'body', $response ) && strcmp( $response[ 'body' ], "VERIFIED" ) == 0 ) { |
|
336 | + if ( ! is_wp_error($response) && array_key_exists('body', $response) && strcmp($response['body'], "VERIFIED") == 0) { |
|
337 | 337 | return true; |
338 | 338 | } else { |
339 | 339 | // huh, something's wack... the IPN didn't validate. We must have replied to the IPN incorrectly, |
340 | 340 | // or their API must have changed: http://www.paypalobjects.com/en_US/ebook/PP_OrderManagement_IntegrationGuide/ipn.html |
341 | - $payment->set_gateway_response( sprintf( __( "IPN Validation failed! Paypal responded with '%s'", "event_espresso" ), $response[ 'body' ] ) ); |
|
342 | - $payment->set_details( array( 'REQUEST' => $update_info, 'VALIDATION_RESPONSE' => $response ) ); |
|
343 | - $payment->set_status( EEM_Payment::status_id_failed ); |
|
341 | + $payment->set_gateway_response(sprintf(__("IPN Validation failed! Paypal responded with '%s'", "event_espresso"), $response['body'])); |
|
342 | + $payment->set_details(array('REQUEST' => $update_info, 'VALIDATION_RESPONSE' => $response)); |
|
343 | + $payment->set_status(EEM_Payment::status_id_failed); |
|
344 | 344 | // log the results |
345 | 345 | $this->log( |
346 | 346 | array( |
@@ -362,9 +362,9 @@ discard block |
||
362 | 362 | */ |
363 | 363 | protected function _process_response_url() { |
364 | 364 | EE_Registry::instance()->load_helper('URL'); |
365 | - if ( isset( $_SERVER[ 'HTTP_HOST' ], $_SERVER[ 'REQUEST_URI' ] ) ) { |
|
365 | + if (isset($_SERVER['HTTP_HOST'], $_SERVER['REQUEST_URI'])) { |
|
366 | 366 | $url = is_ssl() ? 'https://' : 'http://'; |
367 | - $url .= EEH_URL::filter_input_server_url( 'HTTP_HOST' ); |
|
367 | + $url .= EEH_URL::filter_input_server_url('HTTP_HOST'); |
|
368 | 368 | $url .= EEH_URL::filter_input_server_url(); |
369 | 369 | } else { |
370 | 370 | $url = 'unknown'; |
@@ -380,19 +380,19 @@ discard block |
||
380 | 380 | * like the taxes or shipping |
381 | 381 | * @param EEI_Payment $payment |
382 | 382 | */ |
383 | - public function update_txn_based_on_payment( $payment ) { |
|
383 | + public function update_txn_based_on_payment($payment) { |
|
384 | 384 | $update_info = $payment->details(); |
385 | 385 | $redirect_args = $payment->redirect_args(); |
386 | 386 | $transaction = $payment->transaction(); |
387 | - if( ! $transaction ){ |
|
388 | - $this->log( __( 'Payment with ID %d has no related transaction, and so update_txn_based_on_payment couldn\'t be executed properly', 'event_espresso' ), $payment ); |
|
387 | + if ( ! $transaction) { |
|
388 | + $this->log(__('Payment with ID %d has no related transaction, and so update_txn_based_on_payment couldn\'t be executed properly', 'event_espresso'), $payment); |
|
389 | 389 | return; |
390 | 390 | } |
391 | - if( ! is_array( $update_info ) || ! isset( $update_info[ 'mc_shipping' ] ) || ! isset( $update_info[ 'tax' ] ) ) { |
|
391 | + if ( ! is_array($update_info) || ! isset($update_info['mc_shipping']) || ! isset($update_info['tax'])) { |
|
392 | 392 | $this->log( |
393 | 393 | array( |
394 | 394 | 'url' => $this->_process_response_url(), |
395 | - 'message' => __( 'Could not update transaction based on payment because the payment details have not yet been put on the payment. This normally happens during the IPN or returning from PayPal', 'event_espresso' ), |
|
395 | + 'message' => __('Could not update transaction based on payment because the payment details have not yet been put on the payment. This normally happens during the IPN or returning from PayPal', 'event_espresso'), |
|
396 | 396 | 'payment' => $payment->model_field_array() |
397 | 397 | ), |
398 | 398 | $payment |
@@ -408,24 +408,24 @@ discard block |
||
408 | 408 | $grand_total_needs_resaving = FALSE; |
409 | 409 | |
410 | 410 | //might PayPal have added shipping? |
411 | - if( $this->_paypal_shipping && floatval( $update_info[ 'mc_shipping' ] ) != 0 ){ |
|
412 | - $this->_line_item->add_unrelated_item( $transaction->total_line_item(), __('Shipping', 'event_espresso'), floatval( $update_info[ 'mc_shipping' ] ), __('Shipping charges calculated by Paypal', 'event_espresso'), 1, FALSE, 'paypal_shipping' ); |
|
411 | + if ($this->_paypal_shipping && floatval($update_info['mc_shipping']) != 0) { |
|
412 | + $this->_line_item->add_unrelated_item($transaction->total_line_item(), __('Shipping', 'event_espresso'), floatval($update_info['mc_shipping']), __('Shipping charges calculated by Paypal', 'event_espresso'), 1, FALSE, 'paypal_shipping'); |
|
413 | 413 | $grand_total_needs_resaving = TRUE; |
414 | 414 | |
415 | 415 | } |
416 | 416 | //might PayPal have changed the taxes? |
417 | - if( $this->_paypal_taxes && floatval( $update_info[ 'tax' ] ) != $redirect_args[ 'tax_cart' ] ){ |
|
418 | - $this->_line_item->set_total_tax_to( $transaction->total_line_item(), floatval( $update_info['tax'] ), __( 'Taxes', 'event_espresso' ), __( 'Calculated by Paypal', 'event_espresso' ) ); |
|
417 | + if ($this->_paypal_taxes && floatval($update_info['tax']) != $redirect_args['tax_cart']) { |
|
418 | + $this->_line_item->set_total_tax_to($transaction->total_line_item(), floatval($update_info['tax']), __('Taxes', 'event_espresso'), __('Calculated by Paypal', 'event_espresso')); |
|
419 | 419 | $grand_total_needs_resaving = TRUE; |
420 | 420 | } |
421 | 421 | |
422 | - if( $grand_total_needs_resaving ){ |
|
423 | - $transaction->total_line_item()->save_this_and_descendants_to_txn( $transaction->ID() ); |
|
422 | + if ($grand_total_needs_resaving) { |
|
423 | + $transaction->total_line_item()->save_this_and_descendants_to_txn($transaction->ID()); |
|
424 | 424 | } |
425 | 425 | $this->log( |
426 | 426 | array( |
427 | 427 | 'url' => $this->_process_response_url(), |
428 | - 'message' => __( 'Updated transaction related to payment', 'event_espresso' ), |
|
428 | + 'message' => __('Updated transaction related to payment', 'event_espresso'), |
|
429 | 429 | 'transaction (updated)' => $transaction->model_field_array(), |
430 | 430 | 'payment (updated)' => $payment->model_field_array(), |
431 | 431 | 'use_paypal_shipping' => $this->_paypal_shipping, |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | * @since $VID:$ |
11 | 11 | * |
12 | 12 | */ |
13 | -class EE_PMT_Paypal_Standard extends EE_PMT_Base{ |
|
13 | +class EE_PMT_Paypal_Standard extends EE_PMT_Base { |
|
14 | 14 | |
15 | 15 | const shipping_info_none = 1; |
16 | 16 | const shipping_info_optional = 0; |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | require_once($this->file_folder().'EEG_Paypal_Standard.gateway.php'); |
27 | 27 | $this->_gateway = new EEG_Paypal_Standard(); |
28 | 28 | $this->_pretty_name = __("Paypal Standard", 'event_espresso'); |
29 | - $this->_default_description = sprintf( __( 'Upon submitting this form, you will be forwarded to PayPal to make your payment. %1$sMake sure you return to this site in order to properly finalize your registration.%2$s', 'event_espresso' ), '<strong>', '</strong>' ); |
|
29 | + $this->_default_description = sprintf(__('Upon submitting this form, you will be forwarded to PayPal to make your payment. %1$sMake sure you return to this site in order to properly finalize your registration.%2$s', 'event_espresso'), '<strong>', '</strong>'); |
|
30 | 30 | parent::__construct($pm_instance); |
31 | 31 | $this->_default_button_url = $this->file_url().'lib'.DS.'paypal-logo.png'; |
32 | 32 | } |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | * @param \EE_Transaction $transaction |
39 | 39 | * @return NULL |
40 | 40 | */ |
41 | - public function generate_new_billing_form( EE_Transaction $transaction = NULL ) { |
|
41 | + public function generate_new_billing_form(EE_Transaction $transaction = NULL) { |
|
42 | 42 | return NULL; |
43 | 43 | } |
44 | 44 | |
@@ -49,10 +49,10 @@ discard block |
||
49 | 49 | * @return EE_Payment_Method_Form |
50 | 50 | */ |
51 | 51 | public function generate_new_settings_form() { |
52 | - require_once( $this->file_folder() . 'EE_Paypal_Standard_Form.form.php' ); |
|
53 | - $form = new EE_Paypal_Standard_Form( $this ); |
|
54 | - $form->get_input('PMD_debug_mode')->set_html_label_text(sprintf(__("Use Paypal Sandbox %s", 'event_espresso'), $this->get_help_tab_link())); |
|
55 | - $form->get_input('shipping_details')->set_html_label_text(sprintf(__("Shipping Address Options %s", "event_espresso"), $this->get_help_tab_link())); |
|
52 | + require_once($this->file_folder().'EE_Paypal_Standard_Form.form.php'); |
|
53 | + $form = new EE_Paypal_Standard_Form($this); |
|
54 | + $form->get_input('PMD_debug_mode')->set_html_label_text(sprintf(__("Use Paypal Sandbox %s", 'event_espresso'), $this->get_help_tab_link())); |
|
55 | + $form->get_input('shipping_details')->set_html_label_text(sprintf(__("Shipping Address Options %s", "event_espresso"), $this->get_help_tab_link())); |
|
56 | 56 | return $form; |
57 | 57 | } |
58 | 58 | |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | * @see EE_PMT_Base::help_tabs_config() |
64 | 64 | * @return array |
65 | 65 | */ |
66 | - public function help_tabs_config(){ |
|
66 | + public function help_tabs_config() { |
|
67 | 67 | return array( |
68 | 68 | $this->get_help_tab_name() => array( |
69 | 69 | 'title'=> __("Paypal Standard Settings", 'event_espresso'), |
@@ -84,14 +84,14 @@ discard block |
||
84 | 84 | * @param EE_Transaction $transaction |
85 | 85 | * @return EE_Payment |
86 | 86 | */ |
87 | - public function finalize_payment_for($transaction){ |
|
87 | + public function finalize_payment_for($transaction) { |
|
88 | 88 | //paypal standard actually sends teh IPN info along with the user |
89 | 89 | //when they return to our site |
90 | 90 | //so in case teh IPN is arriving later, let's try to process an IPN! |
91 | - if($_SERVER['REQUEST_METHOD'] == 'POST'){ |
|
92 | - return $this->handle_ipn($_POST, $transaction ); |
|
93 | - }else{ |
|
94 | - return parent::finalize_payment_for( $transaction ); |
|
91 | + if ($_SERVER['REQUEST_METHOD'] == 'POST') { |
|
92 | + return $this->handle_ipn($_POST, $transaction); |
|
93 | + } else { |
|
94 | + return parent::finalize_payment_for($transaction); |
|
95 | 95 | } |
96 | 96 | } |
97 | 97 |
@@ -90,7 +90,7 @@ |
||
90 | 90 | //so in case teh IPN is arriving later, let's try to process an IPN! |
91 | 91 | if($_SERVER['REQUEST_METHOD'] == 'POST'){ |
92 | 92 | return $this->handle_ipn($_POST, $transaction ); |
93 | - }else{ |
|
93 | + } else{ |
|
94 | 94 | return parent::finalize_payment_for( $transaction ); |
95 | 95 | } |
96 | 96 | } |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | -if ( !defined( 'EVENT_ESPRESSO_VERSION' ) ) { |
|
3 | - exit( 'No direct script access allowed' ); |
|
2 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
|
3 | + exit('No direct script access allowed'); |
|
4 | 4 | } |
5 | 5 | |
6 | 6 | /** |
@@ -15,15 +15,15 @@ discard block |
||
15 | 15 | * |
16 | 16 | */ |
17 | 17 | class EE_Paypal_Standard_Form extends EE_Payment_Method_Form { |
18 | - protected function _normalize( $req_data ) { |
|
19 | - parent::_normalize( $req_data ); |
|
18 | + protected function _normalize($req_data) { |
|
19 | + parent::_normalize($req_data); |
|
20 | 20 | } |
21 | 21 | |
22 | 22 | /** |
23 | 23 | * |
24 | 24 | * @param EE_PMT_Paypal_Standard $payment_method_type |
25 | 25 | */ |
26 | - public function __construct( $payment_method_type ){ |
|
26 | + public function __construct($payment_method_type) { |
|
27 | 27 | $options_array = array( |
28 | 28 | 'payment_method_type' => $payment_method_type, |
29 | 29 | 'extra_meta_inputs'=>array( |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | )), |
35 | 35 | 'image_url'=>new EE_Admin_File_Uploader_Input(array( |
36 | 36 | 'html_help_text'=> __("Used for your business/personal logo on the PayPal page", 'event_espresso'), |
37 | - 'html_label_text' => __( 'Image URL', 'event_espresso' ) |
|
37 | + 'html_label_text' => __('Image URL', 'event_espresso') |
|
38 | 38 | )), |
39 | 39 | 'shipping_details'=>new EE_Select_Input(array( |
40 | 40 | EE_PMT_Paypal_Standard::shipping_info_none => __("Do not prompt for an address", 'event_espresso'), |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | 'before_form_content_template'=>$payment_method_type->file_folder().DS.'templates'.DS.'paypal_standard_settings_before_form.template.php', |
46 | 46 | ); |
47 | 47 | |
48 | - parent::__construct( $options_array ); |
|
48 | + parent::__construct($options_array); |
|
49 | 49 | } |
50 | 50 | } |
51 | 51 |
@@ -3,7 +3,7 @@ discard block |
||
3 | 3 | <?php _e('Adjust the settings for the PayPal Standard payment gateway.', 'event_espresso'); ?> |
4 | 4 | </p> |
5 | 5 | <p> |
6 | -<?php printf( __( 'See %1$shere%2$s for list of currencies supported by Paypal Standard.', 'event_espresso' ), "<a href='https://www.paypal.com/multicurrency' target='_blank'>","</a>" ); ?> |
|
6 | +<?php printf(__('See %1$shere%2$s for list of currencies supported by Paypal Standard.', 'event_espresso'), "<a href='https://www.paypal.com/multicurrency' target='_blank'>", "</a>"); ?> |
|
7 | 7 | </p> |
8 | 8 | <h3><?php _e('PayPal Standard Settings', 'event_espresso'); ?></h3> |
9 | 9 | <ul> |
@@ -21,17 +21,17 @@ discard block |
||
21 | 21 | </li> |
22 | 22 | <li> |
23 | 23 | <strong><?php _e('PayPal Calculates Taxes', 'event_espresso'); ?></strong><br /> |
24 | -<?php printf( __('If set to "Yes", we will indicate to PayPal that it ought to calculate the taxes on the order and add it. This means PayPal\'s tax calculations will be used on the order instead of Event Espresso\'s. %1$sRead here for more information.%2$s', 'event_espresso'), "<a href='https://www.paypal.com/ca/cgi-bin/webscr?cmd=xpt/Marketing/shipping/EasyCalculateShipAndTax-outside' target='_blank'>", '</a>' ); ?><br/> |
|
25 | -<?php _e( 'Important Note: PayPal calculates its taxes ONLY ON TAXABLE tickets. So if you mark an Event Espresso ticket as being non-taxable, PayPal will also respect that setting and those items will NOT be taxed.', 'event_espresso' );?> |
|
24 | +<?php printf(__('If set to "Yes", we will indicate to PayPal that it ought to calculate the taxes on the order and add it. This means PayPal\'s tax calculations will be used on the order instead of Event Espresso\'s. %1$sRead here for more information.%2$s', 'event_espresso'), "<a href='https://www.paypal.com/ca/cgi-bin/webscr?cmd=xpt/Marketing/shipping/EasyCalculateShipAndTax-outside' target='_blank'>", '</a>'); ?><br/> |
|
25 | +<?php _e('Important Note: PayPal calculates its taxes ONLY ON TAXABLE tickets. So if you mark an Event Espresso ticket as being non-taxable, PayPal will also respect that setting and those items will NOT be taxed.', 'event_espresso'); ?> |
|
26 | 26 | </li> |
27 | 27 | <li> |
28 | 28 | <strong><?php _e('PayPal Calculates Shipping', 'event_espresso'); ?></strong><br /> |
29 | 29 | <?php _e('Similar to the "PayPal Calculates Taxes" setting, if this is set to "Yes", we will indicate to PayPal that it ought to calculate the shipping on the order and it.', 'event_espresso'); ?><br/> |
30 | -<?php _e( 'Important Note: PayPal will ONLY calculate shipping on an order if "Shipping Address Options" is set to "Prompt for an Address" (otherwise how will PayPal know how much to charge for shipping if it doesn\'t know where it\'s shipping to?)', 'event_espresso' );?> |
|
30 | +<?php _e('Important Note: PayPal will ONLY calculate shipping on an order if "Shipping Address Options" is set to "Prompt for an Address" (otherwise how will PayPal know how much to charge for shipping if it doesn\'t know where it\'s shipping to?)', 'event_espresso'); ?> |
|
31 | 31 | <li> |
32 | -<strong><?php _e( 'Notes Regarding Paypal Taxes and Shipping', 'event_espresso' );?></strong><br/> |
|
33 | -<?php _e( 'If you want PayPal to calculate taxes and shipping on an order, those changes will NOT appear during the initial registration process until the user is redirected to PayPal for payment.', 'event_espresso' );?><br/> |
|
34 | -<?php _e( 'However, after the user has returned from PayPal, their order in Event Espresso will be updated with the new taxes and added shipping charges (e.g. it will appear on their receipt.)', 'event_espresso' );?> |
|
32 | +<strong><?php _e('Notes Regarding Paypal Taxes and Shipping', 'event_espresso'); ?></strong><br/> |
|
33 | +<?php _e('If you want PayPal to calculate taxes and shipping on an order, those changes will NOT appear during the initial registration process until the user is redirected to PayPal for payment.', 'event_espresso'); ?><br/> |
|
34 | +<?php _e('However, after the user has returned from PayPal, their order in Event Espresso will be updated with the new taxes and added shipping charges (e.g. it will appear on their receipt.)', 'event_espresso'); ?> |
|
35 | 35 | </li> |
36 | 36 | <li> |
37 | 37 | <strong><?php _e('Shipping Address Options', 'event_espresso'); ?></strong><br /> |
@@ -3,27 +3,27 @@ |
||
3 | 3 | if (!defined('EVENT_ESPRESSO_VERSION')) |
4 | 4 | exit('No direct script access allowed'); |
5 | 5 | /** |
6 | - * Event Espresso |
|
7 | - * |
|
8 | - * Event Registration and Management Plugin for WordPress |
|
9 | - * |
|
10 | - * @ package Event Espresso |
|
11 | - * @ author Seth Shoultes |
|
12 | - * @ copyright (c) 2008-2011 Event Espresso All Rights Reserved. |
|
13 | - * @ license http://eventespresso.com/support/terms-conditions/ * see Plugin Licensing * |
|
14 | - * @ link http://www.eventespresso.com |
|
15 | - * @ version 4.3 |
|
16 | - * |
|
17 | - * ------------------------------------------------------------------------ |
|
18 | - * |
|
19 | - * paypal_standard_settings_before_form |
|
20 | - * |
|
21 | - * @package Event Espresso |
|
22 | - * @subpackage |
|
23 | - * @author Mike Nelson |
|
24 | - * |
|
25 | - * ------------------------------------------------------------------------ |
|
26 | - */ |
|
6 | + * Event Espresso |
|
7 | + * |
|
8 | + * Event Registration and Management Plugin for WordPress |
|
9 | + * |
|
10 | + * @ package Event Espresso |
|
11 | + * @ author Seth Shoultes |
|
12 | + * @ copyright (c) 2008-2011 Event Espresso All Rights Reserved. |
|
13 | + * @ license http://eventespresso.com/support/terms-conditions/ * see Plugin Licensing * |
|
14 | + * @ link http://www.eventespresso.com |
|
15 | + * @ version 4.3 |
|
16 | + * |
|
17 | + * ------------------------------------------------------------------------ |
|
18 | + * |
|
19 | + * paypal_standard_settings_before_form |
|
20 | + * |
|
21 | + * @package Event Espresso |
|
22 | + * @subpackage |
|
23 | + * @author Mike Nelson |
|
24 | + * |
|
25 | + * ------------------------------------------------------------------------ |
|
26 | + */ |
|
27 | 27 | ?> |
28 | 28 | <strong style="color:#F00"><?php _e('Please Note:','event_espresso')?></strong> <?php _e("You will need a PayPal Premier or Business account for the PayPal IPN to work correctly. ", 'event_espresso'); |
29 | 29 |
@@ -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 | * Event Espresso |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | * ------------------------------------------------------------------------ |
26 | 26 | */ |
27 | 27 | ?> |
28 | -<strong style="color:#F00"><?php _e('Please Note:','event_espresso')?></strong> <?php _e("You will need a PayPal Premier or Business account for the PayPal IPN to work correctly. ", 'event_espresso'); |
|
28 | +<strong style="color:#F00"><?php _e('Please Note:', 'event_espresso')?></strong> <?php _e("You will need a PayPal Premier or Business account for the PayPal IPN to work correctly. ", 'event_espresso'); |
|
29 | 29 | |
30 | 30 | |
31 | 31 | // End of file paypal_standard_settings_before_form.template.php |
32 | 32 | \ No newline at end of file |
@@ -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 | * Event Espresso |
7 | 8 | * |
@@ -16,11 +16,11 @@ |
||
16 | 16 | |
17 | 17 | <section id="primary" class="content-area"> |
18 | 18 | <div id="content" class="site-content" role="main"> |
19 | - <?php espresso_get_template_part( 'loop', 'espresso_events' ); ?> |
|
19 | + <?php espresso_get_template_part('loop', 'espresso_events'); ?> |
|
20 | 20 | </div><!-- #content --> |
21 | 21 | </section><!-- #primary --> |
22 | 22 | |
23 | 23 | <?php |
24 | -get_sidebar( 'content' ); |
|
24 | +get_sidebar('content'); |
|
25 | 25 | get_sidebar(); |
26 | 26 | get_footer(); |
@@ -1,16 +1,16 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Template Name: Event List |
|
4 | - * |
|
5 | - * This template will display a list of your events |
|
6 | - * |
|
7 | - * @ package Event Espresso |
|
8 | - * @ author Seth Shoultes |
|
9 | - * @ copyright (c) 2008-2014 Event Espresso All Rights Reserved. |
|
10 | - * @ license http://eventespresso.com/support/terms-conditions/ * see Plugin Licensing * |
|
11 | - * @ link http://www.eventespresso.com |
|
12 | - * @ version EE4+ |
|
13 | - */ |
|
3 | + * Template Name: Event List |
|
4 | + * |
|
5 | + * This template will display a list of your events |
|
6 | + * |
|
7 | + * @ package Event Espresso |
|
8 | + * @ author Seth Shoultes |
|
9 | + * @ copyright (c) 2008-2014 Event Espresso All Rights Reserved. |
|
10 | + * @ license http://eventespresso.com/support/terms-conditions/ * see Plugin Licensing * |
|
11 | + * @ link http://www.eventespresso.com |
|
12 | + * @ version EE4+ |
|
13 | + */ |
|
14 | 14 | get_header(); |
15 | 15 | ?> |
16 | 16 |