@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php if (! defined('EVENT_ESPRESSO_VERSION')) { |
2 | - exit('NO direct script access allowed'); |
|
2 | + exit('NO direct script access allowed'); |
|
3 | 3 | } |
4 | 4 | |
5 | 5 | |
@@ -17,153 +17,153 @@ discard block |
||
17 | 17 | class EE_PMT_Paypal_Express extends EE_PMT_Base |
18 | 18 | { |
19 | 19 | |
20 | - /** |
|
21 | - * EE_PMT_Paypal_Express constructor. |
|
22 | - */ |
|
23 | - public function __construct($pm_instance = null) |
|
24 | - { |
|
25 | - require_once($this->file_folder() . 'EEG_Paypal_Express.gateway.php'); |
|
26 | - $this->_gateway = new EEG_Paypal_Express(); |
|
20 | + /** |
|
21 | + * EE_PMT_Paypal_Express constructor. |
|
22 | + */ |
|
23 | + public function __construct($pm_instance = null) |
|
24 | + { |
|
25 | + require_once($this->file_folder() . 'EEG_Paypal_Express.gateway.php'); |
|
26 | + $this->_gateway = new EEG_Paypal_Express(); |
|
27 | 27 | |
28 | - $this->_pretty_name = esc_html__('PayPal Express', 'event_espresso'); |
|
29 | - $this->_template_path = $this->file_folder() . 'templates' . DS; |
|
30 | - $this->_default_description = esc_html__( |
|
31 | - // @codingStandardsIgnoreStart |
|
32 | - 'After clicking \'Finalize Registration\', you will be forwarded to PayPal website to Login and make your payment.', |
|
33 | - // @codingStandardsIgnoreEnd |
|
34 | - 'event_espresso' |
|
35 | - ); |
|
36 | - $this->_default_button_url = $this->file_url() . 'lib' . DS . 'paypal-express-checkout-logo-gold-160.png'; |
|
28 | + $this->_pretty_name = esc_html__('PayPal Express', 'event_espresso'); |
|
29 | + $this->_template_path = $this->file_folder() . 'templates' . DS; |
|
30 | + $this->_default_description = esc_html__( |
|
31 | + // @codingStandardsIgnoreStart |
|
32 | + 'After clicking \'Finalize Registration\', you will be forwarded to PayPal website to Login and make your payment.', |
|
33 | + // @codingStandardsIgnoreEnd |
|
34 | + 'event_espresso' |
|
35 | + ); |
|
36 | + $this->_default_button_url = $this->file_url() . 'lib' . DS . 'paypal-express-checkout-logo-gold-160.png'; |
|
37 | 37 | |
38 | - parent::__construct($pm_instance); |
|
39 | - } |
|
38 | + parent::__construct($pm_instance); |
|
39 | + } |
|
40 | 40 | |
41 | 41 | |
42 | - /** |
|
43 | - * Adds the help tab. |
|
44 | - * |
|
45 | - * @see EE_PMT_Base::help_tabs_config() |
|
46 | - * @return array |
|
47 | - */ |
|
48 | - public function help_tabs_config() |
|
49 | - { |
|
50 | - return array( |
|
51 | - $this->get_help_tab_name() => array( |
|
52 | - 'title' => esc_html__('PayPal Express Settings', 'event_espresso'), |
|
53 | - 'filename' => 'payment_methods_overview_paypal_express' |
|
54 | - ) |
|
55 | - ); |
|
56 | - } |
|
42 | + /** |
|
43 | + * Adds the help tab. |
|
44 | + * |
|
45 | + * @see EE_PMT_Base::help_tabs_config() |
|
46 | + * @return array |
|
47 | + */ |
|
48 | + public function help_tabs_config() |
|
49 | + { |
|
50 | + return array( |
|
51 | + $this->get_help_tab_name() => array( |
|
52 | + 'title' => esc_html__('PayPal Express Settings', 'event_espresso'), |
|
53 | + 'filename' => 'payment_methods_overview_paypal_express' |
|
54 | + ) |
|
55 | + ); |
|
56 | + } |
|
57 | 57 | |
58 | 58 | |
59 | - /** |
|
60 | - * Gets the form for all the settings related to this payment method type. |
|
61 | - * |
|
62 | - * @return EE_Payment_Method_Form |
|
63 | - */ |
|
64 | - public function generate_new_settings_form() |
|
65 | - { |
|
66 | - EE_Registry::instance()->load_helper('Template'); |
|
67 | - $form = new EE_Payment_Method_Form( |
|
68 | - array( |
|
69 | - 'extra_meta_inputs' => array( |
|
70 | - 'api_username' => new EE_Text_Input( |
|
71 | - array( |
|
72 | - 'html_label_text' => sprintf( |
|
73 | - esc_html__('API Username %s', 'event_espresso'), |
|
74 | - $this->get_help_tab_link() |
|
75 | - ), |
|
76 | - 'required' => true, |
|
77 | - ) |
|
78 | - ), |
|
79 | - 'api_password' => new EE_Text_Input( |
|
80 | - array( |
|
81 | - 'html_label_text' => sprintf( |
|
82 | - esc_html__('API Password %s', 'event_espresso'), |
|
83 | - $this->get_help_tab_link() |
|
84 | - ), |
|
85 | - 'required' => true, |
|
86 | - ) |
|
87 | - ), |
|
88 | - 'api_signature' => new EE_Text_Input( |
|
89 | - array( |
|
90 | - 'html_label_text' => sprintf( |
|
91 | - esc_html__('API Signature %s', 'event_espresso'), |
|
92 | - $this->get_help_tab_link() |
|
93 | - ), |
|
94 | - 'required' => true, |
|
95 | - ) |
|
96 | - ), |
|
97 | - 'request_shipping_addr' => new EE_Yes_No_Input( |
|
98 | - array( |
|
99 | - 'html_label_text' => sprintf( |
|
100 | - esc_html__('Request Shipping Address %s', 'event_espresso'), |
|
101 | - $this->get_help_tab_link() |
|
102 | - ), |
|
103 | - 'html_help_text' => esc_html__( |
|
104 | - // @codingStandardsIgnoreStart |
|
105 | - 'If set to "Yes", then a shipping address will be requested on the PayPal checkout page.', |
|
106 | - // @codingStandardsIgnoreEnd |
|
107 | - 'event_espresso' |
|
108 | - ), |
|
109 | - 'required' => true, |
|
110 | - 'default' => false, |
|
111 | - ) |
|
112 | - ), |
|
113 | - 'image_url' => new EE_Admin_File_Uploader_Input( |
|
114 | - array( |
|
115 | - 'html_label_text' => sprintf( |
|
116 | - esc_html__('Image URL %s', 'event_espresso'), |
|
117 | - $this->get_help_tab_link() |
|
118 | - ), |
|
119 | - 'html_help_text' => esc_html__( |
|
120 | - 'Used for your business/personal logo on the PayPal page', |
|
121 | - 'event_espresso' |
|
122 | - ), |
|
123 | - 'required' => false, |
|
124 | - ) |
|
125 | - ), |
|
126 | - ) |
|
127 | - ) |
|
128 | - ); |
|
129 | - return $form; |
|
130 | - } |
|
59 | + /** |
|
60 | + * Gets the form for all the settings related to this payment method type. |
|
61 | + * |
|
62 | + * @return EE_Payment_Method_Form |
|
63 | + */ |
|
64 | + public function generate_new_settings_form() |
|
65 | + { |
|
66 | + EE_Registry::instance()->load_helper('Template'); |
|
67 | + $form = new EE_Payment_Method_Form( |
|
68 | + array( |
|
69 | + 'extra_meta_inputs' => array( |
|
70 | + 'api_username' => new EE_Text_Input( |
|
71 | + array( |
|
72 | + 'html_label_text' => sprintf( |
|
73 | + esc_html__('API Username %s', 'event_espresso'), |
|
74 | + $this->get_help_tab_link() |
|
75 | + ), |
|
76 | + 'required' => true, |
|
77 | + ) |
|
78 | + ), |
|
79 | + 'api_password' => new EE_Text_Input( |
|
80 | + array( |
|
81 | + 'html_label_text' => sprintf( |
|
82 | + esc_html__('API Password %s', 'event_espresso'), |
|
83 | + $this->get_help_tab_link() |
|
84 | + ), |
|
85 | + 'required' => true, |
|
86 | + ) |
|
87 | + ), |
|
88 | + 'api_signature' => new EE_Text_Input( |
|
89 | + array( |
|
90 | + 'html_label_text' => sprintf( |
|
91 | + esc_html__('API Signature %s', 'event_espresso'), |
|
92 | + $this->get_help_tab_link() |
|
93 | + ), |
|
94 | + 'required' => true, |
|
95 | + ) |
|
96 | + ), |
|
97 | + 'request_shipping_addr' => new EE_Yes_No_Input( |
|
98 | + array( |
|
99 | + 'html_label_text' => sprintf( |
|
100 | + esc_html__('Request Shipping Address %s', 'event_espresso'), |
|
101 | + $this->get_help_tab_link() |
|
102 | + ), |
|
103 | + 'html_help_text' => esc_html__( |
|
104 | + // @codingStandardsIgnoreStart |
|
105 | + 'If set to "Yes", then a shipping address will be requested on the PayPal checkout page.', |
|
106 | + // @codingStandardsIgnoreEnd |
|
107 | + 'event_espresso' |
|
108 | + ), |
|
109 | + 'required' => true, |
|
110 | + 'default' => false, |
|
111 | + ) |
|
112 | + ), |
|
113 | + 'image_url' => new EE_Admin_File_Uploader_Input( |
|
114 | + array( |
|
115 | + 'html_label_text' => sprintf( |
|
116 | + esc_html__('Image URL %s', 'event_espresso'), |
|
117 | + $this->get_help_tab_link() |
|
118 | + ), |
|
119 | + 'html_help_text' => esc_html__( |
|
120 | + 'Used for your business/personal logo on the PayPal page', |
|
121 | + 'event_espresso' |
|
122 | + ), |
|
123 | + 'required' => false, |
|
124 | + ) |
|
125 | + ), |
|
126 | + ) |
|
127 | + ) |
|
128 | + ); |
|
129 | + return $form; |
|
130 | + } |
|
131 | 131 | |
132 | 132 | |
133 | - /** |
|
134 | - * Creates a billing form for this payment method type. |
|
135 | - * |
|
136 | - * @param \EE_Transaction $transaction |
|
137 | - * @return \EE_Billing_Info_Form |
|
138 | - */ |
|
139 | - public function generate_new_billing_form(EE_Transaction $transaction = null) |
|
140 | - { |
|
141 | - if ($this->_pm_instance->debug_mode()) { |
|
142 | - $form = new EE_Billing_Info_Form( |
|
143 | - $this->_pm_instance, |
|
144 | - array( |
|
145 | - 'name' => 'paypal_express_Info_Form', |
|
146 | - 'subsections' => array( |
|
147 | - 'paypal_express_debug_info' => new EE_Form_Section_Proper( |
|
148 | - array( |
|
149 | - 'layout_strategy' => new EE_Template_Layout( |
|
150 | - array( |
|
151 | - 'layout_template_file' => $this->_template_path |
|
152 | - . 'paypal_express_debug_info.template.php', |
|
153 | - 'template_args' => array( |
|
154 | - 'debug_mode' => $this->_pm_instance->debug_mode() |
|
155 | - ) |
|
156 | - ) |
|
157 | - ) |
|
158 | - ) |
|
159 | - ) |
|
160 | - ) |
|
161 | - ) |
|
162 | - ); |
|
163 | - return $form; |
|
164 | - } |
|
133 | + /** |
|
134 | + * Creates a billing form for this payment method type. |
|
135 | + * |
|
136 | + * @param \EE_Transaction $transaction |
|
137 | + * @return \EE_Billing_Info_Form |
|
138 | + */ |
|
139 | + public function generate_new_billing_form(EE_Transaction $transaction = null) |
|
140 | + { |
|
141 | + if ($this->_pm_instance->debug_mode()) { |
|
142 | + $form = new EE_Billing_Info_Form( |
|
143 | + $this->_pm_instance, |
|
144 | + array( |
|
145 | + 'name' => 'paypal_express_Info_Form', |
|
146 | + 'subsections' => array( |
|
147 | + 'paypal_express_debug_info' => new EE_Form_Section_Proper( |
|
148 | + array( |
|
149 | + 'layout_strategy' => new EE_Template_Layout( |
|
150 | + array( |
|
151 | + 'layout_template_file' => $this->_template_path |
|
152 | + . 'paypal_express_debug_info.template.php', |
|
153 | + 'template_args' => array( |
|
154 | + 'debug_mode' => $this->_pm_instance->debug_mode() |
|
155 | + ) |
|
156 | + ) |
|
157 | + ) |
|
158 | + ) |
|
159 | + ) |
|
160 | + ) |
|
161 | + ) |
|
162 | + ); |
|
163 | + return $form; |
|
164 | + } |
|
165 | 165 | |
166 | - return false; |
|
167 | - } |
|
166 | + return false; |
|
167 | + } |
|
168 | 168 | } |
169 | 169 | // End of file EE_PMT_Paypal_Express.pm.php |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php if (! defined('EVENT_ESPRESSO_VERSION')) { |
|
1 | +<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
|
2 | 2 | exit('NO direct script access allowed'); |
3 | 3 | } |
4 | 4 | |
@@ -22,18 +22,18 @@ discard block |
||
22 | 22 | */ |
23 | 23 | public function __construct($pm_instance = null) |
24 | 24 | { |
25 | - require_once($this->file_folder() . 'EEG_Paypal_Express.gateway.php'); |
|
25 | + require_once($this->file_folder().'EEG_Paypal_Express.gateway.php'); |
|
26 | 26 | $this->_gateway = new EEG_Paypal_Express(); |
27 | 27 | |
28 | 28 | $this->_pretty_name = esc_html__('PayPal Express', 'event_espresso'); |
29 | - $this->_template_path = $this->file_folder() . 'templates' . DS; |
|
29 | + $this->_template_path = $this->file_folder().'templates'.DS; |
|
30 | 30 | $this->_default_description = esc_html__( |
31 | 31 | // @codingStandardsIgnoreStart |
32 | 32 | 'After clicking \'Finalize Registration\', you will be forwarded to PayPal website to Login and make your payment.', |
33 | 33 | // @codingStandardsIgnoreEnd |
34 | 34 | 'event_espresso' |
35 | 35 | ); |
36 | - $this->_default_button_url = $this->file_url() . 'lib' . DS . 'paypal-express-checkout-logo-gold-160.png'; |
|
36 | + $this->_default_button_url = $this->file_url().'lib'.DS.'paypal-express-checkout-logo-gold-160.png'; |
|
37 | 37 | |
38 | 38 | parent::__construct($pm_instance); |
39 | 39 | } |