@@ -15,49 +15,49 @@ |
||
15 | 15 | class EE_Payment_Reminder_message_type extends EE_Payment_Base_message_type |
16 | 16 | { |
17 | 17 | |
18 | - public function __construct() |
|
19 | - { |
|
20 | - |
|
21 | - // setup type details for reference |
|
22 | - $this->name = 'payment_reminder'; |
|
23 | - $this->description = esc_html__('This message type is used for all payment reminder messages. These are triggered when an offline gateway registration is completed or when manually triggered via event administrators via the transaction admin page(s).', 'event_espresso'); |
|
24 | - $this->label = array( |
|
25 | - 'singular' => esc_html__('payment reminder', 'event_espresso'), |
|
26 | - 'plural' => esc_html__('payment reminders', 'event_espresso') |
|
27 | - ); |
|
28 | - $this->_master_templates = array( |
|
29 | - 'email' => 'payment' |
|
30 | - ); |
|
31 | - |
|
32 | - parent::__construct(); |
|
33 | - } |
|
34 | - |
|
35 | - |
|
36 | - |
|
37 | - /** |
|
38 | - * _set_contexts |
|
39 | - * This sets up the contexts associated with the message_type |
|
40 | - * |
|
41 | - * @access protected |
|
42 | - * @return void |
|
43 | - */ |
|
44 | - protected function _set_contexts() |
|
45 | - { |
|
46 | - $this->_context_label = array( |
|
47 | - 'label' => esc_html__('recipient', 'event_espresso'), |
|
48 | - 'plural' => esc_html__('recipients', 'event_espresso'), |
|
49 | - 'description' => esc_html__('Recipient\'s are who will receive the template. You may want different payment details sent out depending on who the recipient is', 'event_espresso') |
|
50 | - ); |
|
51 | - |
|
52 | - $this->_contexts = array( |
|
53 | - 'admin' => array( |
|
54 | - 'label' => esc_html__('Event Admin', 'event_espresso'), |
|
55 | - 'description' => esc_html__('This template is what event administrators will receive on a successful payment', 'event_espresso') |
|
56 | - ), |
|
57 | - 'primary_attendee' => array( |
|
58 | - 'label' => esc_html__('Primary Registrant', 'event_espresso'), |
|
59 | - 'description' => esc_html__('This template is what the primary registrant (the person who made the main registration) will receive on successful payment', 'event_espresso') |
|
60 | - ) |
|
61 | - ); |
|
62 | - } |
|
18 | + public function __construct() |
|
19 | + { |
|
20 | + |
|
21 | + // setup type details for reference |
|
22 | + $this->name = 'payment_reminder'; |
|
23 | + $this->description = esc_html__('This message type is used for all payment reminder messages. These are triggered when an offline gateway registration is completed or when manually triggered via event administrators via the transaction admin page(s).', 'event_espresso'); |
|
24 | + $this->label = array( |
|
25 | + 'singular' => esc_html__('payment reminder', 'event_espresso'), |
|
26 | + 'plural' => esc_html__('payment reminders', 'event_espresso') |
|
27 | + ); |
|
28 | + $this->_master_templates = array( |
|
29 | + 'email' => 'payment' |
|
30 | + ); |
|
31 | + |
|
32 | + parent::__construct(); |
|
33 | + } |
|
34 | + |
|
35 | + |
|
36 | + |
|
37 | + /** |
|
38 | + * _set_contexts |
|
39 | + * This sets up the contexts associated with the message_type |
|
40 | + * |
|
41 | + * @access protected |
|
42 | + * @return void |
|
43 | + */ |
|
44 | + protected function _set_contexts() |
|
45 | + { |
|
46 | + $this->_context_label = array( |
|
47 | + 'label' => esc_html__('recipient', 'event_espresso'), |
|
48 | + 'plural' => esc_html__('recipients', 'event_espresso'), |
|
49 | + 'description' => esc_html__('Recipient\'s are who will receive the template. You may want different payment details sent out depending on who the recipient is', 'event_espresso') |
|
50 | + ); |
|
51 | + |
|
52 | + $this->_contexts = array( |
|
53 | + 'admin' => array( |
|
54 | + 'label' => esc_html__('Event Admin', 'event_espresso'), |
|
55 | + 'description' => esc_html__('This template is what event administrators will receive on a successful payment', 'event_espresso') |
|
56 | + ), |
|
57 | + 'primary_attendee' => array( |
|
58 | + 'label' => esc_html__('Primary Registrant', 'event_espresso'), |
|
59 | + 'description' => esc_html__('This template is what the primary registrant (the person who made the main registration) will receive on successful payment', 'event_espresso') |
|
60 | + ) |
|
61 | + ); |
|
62 | + } |
|
63 | 63 | } |
@@ -15,49 +15,49 @@ |
||
15 | 15 | class EE_Payment_Declined_message_type extends EE_Payment_Base_message_type |
16 | 16 | { |
17 | 17 | |
18 | - public function __construct() |
|
19 | - { |
|
20 | - |
|
21 | - // setup type details for reference |
|
22 | - $this->name = 'payment_declined'; |
|
23 | - $this->description = esc_html__('This message type is used for all declined payment notification messages that go out including any manual payments entered by an event administrator.', 'event_espresso'); |
|
24 | - $this->label = array( |
|
25 | - 'singular' => esc_html__('payment declined', 'event_espresso'), |
|
26 | - 'plural' => esc_html__('payments declined', 'event_espresso') |
|
27 | - ); |
|
28 | - |
|
29 | - $this->_master_templates = array( |
|
30 | - 'email' => 'payment' |
|
31 | - ); |
|
32 | - |
|
33 | - parent::__construct(); |
|
34 | - } |
|
35 | - |
|
36 | - |
|
37 | - /** |
|
38 | - * _set_contexts |
|
39 | - * This sets up the contexts associated with the message_type |
|
40 | - * |
|
41 | - * @access protected |
|
42 | - * @return void |
|
43 | - */ |
|
44 | - protected function _set_contexts() |
|
45 | - { |
|
46 | - $this->_context_label = array( |
|
47 | - 'label' => esc_html__('recipient', 'event_espresso'), |
|
48 | - 'plural' => esc_html__('recipients', 'event_espresso'), |
|
49 | - 'description' => esc_html__('Recipient\'s are who will receive the template. You may want different payment details sent out depending on who the recipient is', 'event_espresso') |
|
50 | - ); |
|
51 | - |
|
52 | - $this->_contexts = array( |
|
53 | - 'admin' => array( |
|
54 | - 'label' => esc_html__('Event Admin', 'event_espresso'), |
|
55 | - 'description' => esc_html__('This template is what event administrators will receive when payment is declined', 'event_espresso') |
|
56 | - ), |
|
57 | - 'primary_attendee' => array( |
|
58 | - 'label' => esc_html__('Primary Registrant', 'event_espresso'), |
|
59 | - 'description' => esc_html__('This template is what the primary registrant (the person who made the main registration) will receive when the payment is declined', 'event_espresso') |
|
60 | - ) |
|
61 | - ); |
|
62 | - } |
|
18 | + public function __construct() |
|
19 | + { |
|
20 | + |
|
21 | + // setup type details for reference |
|
22 | + $this->name = 'payment_declined'; |
|
23 | + $this->description = esc_html__('This message type is used for all declined payment notification messages that go out including any manual payments entered by an event administrator.', 'event_espresso'); |
|
24 | + $this->label = array( |
|
25 | + 'singular' => esc_html__('payment declined', 'event_espresso'), |
|
26 | + 'plural' => esc_html__('payments declined', 'event_espresso') |
|
27 | + ); |
|
28 | + |
|
29 | + $this->_master_templates = array( |
|
30 | + 'email' => 'payment' |
|
31 | + ); |
|
32 | + |
|
33 | + parent::__construct(); |
|
34 | + } |
|
35 | + |
|
36 | + |
|
37 | + /** |
|
38 | + * _set_contexts |
|
39 | + * This sets up the contexts associated with the message_type |
|
40 | + * |
|
41 | + * @access protected |
|
42 | + * @return void |
|
43 | + */ |
|
44 | + protected function _set_contexts() |
|
45 | + { |
|
46 | + $this->_context_label = array( |
|
47 | + 'label' => esc_html__('recipient', 'event_espresso'), |
|
48 | + 'plural' => esc_html__('recipients', 'event_espresso'), |
|
49 | + 'description' => esc_html__('Recipient\'s are who will receive the template. You may want different payment details sent out depending on who the recipient is', 'event_espresso') |
|
50 | + ); |
|
51 | + |
|
52 | + $this->_contexts = array( |
|
53 | + 'admin' => array( |
|
54 | + 'label' => esc_html__('Event Admin', 'event_espresso'), |
|
55 | + 'description' => esc_html__('This template is what event administrators will receive when payment is declined', 'event_espresso') |
|
56 | + ), |
|
57 | + 'primary_attendee' => array( |
|
58 | + 'label' => esc_html__('Primary Registrant', 'event_espresso'), |
|
59 | + 'description' => esc_html__('This template is what the primary registrant (the person who made the main registration) will receive when the payment is declined', 'event_espresso') |
|
60 | + ) |
|
61 | + ); |
|
62 | + } |
|
63 | 63 | } |
@@ -18,30 +18,30 @@ |
||
18 | 18 | */ |
19 | 19 | class PayPalProSettingsForm extends PayPalSettingsForm |
20 | 20 | { |
21 | - /** |
|
22 | - * SettingsForm constructor. |
|
23 | - * |
|
24 | - * @param array $options_array |
|
25 | - * @param string $help_tab_link |
|
26 | - */ |
|
27 | - public function __construct(array $options_array = array(), $help_tab_link = '') |
|
28 | - { |
|
29 | - $options_array = array_replace_recursive( |
|
30 | - array( |
|
31 | - 'extra_meta_inputs' => array( |
|
32 | - 'credit_card_types' => new EE_Checkbox_Multi_Input( |
|
33 | - EE_PMT_Paypal_Pro::card_types_supported(), |
|
34 | - array( |
|
35 | - 'html_label_text' => esc_html__('Card Types Supported', 'event_espresso'), |
|
36 | - 'required' => true |
|
37 | - ) |
|
38 | - ), |
|
39 | - ) |
|
40 | - ), |
|
41 | - $options_array |
|
42 | - ); |
|
43 | - parent::__construct($options_array, $help_tab_link); |
|
44 | - } |
|
21 | + /** |
|
22 | + * SettingsForm constructor. |
|
23 | + * |
|
24 | + * @param array $options_array |
|
25 | + * @param string $help_tab_link |
|
26 | + */ |
|
27 | + public function __construct(array $options_array = array(), $help_tab_link = '') |
|
28 | + { |
|
29 | + $options_array = array_replace_recursive( |
|
30 | + array( |
|
31 | + 'extra_meta_inputs' => array( |
|
32 | + 'credit_card_types' => new EE_Checkbox_Multi_Input( |
|
33 | + EE_PMT_Paypal_Pro::card_types_supported(), |
|
34 | + array( |
|
35 | + 'html_label_text' => esc_html__('Card Types Supported', 'event_espresso'), |
|
36 | + 'required' => true |
|
37 | + ) |
|
38 | + ), |
|
39 | + ) |
|
40 | + ), |
|
41 | + $options_array |
|
42 | + ); |
|
43 | + parent::__construct($options_array, $help_tab_link); |
|
44 | + } |
|
45 | 45 | } |
46 | 46 | // End of file SettingsForm.php |
47 | 47 | // Location: EventEspresso/caffeinated/payment_methods/PayPal_Pro/forms/PayPalProSettingsForm.php |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | */ |
32 | 32 | protected function _setup_properties() |
33 | 33 | { |
34 | - require_once($this->file_folder() . 'EEG_Aim.gateway.php'); |
|
34 | + require_once($this->file_folder().'EEG_Aim.gateway.php'); |
|
35 | 35 | $this->_gateway = new EEG_Aim(); |
36 | 36 | $this->_pretty_name = esc_html__("Authorize.net AIM", 'event_espresso'); |
37 | 37 | $this->_default_description = esc_html__('Please provide the following billing information.', 'event_espresso'); |
@@ -128,13 +128,13 @@ discard block |
||
128 | 128 | $billing_form->get_input('cvv')->set_default('123'); |
129 | 129 | } |
130 | 130 | $billing_form->add_subsections( |
131 | - array( 'fyi_about_autofill' => $billing_form->payment_fields_autofilled_notice_html() ), |
|
131 | + array('fyi_about_autofill' => $billing_form->payment_fields_autofilled_notice_html()), |
|
132 | 132 | 'credit_card' |
133 | 133 | ); |
134 | 134 | $billing_form->add_subsections( |
135 | 135 | array( |
136 | 136 | 'debug_content' => new EE_Form_Section_HTML_From_Template( |
137 | - __DIR__ . '/templates/authorize_net_aim_debug_info.template.php' |
|
137 | + __DIR__.'/templates/authorize_net_aim_debug_info.template.php' |
|
138 | 138 | ) |
139 | 139 | ), |
140 | 140 | 'first_name' |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | 'html_label_text' => sprintf(esc_html__("Required Payment Form Fields %s", 'event_espresso'), $this->get_help_tab_link()), |
190 | 190 | 'default' => array_diff( |
191 | 191 | array_keys($billing_input_names), |
192 | - array( 'address2', 'phone', 'company', 'fax' ) |
|
192 | + array('address2', 'phone', 'company', 'fax') |
|
193 | 193 | ), |
194 | 194 | 'html_help_text' => esc_html__('Note: if fields are excluded they cannot be required.', 'event_espresso') |
195 | 195 | ) |
@@ -234,7 +234,7 @@ discard block |
||
234 | 234 | { |
235 | 235 | $all_billing_values_empty = array(); |
236 | 236 | foreach (array_keys($this->billing_input_names()) as $input_name) { |
237 | - $all_billing_values_empty[ $input_name ] = ''; |
|
237 | + $all_billing_values_empty[$input_name] = ''; |
|
238 | 238 | } |
239 | 239 | return array_merge( |
240 | 240 | $all_billing_values_empty, |
@@ -10,261 +10,261 @@ |
||
10 | 10 | */ |
11 | 11 | class EE_PMT_Aim extends EE_PMT_Base |
12 | 12 | { |
13 | - /** |
|
14 | - * @param EE_Payment_Method $pm_instance |
|
15 | - * @return EE_PMT_Aim |
|
16 | - * @throws \EE_Error |
|
17 | - */ |
|
18 | - public function __construct($pm_instance = null) |
|
19 | - { |
|
20 | - $this->_setup_properties(); |
|
21 | - parent::__construct($pm_instance); |
|
22 | - } |
|
13 | + /** |
|
14 | + * @param EE_Payment_Method $pm_instance |
|
15 | + * @return EE_PMT_Aim |
|
16 | + * @throws \EE_Error |
|
17 | + */ |
|
18 | + public function __construct($pm_instance = null) |
|
19 | + { |
|
20 | + $this->_setup_properties(); |
|
21 | + parent::__construct($pm_instance); |
|
22 | + } |
|
23 | 23 | |
24 | - /** |
|
25 | - * Sets up payment method type properties for this gateway, which is normally |
|
26 | - * done in the constructor, but we want this to be easy for similar gateways to override |
|
27 | - * while still calling the parent constructor. |
|
28 | - * So children should override this method instead of __construct |
|
29 | - */ |
|
30 | - protected function _setup_properties() |
|
31 | - { |
|
32 | - require_once($this->file_folder() . 'EEG_Aim.gateway.php'); |
|
33 | - $this->_gateway = new EEG_Aim(); |
|
34 | - $this->_pretty_name = esc_html__("Authorize.net AIM", 'event_espresso'); |
|
35 | - $this->_default_description = esc_html__('Please provide the following billing information.', 'event_espresso'); |
|
36 | - $this->_requires_https = true; |
|
37 | - } |
|
24 | + /** |
|
25 | + * Sets up payment method type properties for this gateway, which is normally |
|
26 | + * done in the constructor, but we want this to be easy for similar gateways to override |
|
27 | + * while still calling the parent constructor. |
|
28 | + * So children should override this method instead of __construct |
|
29 | + */ |
|
30 | + protected function _setup_properties() |
|
31 | + { |
|
32 | + require_once($this->file_folder() . 'EEG_Aim.gateway.php'); |
|
33 | + $this->_gateway = new EEG_Aim(); |
|
34 | + $this->_pretty_name = esc_html__("Authorize.net AIM", 'event_espresso'); |
|
35 | + $this->_default_description = esc_html__('Please provide the following billing information.', 'event_espresso'); |
|
36 | + $this->_requires_https = true; |
|
37 | + } |
|
38 | 38 | |
39 | 39 | |
40 | 40 | |
41 | - /** |
|
42 | - * Creates the billing form for this payment method type |
|
43 | - * |
|
44 | - * @param \EE_Transaction $transaction |
|
45 | - * @return EE_Billing_Info_Form |
|
46 | - * @throws \EE_Error |
|
47 | - */ |
|
48 | - public function generate_new_billing_form(EE_Transaction $transaction = null) |
|
49 | - { |
|
50 | - $billing_form = new EE_Billing_Attendee_Info_Form($this->_pm_instance, array( |
|
51 | - 'name' => 'AIM_Form', |
|
52 | - 'subsections' => array( |
|
53 | - 'credit_card' => new EE_Credit_Card_Input(array( |
|
54 | - 'required' => true, |
|
55 | - 'html_label_text' => esc_html__('Card Number', 'event_espresso') |
|
56 | - )), |
|
57 | - 'exp_month' => new EE_Credit_Card_Month_Input(true, array( |
|
58 | - 'required' => true, |
|
59 | - 'html_label_text' => esc_html__('Expiry Month', 'event_espresso') |
|
60 | - )), |
|
61 | - 'exp_year' => new EE_Credit_Card_Year_Input(array( |
|
62 | - 'required' => true, |
|
63 | - 'html_label_text' => esc_html__('Expiry Year', 'event_espresso') |
|
64 | - )), |
|
65 | - 'cvv' => new EE_CVV_Input(array( |
|
66 | - 'required' => true, |
|
67 | - 'html_label_text' => esc_html__('CVV', 'event_espresso') )), |
|
68 | - ) |
|
69 | - )); |
|
70 | - $billing_form->add_subsections(array( |
|
71 | - 'company' => new EE_Text_Input(array( |
|
72 | - 'html_label_text' => esc_html__('Company', 'event_espresso') |
|
73 | - )) |
|
74 | - ), 'email', false); |
|
75 | - $billing_form->add_subsections( |
|
76 | - array( |
|
77 | - 'fax' => new EE_Text_Input(array( |
|
78 | - 'html_label_text' => esc_html__('Fax', 'event_espresso') |
|
79 | - )) |
|
80 | - ), |
|
81 | - 'phone', |
|
82 | - false |
|
83 | - ); |
|
84 | - $settings_form = $this->settings_form(); |
|
85 | - if ($settings_form->get_input('excluded_billing_inputs') instanceof EE_Checkbox_Multi_Input) { |
|
86 | - $billing_form->exclude($settings_form->get_input('excluded_billing_inputs')->normalized_value()); |
|
87 | - } |
|
88 | - if ($settings_form->get_input('required_billing_inputs') instanceof EE_Checkbox_Multi_Input) { |
|
89 | - $required_inputs = $settings_form->get_input('required_billing_inputs')->normalized_value(); |
|
90 | - // only change the requirement of inputs which are allowed to be changed |
|
91 | - /** @var EE_Form_Input_Base[] $inputs_to_evaluate */ |
|
92 | - $inputs_to_evaluate = array_intersect_key( |
|
93 | - $billing_form->inputs(), |
|
94 | - $this->billing_input_names() |
|
95 | - ); |
|
96 | - foreach ($inputs_to_evaluate as $input_name => $input) { |
|
97 | - if (in_array($input_name, $required_inputs)) { |
|
98 | - $input->set_required(true); |
|
99 | - } else { |
|
100 | - $input->set_required(false); |
|
101 | - } |
|
102 | - } |
|
103 | - } |
|
104 | - return $this->apply_billing_form_debug_settings($billing_form); |
|
105 | - } |
|
41 | + /** |
|
42 | + * Creates the billing form for this payment method type |
|
43 | + * |
|
44 | + * @param \EE_Transaction $transaction |
|
45 | + * @return EE_Billing_Info_Form |
|
46 | + * @throws \EE_Error |
|
47 | + */ |
|
48 | + public function generate_new_billing_form(EE_Transaction $transaction = null) |
|
49 | + { |
|
50 | + $billing_form = new EE_Billing_Attendee_Info_Form($this->_pm_instance, array( |
|
51 | + 'name' => 'AIM_Form', |
|
52 | + 'subsections' => array( |
|
53 | + 'credit_card' => new EE_Credit_Card_Input(array( |
|
54 | + 'required' => true, |
|
55 | + 'html_label_text' => esc_html__('Card Number', 'event_espresso') |
|
56 | + )), |
|
57 | + 'exp_month' => new EE_Credit_Card_Month_Input(true, array( |
|
58 | + 'required' => true, |
|
59 | + 'html_label_text' => esc_html__('Expiry Month', 'event_espresso') |
|
60 | + )), |
|
61 | + 'exp_year' => new EE_Credit_Card_Year_Input(array( |
|
62 | + 'required' => true, |
|
63 | + 'html_label_text' => esc_html__('Expiry Year', 'event_espresso') |
|
64 | + )), |
|
65 | + 'cvv' => new EE_CVV_Input(array( |
|
66 | + 'required' => true, |
|
67 | + 'html_label_text' => esc_html__('CVV', 'event_espresso') )), |
|
68 | + ) |
|
69 | + )); |
|
70 | + $billing_form->add_subsections(array( |
|
71 | + 'company' => new EE_Text_Input(array( |
|
72 | + 'html_label_text' => esc_html__('Company', 'event_espresso') |
|
73 | + )) |
|
74 | + ), 'email', false); |
|
75 | + $billing_form->add_subsections( |
|
76 | + array( |
|
77 | + 'fax' => new EE_Text_Input(array( |
|
78 | + 'html_label_text' => esc_html__('Fax', 'event_espresso') |
|
79 | + )) |
|
80 | + ), |
|
81 | + 'phone', |
|
82 | + false |
|
83 | + ); |
|
84 | + $settings_form = $this->settings_form(); |
|
85 | + if ($settings_form->get_input('excluded_billing_inputs') instanceof EE_Checkbox_Multi_Input) { |
|
86 | + $billing_form->exclude($settings_form->get_input('excluded_billing_inputs')->normalized_value()); |
|
87 | + } |
|
88 | + if ($settings_form->get_input('required_billing_inputs') instanceof EE_Checkbox_Multi_Input) { |
|
89 | + $required_inputs = $settings_form->get_input('required_billing_inputs')->normalized_value(); |
|
90 | + // only change the requirement of inputs which are allowed to be changed |
|
91 | + /** @var EE_Form_Input_Base[] $inputs_to_evaluate */ |
|
92 | + $inputs_to_evaluate = array_intersect_key( |
|
93 | + $billing_form->inputs(), |
|
94 | + $this->billing_input_names() |
|
95 | + ); |
|
96 | + foreach ($inputs_to_evaluate as $input_name => $input) { |
|
97 | + if (in_array($input_name, $required_inputs)) { |
|
98 | + $input->set_required(true); |
|
99 | + } else { |
|
100 | + $input->set_required(false); |
|
101 | + } |
|
102 | + } |
|
103 | + } |
|
104 | + return $this->apply_billing_form_debug_settings($billing_form); |
|
105 | + } |
|
106 | 106 | |
107 | 107 | |
108 | 108 | |
109 | - /** |
|
110 | - * apply_billing_form_debug_settings |
|
111 | - * applies debug data to the form |
|
112 | - * |
|
113 | - * @param \EE_Billing_Info_Form $billing_form |
|
114 | - * @return \EE_Billing_Info_Form |
|
115 | - * @throws \EE_Error |
|
116 | - */ |
|
117 | - public function apply_billing_form_debug_settings(EE_Billing_Info_Form $billing_form) |
|
118 | - { |
|
119 | - if ( |
|
120 | - $this->_pm_instance->debug_mode() |
|
121 | - || $this->_pm_instance->get_extra_meta('test_transactions', true, false) |
|
122 | - ) { |
|
123 | - $billing_form->get_input('credit_card')->set_default('4007000000027'); |
|
124 | - $billing_form->get_input('exp_year')->set_default('2020'); |
|
125 | - if ($billing_form->get_subsection('cvv') instanceof EE_Form_Input_Base) { |
|
126 | - $billing_form->get_input('cvv')->set_default('123'); |
|
127 | - } |
|
128 | - $billing_form->add_subsections( |
|
129 | - array( 'fyi_about_autofill' => $billing_form->payment_fields_autofilled_notice_html() ), |
|
130 | - 'credit_card' |
|
131 | - ); |
|
132 | - $billing_form->add_subsections( |
|
133 | - array( |
|
134 | - 'debug_content' => new EE_Form_Section_HTML_From_Template( |
|
135 | - __DIR__ . '/templates/authorize_net_aim_debug_info.template.php' |
|
136 | - ) |
|
137 | - ), |
|
138 | - 'first_name' |
|
139 | - ); |
|
140 | - } |
|
141 | - return $billing_form; |
|
142 | - } |
|
109 | + /** |
|
110 | + * apply_billing_form_debug_settings |
|
111 | + * applies debug data to the form |
|
112 | + * |
|
113 | + * @param \EE_Billing_Info_Form $billing_form |
|
114 | + * @return \EE_Billing_Info_Form |
|
115 | + * @throws \EE_Error |
|
116 | + */ |
|
117 | + public function apply_billing_form_debug_settings(EE_Billing_Info_Form $billing_form) |
|
118 | + { |
|
119 | + if ( |
|
120 | + $this->_pm_instance->debug_mode() |
|
121 | + || $this->_pm_instance->get_extra_meta('test_transactions', true, false) |
|
122 | + ) { |
|
123 | + $billing_form->get_input('credit_card')->set_default('4007000000027'); |
|
124 | + $billing_form->get_input('exp_year')->set_default('2020'); |
|
125 | + if ($billing_form->get_subsection('cvv') instanceof EE_Form_Input_Base) { |
|
126 | + $billing_form->get_input('cvv')->set_default('123'); |
|
127 | + } |
|
128 | + $billing_form->add_subsections( |
|
129 | + array( 'fyi_about_autofill' => $billing_form->payment_fields_autofilled_notice_html() ), |
|
130 | + 'credit_card' |
|
131 | + ); |
|
132 | + $billing_form->add_subsections( |
|
133 | + array( |
|
134 | + 'debug_content' => new EE_Form_Section_HTML_From_Template( |
|
135 | + __DIR__ . '/templates/authorize_net_aim_debug_info.template.php' |
|
136 | + ) |
|
137 | + ), |
|
138 | + 'first_name' |
|
139 | + ); |
|
140 | + } |
|
141 | + return $billing_form; |
|
142 | + } |
|
143 | 143 | |
144 | 144 | |
145 | 145 | |
146 | - /** |
|
147 | - * Gets the form for all the settings related to this payment method type |
|
148 | - * @return EE_Payment_Method_Form |
|
149 | - */ |
|
150 | - public function generate_new_settings_form() |
|
151 | - { |
|
152 | - $billing_input_names = $this->billing_input_names(); |
|
153 | - return new EE_Payment_Method_Form( |
|
154 | - array( |
|
155 | - 'extra_meta_inputs' => array( |
|
156 | - 'login_id' => new EE_Text_Input( |
|
157 | - array( |
|
158 | - 'html_label_text' => sprintf(esc_html__("Authorize.net API Login ID %s", "event_espresso"), $this->get_help_tab_link()), |
|
159 | - 'required' => true ) |
|
160 | - ), |
|
161 | - 'transaction_key' => new EE_Text_Input( |
|
162 | - array( |
|
163 | - 'html_label_text' => sprintf(esc_html__("Authorize.net Transaction Key %s", "event_espresso"), $this->get_help_tab_link()), |
|
164 | - 'required' => true ) |
|
165 | - ), |
|
166 | - 'test_transactions' => new EE_Yes_No_Input( |
|
167 | - array( |
|
168 | - 'html_label_text' => sprintf(esc_html__("Send test transactions? %s", 'event_espresso'), $this->get_help_tab_link()), |
|
169 | - 'html_help_text' => esc_html__("Send test transactions, even to live server", 'event_espresso'), |
|
170 | - 'default' => false, |
|
171 | - 'required' => true |
|
172 | - ) |
|
173 | - ), |
|
174 | - 'excluded_billing_inputs' => new EE_Checkbox_Multi_Input( |
|
175 | - $billing_input_names, |
|
176 | - array( |
|
177 | - 'html_label_text' => sprintf(esc_html__("Excluded Payment Form Fields %s", 'event_espresso'), $this->get_help_tab_link()), |
|
178 | - 'default' => array( |
|
179 | - 'company', |
|
180 | - 'fax', |
|
181 | - ) |
|
182 | - ) |
|
183 | - ), |
|
184 | - 'required_billing_inputs' => new EE_Checkbox_Multi_Input( |
|
185 | - $billing_input_names, |
|
186 | - array( |
|
187 | - 'html_label_text' => sprintf(esc_html__("Required Payment Form Fields %s", 'event_espresso'), $this->get_help_tab_link()), |
|
188 | - 'default' => array_diff( |
|
189 | - array_keys($billing_input_names), |
|
190 | - array( 'address2', 'phone', 'company', 'fax' ) |
|
191 | - ), |
|
192 | - 'html_help_text' => esc_html__('Note: if fields are excluded they cannot be required.', 'event_espresso') |
|
193 | - ) |
|
194 | - ), |
|
195 | - ) |
|
196 | - ) |
|
197 | - ); |
|
198 | - } |
|
146 | + /** |
|
147 | + * Gets the form for all the settings related to this payment method type |
|
148 | + * @return EE_Payment_Method_Form |
|
149 | + */ |
|
150 | + public function generate_new_settings_form() |
|
151 | + { |
|
152 | + $billing_input_names = $this->billing_input_names(); |
|
153 | + return new EE_Payment_Method_Form( |
|
154 | + array( |
|
155 | + 'extra_meta_inputs' => array( |
|
156 | + 'login_id' => new EE_Text_Input( |
|
157 | + array( |
|
158 | + 'html_label_text' => sprintf(esc_html__("Authorize.net API Login ID %s", "event_espresso"), $this->get_help_tab_link()), |
|
159 | + 'required' => true ) |
|
160 | + ), |
|
161 | + 'transaction_key' => new EE_Text_Input( |
|
162 | + array( |
|
163 | + 'html_label_text' => sprintf(esc_html__("Authorize.net Transaction Key %s", "event_espresso"), $this->get_help_tab_link()), |
|
164 | + 'required' => true ) |
|
165 | + ), |
|
166 | + 'test_transactions' => new EE_Yes_No_Input( |
|
167 | + array( |
|
168 | + 'html_label_text' => sprintf(esc_html__("Send test transactions? %s", 'event_espresso'), $this->get_help_tab_link()), |
|
169 | + 'html_help_text' => esc_html__("Send test transactions, even to live server", 'event_espresso'), |
|
170 | + 'default' => false, |
|
171 | + 'required' => true |
|
172 | + ) |
|
173 | + ), |
|
174 | + 'excluded_billing_inputs' => new EE_Checkbox_Multi_Input( |
|
175 | + $billing_input_names, |
|
176 | + array( |
|
177 | + 'html_label_text' => sprintf(esc_html__("Excluded Payment Form Fields %s", 'event_espresso'), $this->get_help_tab_link()), |
|
178 | + 'default' => array( |
|
179 | + 'company', |
|
180 | + 'fax', |
|
181 | + ) |
|
182 | + ) |
|
183 | + ), |
|
184 | + 'required_billing_inputs' => new EE_Checkbox_Multi_Input( |
|
185 | + $billing_input_names, |
|
186 | + array( |
|
187 | + 'html_label_text' => sprintf(esc_html__("Required Payment Form Fields %s", 'event_espresso'), $this->get_help_tab_link()), |
|
188 | + 'default' => array_diff( |
|
189 | + array_keys($billing_input_names), |
|
190 | + array( 'address2', 'phone', 'company', 'fax' ) |
|
191 | + ), |
|
192 | + 'html_help_text' => esc_html__('Note: if fields are excluded they cannot be required.', 'event_espresso') |
|
193 | + ) |
|
194 | + ), |
|
195 | + ) |
|
196 | + ) |
|
197 | + ); |
|
198 | + } |
|
199 | 199 | |
200 | - /** |
|
201 | - * Returns an array where keys are the slugs for billing inputs, and values |
|
202 | - * are their i18n names |
|
203 | - * @return array |
|
204 | - */ |
|
205 | - public function billing_input_names() |
|
206 | - { |
|
207 | - return array( |
|
208 | - 'first_name' => esc_html__('First Name', 'event_espresso'), |
|
209 | - 'last_name' => esc_html__('Last Name', 'event_espresso'), |
|
210 | - 'email' => esc_html__('Email', 'event_espresso'), |
|
211 | - 'company' => esc_html__('Company', 'event_espresso'), |
|
212 | - 'address' => esc_html__('Address', 'event_espresso'), |
|
213 | - 'address2' => esc_html__('Address2', 'event_espresso'), |
|
214 | - 'city' => esc_html__('City', 'event_espresso'), |
|
215 | - 'state' => esc_html__('State', 'event_espresso'), |
|
216 | - 'country' => esc_html__('Country', 'event_espresso'), |
|
217 | - 'zip' => esc_html__('Zip', 'event_espresso'), |
|
218 | - 'phone' => esc_html__('Phone', 'event_espresso'), |
|
219 | - 'fax' => esc_html__('Fax', 'event_espresso'), |
|
220 | - 'cvv' => esc_html__('CVV', 'event_espresso') |
|
221 | - ); |
|
222 | - } |
|
200 | + /** |
|
201 | + * Returns an array where keys are the slugs for billing inputs, and values |
|
202 | + * are their i18n names |
|
203 | + * @return array |
|
204 | + */ |
|
205 | + public function billing_input_names() |
|
206 | + { |
|
207 | + return array( |
|
208 | + 'first_name' => esc_html__('First Name', 'event_espresso'), |
|
209 | + 'last_name' => esc_html__('Last Name', 'event_espresso'), |
|
210 | + 'email' => esc_html__('Email', 'event_espresso'), |
|
211 | + 'company' => esc_html__('Company', 'event_espresso'), |
|
212 | + 'address' => esc_html__('Address', 'event_espresso'), |
|
213 | + 'address2' => esc_html__('Address2', 'event_espresso'), |
|
214 | + 'city' => esc_html__('City', 'event_espresso'), |
|
215 | + 'state' => esc_html__('State', 'event_espresso'), |
|
216 | + 'country' => esc_html__('Country', 'event_espresso'), |
|
217 | + 'zip' => esc_html__('Zip', 'event_espresso'), |
|
218 | + 'phone' => esc_html__('Phone', 'event_espresso'), |
|
219 | + 'fax' => esc_html__('Fax', 'event_espresso'), |
|
220 | + 'cvv' => esc_html__('CVV', 'event_espresso') |
|
221 | + ); |
|
222 | + } |
|
223 | 223 | |
224 | - /** |
|
225 | - * Overrides parent so we always have all billing inputs in the returned array, |
|
226 | - * not just the ones included at the time. This helps simplify the gateway code |
|
227 | - * |
|
228 | - * @param EE_Billing_Info_Form $billing_form |
|
229 | - * @return array |
|
230 | - */ |
|
231 | - protected function _get_billing_values_from_form($billing_form) |
|
232 | - { |
|
233 | - $all_billing_values_empty = array(); |
|
234 | - foreach (array_keys($this->billing_input_names()) as $input_name) { |
|
235 | - $all_billing_values_empty[ $input_name ] = ''; |
|
236 | - } |
|
237 | - return array_merge( |
|
238 | - $all_billing_values_empty, |
|
239 | - parent::_get_billing_values_from_form($billing_form) |
|
240 | - ); |
|
241 | - } |
|
224 | + /** |
|
225 | + * Overrides parent so we always have all billing inputs in the returned array, |
|
226 | + * not just the ones included at the time. This helps simplify the gateway code |
|
227 | + * |
|
228 | + * @param EE_Billing_Info_Form $billing_form |
|
229 | + * @return array |
|
230 | + */ |
|
231 | + protected function _get_billing_values_from_form($billing_form) |
|
232 | + { |
|
233 | + $all_billing_values_empty = array(); |
|
234 | + foreach (array_keys($this->billing_input_names()) as $input_name) { |
|
235 | + $all_billing_values_empty[ $input_name ] = ''; |
|
236 | + } |
|
237 | + return array_merge( |
|
238 | + $all_billing_values_empty, |
|
239 | + parent::_get_billing_values_from_form($billing_form) |
|
240 | + ); |
|
241 | + } |
|
242 | 242 | |
243 | 243 | |
244 | 244 | |
245 | - /** |
|
246 | - * Adds the help tab |
|
247 | - * @see EE_PMT_Base::help_tabs_config() |
|
248 | - * @return array |
|
249 | - */ |
|
250 | - public function help_tabs_config() |
|
251 | - { |
|
252 | - return array( |
|
253 | - $this->get_help_tab_name() => array( |
|
254 | - 'title' => esc_html__('Authorize.net AIM Settings', 'event_espresso'), |
|
255 | - 'filename' => 'payment_methods_overview_aim' |
|
256 | - ), |
|
257 | - ); |
|
258 | - } |
|
245 | + /** |
|
246 | + * Adds the help tab |
|
247 | + * @see EE_PMT_Base::help_tabs_config() |
|
248 | + * @return array |
|
249 | + */ |
|
250 | + public function help_tabs_config() |
|
251 | + { |
|
252 | + return array( |
|
253 | + $this->get_help_tab_name() => array( |
|
254 | + 'title' => esc_html__('Authorize.net AIM Settings', 'event_espresso'), |
|
255 | + 'filename' => 'payment_methods_overview_aim' |
|
256 | + ), |
|
257 | + ); |
|
258 | + } |
|
259 | 259 | |
260 | 260 | |
261 | 261 | |
262 | - /** |
|
263 | - * Gets a list of instructions and/or information regarding how the payment is to be completed |
|
264 | - * @return string |
|
265 | - */ |
|
266 | - public function payment_information() |
|
267 | - { |
|
268 | - // TODO: Implement payment_information() method. |
|
269 | - } |
|
262 | + /** |
|
263 | + * Gets a list of instructions and/or information regarding how the payment is to be completed |
|
264 | + * @return string |
|
265 | + */ |
|
266 | + public function payment_information() |
|
267 | + { |
|
268 | + // TODO: Implement payment_information() method. |
|
269 | + } |
|
270 | 270 | } |
@@ -16,17 +16,17 @@ |
||
16 | 16 | |
17 | 17 | ?> |
18 | 18 | <p> |
19 | - <?php esc_html_e('Event Organizer: ', 'event_espresso') . espresso_organization_name($EVT_ID); ?> |
|
19 | + <?php esc_html_e('Event Organizer: ', 'event_espresso').espresso_organization_name($EVT_ID); ?> |
|
20 | 20 | <br/> |
21 | - <?php esc_html_e('Organizer Email: ', 'event_espresso') . espresso_organization_email($EVT_ID); ?> |
|
21 | + <?php esc_html_e('Organizer Email: ', 'event_espresso').espresso_organization_email($EVT_ID); ?> |
|
22 | 22 | <br/> |
23 | - <?php esc_html_e('Event Phone: ', 'event_espresso') . espresso_event_phone($EVT_ID); ?> |
|
23 | + <?php esc_html_e('Event Phone: ', 'event_espresso').espresso_event_phone($EVT_ID); ?> |
|
24 | 24 | </p> |
25 | -<p><?php esc_html_e('Event Status: ', 'event_espresso') . espresso_event_status($EVT_ID); ?></p> |
|
26 | -<p><?php esc_html_e('Categories: ', 'event_espresso') . espresso_event_categories($EVT_ID); ?></p> |
|
27 | -<?php esc_html_e('Dates and Times: ', 'event_espresso') . espresso_list_of_event_dates($EVT_ID); ?> |
|
28 | -<?php esc_html_e('Available Tickets: ', 'event_espresso') . espresso_event_tickets_available($EVT_ID); ?> |
|
29 | -<p><?php esc_html_e('Event Venue: ', 'event_espresso') . espresso_venue_name(null, false); ?></p> |
|
30 | -<p><?php esc_html_e('Description: ', 'event_espresso') . $event_description; ?></p> |
|
25 | +<p><?php esc_html_e('Event Status: ', 'event_espresso').espresso_event_status($EVT_ID); ?></p> |
|
26 | +<p><?php esc_html_e('Categories: ', 'event_espresso').espresso_event_categories($EVT_ID); ?></p> |
|
27 | +<?php esc_html_e('Dates and Times: ', 'event_espresso').espresso_list_of_event_dates($EVT_ID); ?> |
|
28 | +<?php esc_html_e('Available Tickets: ', 'event_espresso').espresso_event_tickets_available($EVT_ID); ?> |
|
29 | +<p><?php esc_html_e('Event Venue: ', 'event_espresso').espresso_venue_name(null, false); ?></p> |
|
30 | +<p><?php esc_html_e('Description: ', 'event_espresso').$event_description; ?></p> |
|
31 | 31 | <br/> |
32 | 32 | |
33 | 33 | \ No newline at end of file |
@@ -16,15 +16,15 @@ |
||
16 | 16 | |
17 | 17 | ?> |
18 | 18 | <p> |
19 | - <?php esc_html_e('Organizer Name: ', 'event_espresso') . espresso_organization_name($VNU_ID); ?> |
|
19 | + <?php esc_html_e('Organizer Name: ', 'event_espresso').espresso_organization_name($VNU_ID); ?> |
|
20 | 20 | <br/> |
21 | - <?php esc_html_e('Organizer Email: ', 'event_espresso') . espresso_organization_email($VNU_ID); ?> |
|
21 | + <?php esc_html_e('Organizer Email: ', 'event_espresso').espresso_organization_email($VNU_ID); ?> |
|
22 | 22 | <br/> |
23 | - <?php esc_html_e('Venue Phone: ', 'event_espresso') . espresso_venue_phone($VNU_ID); ?> |
|
23 | + <?php esc_html_e('Venue Phone: ', 'event_espresso').espresso_venue_phone($VNU_ID); ?> |
|
24 | 24 | </p> |
25 | -<p><?php esc_html_e('Categories: ', 'event_espresso') . espresso_venue_categories($VNU_ID); ?></p> |
|
26 | -<p><?php esc_html_e('Address: ', 'event_espresso') . espresso_venue_address($VNU_ID); ?></p> |
|
27 | -<p><?php esc_html_e('Website: ', 'event_espresso') . espresso_venue_website($VNU_ID); ?></p> |
|
28 | -<p><?php esc_html_e('Description: ', 'event_espresso') . $venue_description; ?></p> |
|
25 | +<p><?php esc_html_e('Categories: ', 'event_espresso').espresso_venue_categories($VNU_ID); ?></p> |
|
26 | +<p><?php esc_html_e('Address: ', 'event_espresso').espresso_venue_address($VNU_ID); ?></p> |
|
27 | +<p><?php esc_html_e('Website: ', 'event_espresso').espresso_venue_website($VNU_ID); ?></p> |
|
28 | +<p><?php esc_html_e('Description: ', 'event_espresso').$venue_description; ?></p> |
|
29 | 29 | <br/> |
30 | 30 | |
31 | 31 | \ No newline at end of file |
@@ -10,9 +10,9 @@ |
||
10 | 10 | <head> |
11 | 11 | <title>[organization]<?php esc_html__(' Invoice #', 'event_espresso'); ?>[registration_code] |
12 | 12 | <?php esc_html__( |
13 | - ' for ', |
|
14 | - 'event_espresso' |
|
15 | - ); ?>[name]</title> |
|
13 | + ' for ', |
|
14 | + 'event_espresso' |
|
15 | + ); ?>[name]</title> |
|
16 | 16 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
17 | 17 | <!-- Base Stylesheet do not change or remove --> |
18 | 18 | <link rel="stylesheet" type="text/css" href="[base_url]base.css" media="screen"/> |
@@ -55,8 +55,8 @@ |
||
55 | 55 | */ |
56 | 56 | public function run($WP) |
57 | 57 | { |
58 | - if (is_readable(EE_MODULES . 'gateways/Invoice/lib/Invoice.class.php')) { |
|
59 | - require_once(EE_MODULES . 'gateways/Invoice/lib/Invoice.class.php'); |
|
58 | + if (is_readable(EE_MODULES.'gateways/Invoice/lib/Invoice.class.php')) { |
|
59 | + require_once(EE_MODULES.'gateways/Invoice/lib/Invoice.class.php'); |
|
60 | 60 | } else { |
61 | 61 | $msg = esc_html__('The Invoice.class.php file could not be loaded.', 'event_espresso'); |
62 | 62 | EE_Error::add_error($msg, __FILE__, __FUNCTION__, __LINE__); |
@@ -10,91 +10,91 @@ |
||
10 | 10 | */ |
11 | 11 | class EED_Invoice extends EED_Module |
12 | 12 | { |
13 | - /** |
|
14 | - * @return EED_Invoice|EED_Module |
|
15 | - * @throws EE_Error |
|
16 | - * @throws ReflectionException |
|
17 | - */ |
|
18 | - public static function instance() |
|
19 | - { |
|
20 | - return parent::get_instance(__CLASS__); |
|
21 | - } |
|
13 | + /** |
|
14 | + * @return EED_Invoice|EED_Module |
|
15 | + * @throws EE_Error |
|
16 | + * @throws ReflectionException |
|
17 | + */ |
|
18 | + public static function instance() |
|
19 | + { |
|
20 | + return parent::get_instance(__CLASS__); |
|
21 | + } |
|
22 | 22 | |
23 | 23 | |
24 | - /** |
|
25 | - * set_hooks - for hooking into EE Core, other modules, etc |
|
26 | - * |
|
27 | - * @access public |
|
28 | - * @return void |
|
29 | - */ |
|
30 | - public static function set_hooks() |
|
31 | - { |
|
32 | - EE_Config::register_route('download_invoice', 'EED_Invoice', 'download_invoice'); |
|
33 | - EE_Config::register_route('launch_invoice', 'EED_Invoice', 'launch_invoice'); |
|
34 | - } |
|
24 | + /** |
|
25 | + * set_hooks - for hooking into EE Core, other modules, etc |
|
26 | + * |
|
27 | + * @access public |
|
28 | + * @return void |
|
29 | + */ |
|
30 | + public static function set_hooks() |
|
31 | + { |
|
32 | + EE_Config::register_route('download_invoice', 'EED_Invoice', 'download_invoice'); |
|
33 | + EE_Config::register_route('launch_invoice', 'EED_Invoice', 'launch_invoice'); |
|
34 | + } |
|
35 | 35 | |
36 | 36 | |
37 | - /** |
|
38 | - * set_hooks_admin - for hooking into EE Admin Core, other modules, etc |
|
39 | - * |
|
40 | - * @access public |
|
41 | - * @return void |
|
42 | - */ |
|
43 | - public static function set_hooks_admin() |
|
44 | - { |
|
45 | - } |
|
37 | + /** |
|
38 | + * set_hooks_admin - for hooking into EE Admin Core, other modules, etc |
|
39 | + * |
|
40 | + * @access public |
|
41 | + * @return void |
|
42 | + */ |
|
43 | + public static function set_hooks_admin() |
|
44 | + { |
|
45 | + } |
|
46 | 46 | |
47 | 47 | |
48 | - /** |
|
49 | - * run - initial module setup |
|
50 | - * |
|
51 | - * @access public |
|
52 | - * @return void |
|
53 | - */ |
|
54 | - public function run($WP) |
|
55 | - { |
|
56 | - if (is_readable(EE_MODULES . 'gateways/Invoice/lib/Invoice.class.php')) { |
|
57 | - require_once(EE_MODULES . 'gateways/Invoice/lib/Invoice.class.php'); |
|
58 | - } else { |
|
59 | - $msg = esc_html__('The Invoice.class.php file could not be loaded.', 'event_espresso'); |
|
60 | - EE_Error::add_error($msg, __FILE__, __FUNCTION__, __LINE__); |
|
61 | - } |
|
62 | - } |
|
48 | + /** |
|
49 | + * run - initial module setup |
|
50 | + * |
|
51 | + * @access public |
|
52 | + * @return void |
|
53 | + */ |
|
54 | + public function run($WP) |
|
55 | + { |
|
56 | + if (is_readable(EE_MODULES . 'gateways/Invoice/lib/Invoice.class.php')) { |
|
57 | + require_once(EE_MODULES . 'gateways/Invoice/lib/Invoice.class.php'); |
|
58 | + } else { |
|
59 | + $msg = esc_html__('The Invoice.class.php file could not be loaded.', 'event_espresso'); |
|
60 | + EE_Error::add_error($msg, __FILE__, __FUNCTION__, __LINE__); |
|
61 | + } |
|
62 | + } |
|
63 | 63 | |
64 | 64 | |
65 | - /** |
|
66 | - * invoice_launch |
|
67 | - * |
|
68 | - * @access public |
|
69 | - * @return void |
|
70 | - */ |
|
71 | - public function launch_invoice() |
|
72 | - { |
|
73 | - $this->run(null); |
|
74 | - $request = self::getRequest(); |
|
75 | - if ($request->requestParamIsSet('id')) { |
|
76 | - $id = $request->getRequestParam('id', '', 'key'); |
|
77 | - $invoice = new Invoice($id); |
|
78 | - $invoice->send_invoice(); |
|
79 | - } |
|
80 | - } |
|
65 | + /** |
|
66 | + * invoice_launch |
|
67 | + * |
|
68 | + * @access public |
|
69 | + * @return void |
|
70 | + */ |
|
71 | + public function launch_invoice() |
|
72 | + { |
|
73 | + $this->run(null); |
|
74 | + $request = self::getRequest(); |
|
75 | + if ($request->requestParamIsSet('id')) { |
|
76 | + $id = $request->getRequestParam('id', '', 'key'); |
|
77 | + $invoice = new Invoice($id); |
|
78 | + $invoice->send_invoice(); |
|
79 | + } |
|
80 | + } |
|
81 | 81 | |
82 | 82 | |
83 | - /** |
|
84 | - * download_invoice |
|
85 | - * |
|
86 | - * @access public |
|
87 | - * @return void |
|
88 | - */ |
|
89 | - public function download_invoice() |
|
90 | - { |
|
91 | - $this->run(null); |
|
92 | - $request = self::getRequest(); |
|
93 | - if ($request->requestParamIsSet('id')) { |
|
94 | - $id = $request->getRequestParam('id', '', 'key'); |
|
95 | - $invoice = new Invoice($id); |
|
96 | - // send invoice but force download |
|
97 | - $invoice->send_invoice(true); |
|
98 | - } |
|
99 | - } |
|
83 | + /** |
|
84 | + * download_invoice |
|
85 | + * |
|
86 | + * @access public |
|
87 | + * @return void |
|
88 | + */ |
|
89 | + public function download_invoice() |
|
90 | + { |
|
91 | + $this->run(null); |
|
92 | + $request = self::getRequest(); |
|
93 | + if ($request->requestParamIsSet('id')) { |
|
94 | + $id = $request->getRequestParam('id', '', 'key'); |
|
95 | + $invoice = new Invoice($id); |
|
96 | + // send invoice but force download |
|
97 | + $invoice->send_invoice(true); |
|
98 | + } |
|
99 | + } |
|
100 | 100 | } |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | $txn_update_params |
99 | 99 | ); |
100 | 100 | // check if transaction has a primary registrant and that it has a related Attendee object |
101 | - if (! $this->_validate_primary_registrant()) { |
|
101 | + if ( ! $this->_validate_primary_registrant()) { |
|
102 | 102 | return false; |
103 | 103 | } |
104 | 104 | // you don't have to go home but you can't stay here ! |
@@ -229,7 +229,7 @@ discard block |
||
229 | 229 | */ |
230 | 230 | protected function _validate_primary_registrant() |
231 | 231 | { |
232 | - if (! $this->checkout->transaction_has_primary_registrant()) { |
|
232 | + if ( ! $this->checkout->transaction_has_primary_registrant()) { |
|
233 | 233 | EE_Error::add_error( |
234 | 234 | esc_html__('A valid Primary Registration for this Transaction could not be found.', 'event_espresso'), |
235 | 235 | __FILE__, |
@@ -255,7 +255,7 @@ discard block |
||
255 | 255 | public function update_reg_step() |
256 | 256 | { |
257 | 257 | EE_Error::doing_it_wrong( |
258 | - __CLASS__ . '::' . __FILE__, |
|
258 | + __CLASS__.'::'.__FILE__, |
|
259 | 259 | esc_html__( |
260 | 260 | 'Can not call update_reg_step() on the Finalize Registration reg step.', |
261 | 261 | 'event_espresso' |
@@ -14,252 +14,252 @@ |
||
14 | 14 | */ |
15 | 15 | class EE_SPCO_Reg_Step_Finalize_Registration extends EE_SPCO_Reg_Step |
16 | 16 | { |
17 | - /** |
|
18 | - * class constructor |
|
19 | - * |
|
20 | - * @access public |
|
21 | - * @param EE_Checkout $checkout |
|
22 | - */ |
|
23 | - public function __construct(EE_Checkout $checkout) |
|
24 | - { |
|
25 | - $this->request = EED_Single_Page_Checkout::getRequest(); |
|
26 | - $this->_slug = 'finalize_registration'; |
|
27 | - $this->_name = esc_html__('Finalize Registration', 'event_espresso'); |
|
28 | - $this->_submit_button_text = $this->_name; |
|
29 | - $this->_template = ''; |
|
30 | - $this->checkout = $checkout; |
|
31 | - } |
|
17 | + /** |
|
18 | + * class constructor |
|
19 | + * |
|
20 | + * @access public |
|
21 | + * @param EE_Checkout $checkout |
|
22 | + */ |
|
23 | + public function __construct(EE_Checkout $checkout) |
|
24 | + { |
|
25 | + $this->request = EED_Single_Page_Checkout::getRequest(); |
|
26 | + $this->_slug = 'finalize_registration'; |
|
27 | + $this->_name = esc_html__('Finalize Registration', 'event_espresso'); |
|
28 | + $this->_submit_button_text = $this->_name; |
|
29 | + $this->_template = ''; |
|
30 | + $this->checkout = $checkout; |
|
31 | + } |
|
32 | 32 | |
33 | 33 | |
34 | - public function translate_js_strings() |
|
35 | - { |
|
36 | - } |
|
34 | + public function translate_js_strings() |
|
35 | + { |
|
36 | + } |
|
37 | 37 | |
38 | 38 | |
39 | - public function enqueue_styles_and_scripts() |
|
40 | - { |
|
41 | - } |
|
39 | + public function enqueue_styles_and_scripts() |
|
40 | + { |
|
41 | + } |
|
42 | 42 | |
43 | 43 | |
44 | - /** |
|
45 | - * @return boolean |
|
46 | - */ |
|
47 | - public function initialize_reg_step() |
|
48 | - { |
|
49 | - // there's actually no reg form to process if this is the final step |
|
50 | - if ($this->is_current_step()) { |
|
51 | - $this->checkout->step = $this->slug(); |
|
52 | - $this->checkout->action = 'process_reg_step'; |
|
53 | - $this->checkout->generate_reg_form = false; |
|
54 | - $this->request->setRequestParam('step', $this->checkout->step); |
|
55 | - $this->request->setRequestParam('action', $this->checkout->action); |
|
56 | - } |
|
57 | - return true; |
|
58 | - } |
|
44 | + /** |
|
45 | + * @return boolean |
|
46 | + */ |
|
47 | + public function initialize_reg_step() |
|
48 | + { |
|
49 | + // there's actually no reg form to process if this is the final step |
|
50 | + if ($this->is_current_step()) { |
|
51 | + $this->checkout->step = $this->slug(); |
|
52 | + $this->checkout->action = 'process_reg_step'; |
|
53 | + $this->checkout->generate_reg_form = false; |
|
54 | + $this->request->setRequestParam('step', $this->checkout->step); |
|
55 | + $this->request->setRequestParam('action', $this->checkout->action); |
|
56 | + } |
|
57 | + return true; |
|
58 | + } |
|
59 | 59 | |
60 | 60 | |
61 | - /** |
|
62 | - * @return string |
|
63 | - */ |
|
64 | - public function generate_reg_form() |
|
65 | - { |
|
66 | - // create empty form so that things don't break |
|
67 | - $this->reg_form = new EE_Form_Section_Proper(); |
|
68 | - return ''; |
|
69 | - } |
|
61 | + /** |
|
62 | + * @return string |
|
63 | + */ |
|
64 | + public function generate_reg_form() |
|
65 | + { |
|
66 | + // create empty form so that things don't break |
|
67 | + $this->reg_form = new EE_Form_Section_Proper(); |
|
68 | + return ''; |
|
69 | + } |
|
70 | 70 | |
71 | 71 | |
72 | - /** |
|
73 | - * @return boolean |
|
74 | - * @throws RuntimeException |
|
75 | - * @throws EE_Error |
|
76 | - * @throws ReflectionException |
|
77 | - */ |
|
78 | - public function process_reg_step() |
|
79 | - { |
|
80 | - // ensure all data gets refreshed from the db |
|
81 | - $this->checkout->refresh_all_entities(true); |
|
82 | - // ensures that all details and statuses for transaction, registration, and payments are updated |
|
83 | - $txn_update_params = $this->_finalize_transaction(); |
|
84 | - // maybe send messages |
|
85 | - $this->_set_notification_triggers(); |
|
86 | - // send messages |
|
87 | - /** @type EE_Registration_Processor $registration_processor */ |
|
88 | - $registration_processor = EE_Registry::instance()->load_class('Registration_Processor'); |
|
89 | - $registration_processor->trigger_registration_update_notifications( |
|
90 | - $this->checkout->transaction->primary_registration(), |
|
91 | - $txn_update_params |
|
92 | - ); |
|
93 | - // set a hook point |
|
94 | - do_action( |
|
95 | - 'AHEE__EE_SPCO_Reg_Step_Finalize_Registration__process_reg_step__completed', |
|
96 | - $this->checkout, |
|
97 | - $txn_update_params |
|
98 | - ); |
|
99 | - // check if transaction has a primary registrant and that it has a related Attendee object |
|
100 | - if (! $this->_validate_primary_registrant()) { |
|
101 | - return false; |
|
102 | - } |
|
103 | - // you don't have to go home but you can't stay here ! |
|
104 | - $this->checkout->redirect = true; |
|
105 | - $this->checkout->continue_reg = true; |
|
106 | - $this->checkout->json_response->set_redirect_url($this->checkout->redirect_url); |
|
107 | - if ( |
|
108 | - ! ( |
|
109 | - $this->checkout->payment_method instanceof EE_Payment_Method |
|
110 | - && $this->checkout->payment_method->is_off_site() |
|
111 | - ) |
|
112 | - ) { |
|
113 | - // mark this reg step as completed |
|
114 | - $this->set_completed(); |
|
115 | - } |
|
116 | - $this->checkout->set_exit_spco(); |
|
117 | - return true; |
|
118 | - } |
|
72 | + /** |
|
73 | + * @return boolean |
|
74 | + * @throws RuntimeException |
|
75 | + * @throws EE_Error |
|
76 | + * @throws ReflectionException |
|
77 | + */ |
|
78 | + public function process_reg_step() |
|
79 | + { |
|
80 | + // ensure all data gets refreshed from the db |
|
81 | + $this->checkout->refresh_all_entities(true); |
|
82 | + // ensures that all details and statuses for transaction, registration, and payments are updated |
|
83 | + $txn_update_params = $this->_finalize_transaction(); |
|
84 | + // maybe send messages |
|
85 | + $this->_set_notification_triggers(); |
|
86 | + // send messages |
|
87 | + /** @type EE_Registration_Processor $registration_processor */ |
|
88 | + $registration_processor = EE_Registry::instance()->load_class('Registration_Processor'); |
|
89 | + $registration_processor->trigger_registration_update_notifications( |
|
90 | + $this->checkout->transaction->primary_registration(), |
|
91 | + $txn_update_params |
|
92 | + ); |
|
93 | + // set a hook point |
|
94 | + do_action( |
|
95 | + 'AHEE__EE_SPCO_Reg_Step_Finalize_Registration__process_reg_step__completed', |
|
96 | + $this->checkout, |
|
97 | + $txn_update_params |
|
98 | + ); |
|
99 | + // check if transaction has a primary registrant and that it has a related Attendee object |
|
100 | + if (! $this->_validate_primary_registrant()) { |
|
101 | + return false; |
|
102 | + } |
|
103 | + // you don't have to go home but you can't stay here ! |
|
104 | + $this->checkout->redirect = true; |
|
105 | + $this->checkout->continue_reg = true; |
|
106 | + $this->checkout->json_response->set_redirect_url($this->checkout->redirect_url); |
|
107 | + if ( |
|
108 | + ! ( |
|
109 | + $this->checkout->payment_method instanceof EE_Payment_Method |
|
110 | + && $this->checkout->payment_method->is_off_site() |
|
111 | + ) |
|
112 | + ) { |
|
113 | + // mark this reg step as completed |
|
114 | + $this->set_completed(); |
|
115 | + } |
|
116 | + $this->checkout->set_exit_spco(); |
|
117 | + return true; |
|
118 | + } |
|
119 | 119 | |
120 | 120 | |
121 | - /** |
|
122 | - * _finalize_transaction |
|
123 | - * ensures that all details and statuses for transaction, registration, and payments are updated |
|
124 | - * |
|
125 | - * @return array |
|
126 | - * @throws RuntimeException |
|
127 | - * @throws EE_Error |
|
128 | - * @throws ReflectionException |
|
129 | - */ |
|
130 | - protected function _finalize_transaction() |
|
131 | - { |
|
132 | - /** @type EE_Transaction_Processor $transaction_processor */ |
|
133 | - $transaction_processor = EE_Registry::instance()->load_class('Transaction_Processor'); |
|
134 | - // set revisit flag in txn processor |
|
135 | - $transaction_processor->set_revisit($this->checkout->revisit); |
|
136 | - // at this point we'll consider a TXN to not have been abandoned |
|
137 | - $this->checkout->transaction->toggle_abandoned_transaction_status(); |
|
138 | - if ($this->checkout->cart instanceof EE_Cart) { |
|
139 | - // save TXN data to the cart |
|
140 | - $this->checkout->cart->get_grand_total()->save_this_and_descendants_to_txn( |
|
141 | - $this->checkout->transaction->ID() |
|
142 | - ); |
|
143 | - } |
|
144 | - // maybe update status, but don't save transaction just yet |
|
145 | - $this->checkout->transaction->update_status_based_on_total_paid(false); |
|
146 | - // this will result in the base session properties getting saved to the TXN_Session_data field |
|
147 | - $session_data = EE_Registry::instance()->SSN->get_session_data(null, true); |
|
148 | - // anonymize the last part of the IP address, now that the transaction is complete (we won't be using the IP address |
|
149 | - // for spam or bot detection now) |
|
150 | - if (function_exists('wp_privacy_anonymize_ip') && isset($session_data['ip_address'])) { |
|
151 | - $session_data['ip_address'] = wp_privacy_anonymize_ip($session_data['ip_address']); |
|
152 | - } |
|
153 | - $this->checkout->transaction->set_txn_session_data($session_data); |
|
154 | - // update the TXN if payment conditions have changed, but do NOT trigger notifications, |
|
155 | - // because we will do that in process_reg_step() after setting some more triggers |
|
156 | - return $transaction_processor->update_transaction_and_registrations_after_checkout_or_payment( |
|
157 | - $this->checkout->transaction, |
|
158 | - $this->checkout->payment, |
|
159 | - $this->checkout->reg_cache_where_params, |
|
160 | - false |
|
161 | - ); |
|
162 | - } |
|
121 | + /** |
|
122 | + * _finalize_transaction |
|
123 | + * ensures that all details and statuses for transaction, registration, and payments are updated |
|
124 | + * |
|
125 | + * @return array |
|
126 | + * @throws RuntimeException |
|
127 | + * @throws EE_Error |
|
128 | + * @throws ReflectionException |
|
129 | + */ |
|
130 | + protected function _finalize_transaction() |
|
131 | + { |
|
132 | + /** @type EE_Transaction_Processor $transaction_processor */ |
|
133 | + $transaction_processor = EE_Registry::instance()->load_class('Transaction_Processor'); |
|
134 | + // set revisit flag in txn processor |
|
135 | + $transaction_processor->set_revisit($this->checkout->revisit); |
|
136 | + // at this point we'll consider a TXN to not have been abandoned |
|
137 | + $this->checkout->transaction->toggle_abandoned_transaction_status(); |
|
138 | + if ($this->checkout->cart instanceof EE_Cart) { |
|
139 | + // save TXN data to the cart |
|
140 | + $this->checkout->cart->get_grand_total()->save_this_and_descendants_to_txn( |
|
141 | + $this->checkout->transaction->ID() |
|
142 | + ); |
|
143 | + } |
|
144 | + // maybe update status, but don't save transaction just yet |
|
145 | + $this->checkout->transaction->update_status_based_on_total_paid(false); |
|
146 | + // this will result in the base session properties getting saved to the TXN_Session_data field |
|
147 | + $session_data = EE_Registry::instance()->SSN->get_session_data(null, true); |
|
148 | + // anonymize the last part of the IP address, now that the transaction is complete (we won't be using the IP address |
|
149 | + // for spam or bot detection now) |
|
150 | + if (function_exists('wp_privacy_anonymize_ip') && isset($session_data['ip_address'])) { |
|
151 | + $session_data['ip_address'] = wp_privacy_anonymize_ip($session_data['ip_address']); |
|
152 | + } |
|
153 | + $this->checkout->transaction->set_txn_session_data($session_data); |
|
154 | + // update the TXN if payment conditions have changed, but do NOT trigger notifications, |
|
155 | + // because we will do that in process_reg_step() after setting some more triggers |
|
156 | + return $transaction_processor->update_transaction_and_registrations_after_checkout_or_payment( |
|
157 | + $this->checkout->transaction, |
|
158 | + $this->checkout->payment, |
|
159 | + $this->checkout->reg_cache_where_params, |
|
160 | + false |
|
161 | + ); |
|
162 | + } |
|
163 | 163 | |
164 | 164 | |
165 | - /** |
|
166 | - * If request is not a revisit, and an Off-Site gateway using IPNs has NOT been selected... |
|
167 | - * OR |
|
168 | - * if it IS a revisit and the TXN and/or one or more REG statuses have changed... |
|
169 | - * then trigger notifications |
|
170 | - * |
|
171 | - * @return void |
|
172 | - * @throws EE_Error |
|
173 | - * @throws ReflectionException |
|
174 | - */ |
|
175 | - protected function _set_notification_triggers() |
|
176 | - { |
|
165 | + /** |
|
166 | + * If request is not a revisit, and an Off-Site gateway using IPNs has NOT been selected... |
|
167 | + * OR |
|
168 | + * if it IS a revisit and the TXN and/or one or more REG statuses have changed... |
|
169 | + * then trigger notifications |
|
170 | + * |
|
171 | + * @return void |
|
172 | + * @throws EE_Error |
|
173 | + * @throws ReflectionException |
|
174 | + */ |
|
175 | + protected function _set_notification_triggers() |
|
176 | + { |
|
177 | 177 | |
178 | - if ($this->checkout->payment_method instanceof EE_Payment_Method) { |
|
179 | - // let's start with the assumption that we need to trigger notifications |
|
180 | - // then toggle this to false for conditions where we know we don't need to |
|
181 | - $deliver_notifications = true; |
|
182 | - if ( |
|
178 | + if ($this->checkout->payment_method instanceof EE_Payment_Method) { |
|
179 | + // let's start with the assumption that we need to trigger notifications |
|
180 | + // then toggle this to false for conditions where we know we don't need to |
|
181 | + $deliver_notifications = true; |
|
182 | + if ( |
|
183 | 183 | // if SPCO revisit |
184 | - filter_var($this->checkout->revisit, FILTER_VALIDATE_BOOLEAN) |
|
185 | - // and TXN or REG statuses have NOT changed due to a payment |
|
186 | - && ! ( |
|
187 | - $this->checkout->transaction->txn_status_updated() |
|
188 | - || $this->checkout->any_reg_status_updated() |
|
189 | - ) |
|
190 | - ) { |
|
191 | - $deliver_notifications = false; |
|
192 | - } |
|
193 | - if ($this->checkout->payment_method->is_off_site()) { |
|
194 | - /** @var EE_Gateway $gateway */ |
|
195 | - $gateway = $this->checkout->payment_method->type_obj()->get_gateway(); |
|
196 | - // and the gateway uses a separate request to process the IPN |
|
197 | - /** @var RequestInterface $request */ |
|
198 | - $request = LoaderFactory::getLoader()->getShared(RequestInterface::class); |
|
199 | - if ( |
|
200 | - $gateway instanceof EE_Offsite_Gateway |
|
201 | - && $gateway->handle_IPN_in_this_request($request->requestParams(), true) |
|
202 | - ) { |
|
203 | - // IPN request will handle triggering notifications |
|
204 | - $deliver_notifications = false; |
|
205 | - // no really... don't send any notices in this request |
|
206 | - remove_all_filters('FHEE__EED_Messages___maybe_registration__deliver_notifications'); |
|
207 | - add_filter( |
|
208 | - 'FHEE__EED_Messages___maybe_registration__deliver_notifications', |
|
209 | - '__return_false', |
|
210 | - 15 |
|
211 | - ); |
|
212 | - } |
|
213 | - } |
|
214 | - if ($deliver_notifications) { |
|
215 | - // send out notifications |
|
216 | - add_filter('FHEE__EED_Messages___maybe_registration__deliver_notifications', '__return_true', 10); |
|
217 | - } |
|
218 | - } |
|
219 | - } |
|
184 | + filter_var($this->checkout->revisit, FILTER_VALIDATE_BOOLEAN) |
|
185 | + // and TXN or REG statuses have NOT changed due to a payment |
|
186 | + && ! ( |
|
187 | + $this->checkout->transaction->txn_status_updated() |
|
188 | + || $this->checkout->any_reg_status_updated() |
|
189 | + ) |
|
190 | + ) { |
|
191 | + $deliver_notifications = false; |
|
192 | + } |
|
193 | + if ($this->checkout->payment_method->is_off_site()) { |
|
194 | + /** @var EE_Gateway $gateway */ |
|
195 | + $gateway = $this->checkout->payment_method->type_obj()->get_gateway(); |
|
196 | + // and the gateway uses a separate request to process the IPN |
|
197 | + /** @var RequestInterface $request */ |
|
198 | + $request = LoaderFactory::getLoader()->getShared(RequestInterface::class); |
|
199 | + if ( |
|
200 | + $gateway instanceof EE_Offsite_Gateway |
|
201 | + && $gateway->handle_IPN_in_this_request($request->requestParams(), true) |
|
202 | + ) { |
|
203 | + // IPN request will handle triggering notifications |
|
204 | + $deliver_notifications = false; |
|
205 | + // no really... don't send any notices in this request |
|
206 | + remove_all_filters('FHEE__EED_Messages___maybe_registration__deliver_notifications'); |
|
207 | + add_filter( |
|
208 | + 'FHEE__EED_Messages___maybe_registration__deliver_notifications', |
|
209 | + '__return_false', |
|
210 | + 15 |
|
211 | + ); |
|
212 | + } |
|
213 | + } |
|
214 | + if ($deliver_notifications) { |
|
215 | + // send out notifications |
|
216 | + add_filter('FHEE__EED_Messages___maybe_registration__deliver_notifications', '__return_true', 10); |
|
217 | + } |
|
218 | + } |
|
219 | + } |
|
220 | 220 | |
221 | 221 | |
222 | - /** |
|
223 | - * check if transaction has a primary registrant and that it has a related Attendee object |
|
224 | - * |
|
225 | - * @return boolean |
|
226 | - * @throws EE_Error |
|
227 | - * @throws ReflectionException |
|
228 | - */ |
|
229 | - protected function _validate_primary_registrant() |
|
230 | - { |
|
231 | - if (! $this->checkout->transaction_has_primary_registrant()) { |
|
232 | - EE_Error::add_error( |
|
233 | - esc_html__('A valid Primary Registration for this Transaction could not be found.', 'event_espresso'), |
|
234 | - __FILE__, |
|
235 | - __FUNCTION__, |
|
236 | - __LINE__ |
|
237 | - ); |
|
238 | - $this->checkout->redirect = false; |
|
239 | - $this->checkout->continue_reg = false; |
|
240 | - return false; |
|
241 | - } |
|
242 | - // setup URL for redirect |
|
243 | - $this->checkout->redirect_url = add_query_arg( |
|
244 | - ['e_reg_url_link' => $this->checkout->transaction->primary_registration()->reg_url_link()], |
|
245 | - $this->checkout->thank_you_page_url |
|
246 | - ); |
|
247 | - return true; |
|
248 | - } |
|
222 | + /** |
|
223 | + * check if transaction has a primary registrant and that it has a related Attendee object |
|
224 | + * |
|
225 | + * @return boolean |
|
226 | + * @throws EE_Error |
|
227 | + * @throws ReflectionException |
|
228 | + */ |
|
229 | + protected function _validate_primary_registrant() |
|
230 | + { |
|
231 | + if (! $this->checkout->transaction_has_primary_registrant()) { |
|
232 | + EE_Error::add_error( |
|
233 | + esc_html__('A valid Primary Registration for this Transaction could not be found.', 'event_espresso'), |
|
234 | + __FILE__, |
|
235 | + __FUNCTION__, |
|
236 | + __LINE__ |
|
237 | + ); |
|
238 | + $this->checkout->redirect = false; |
|
239 | + $this->checkout->continue_reg = false; |
|
240 | + return false; |
|
241 | + } |
|
242 | + // setup URL for redirect |
|
243 | + $this->checkout->redirect_url = add_query_arg( |
|
244 | + ['e_reg_url_link' => $this->checkout->transaction->primary_registration()->reg_url_link()], |
|
245 | + $this->checkout->thank_you_page_url |
|
246 | + ); |
|
247 | + return true; |
|
248 | + } |
|
249 | 249 | |
250 | 250 | |
251 | - /** |
|
252 | - * @return void |
|
253 | - */ |
|
254 | - public function update_reg_step() |
|
255 | - { |
|
256 | - EE_Error::doing_it_wrong( |
|
257 | - __CLASS__ . '::' . __FILE__, |
|
258 | - esc_html__( |
|
259 | - 'Can not call update_reg_step() on the Finalize Registration reg step.', |
|
260 | - 'event_espresso' |
|
261 | - ), |
|
262 | - '4.6.0' |
|
263 | - ); |
|
264 | - } |
|
251 | + /** |
|
252 | + * @return void |
|
253 | + */ |
|
254 | + public function update_reg_step() |
|
255 | + { |
|
256 | + EE_Error::doing_it_wrong( |
|
257 | + __CLASS__ . '::' . __FILE__, |
|
258 | + esc_html__( |
|
259 | + 'Can not call update_reg_step() on the Finalize Registration reg step.', |
|
260 | + 'event_espresso' |
|
261 | + ), |
|
262 | + '4.6.0' |
|
263 | + ); |
|
264 | + } |
|
265 | 265 | } |