PluginProbe ʕ •ᴥ•ʔ
GiveWP – Donation Plugin and Fundraising Platform / 2.0.5
GiveWP – Donation Plugin and Fundraising Platform v2.0.5
4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 2.3.2 2.30.0 2.31.0 2.31.1 2.32.0 2.33.0 2.33.1 2.33.2 2.33.3 2.33.4 2.33.5 2.4.0 2.4.1 2.4.2 2.4.3 2.4.4 2.4.5 2.4.6 2.4.7 2.5.0 2.5.1 2.5.10 2.5.11 2.5.12 2.5.13 2.5.2 2.5.3 2.5.4 2.5.5 2.5.6 2.5.7 2.5.8 2.5.9 2.6.0 2.6.1 2.6.2 2.6.3 2.7.0 2.7.1 2.7.2 2.7.3 2.7.4 2.7.5 2.8.0 2.8.1 2.9.0 2.9.1 2.9.2 2.9.3 2.9.4 2.9.5 2.9.6 2.9.7 3.0.0 3.0.1 3.0.2 3.0.3 3.0.4 3.1.0 3.1.1 3.1.2 3.10.0 3.11.0 3.12.0 3.12.1 3.12.2 3.12.3 3.13.0 3.14.0 3.14.1 3.14.2 3.15.0 3.15.1 3.16.0 3.16.1 3.16.2 3.16.3 3.16.4 3.16.5 3.17.0 3.17.1 3.17.2 3.18.0 3.19.0 3.19.1 3.19.2 3.19.3 3.19.4 3.2.0 3.2.1 3.2.2 3.20.0 3.21.0 3.21.1 3.22.0 3.22.1 3.22.2 3.3.0 3.3.1 3.4.0 3.4.1 3.4.2 3.5.0 3.5.1 3.6.0 3.6.1 3.6.2 3.7.0 3.8.0 3.9.0 4.0.0 4.1.0 4.1.1 4.10.0 4.10.1 4.11.0 4.12.0 4.13.0 4.13.1 4.13.2 4.14.0 4.14.1 4.14.2 4.14.3 4.14.4 4.14.5 4.14.6 4.2.0 4.2.1 4.3.0 4.3.1 4.3.2 4.4.0 4.5.0 4.6.1 4.7.0 4.7.1 4.8.0 4.8.1 4.9.0 trunk 1.9.0 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.10.0 2.10.1 2.10.2 2.10.3 2.10.4 2.11.0 2.11.1 2.11.2 2.11.3 2.12.0 2.12.1 2.12.2 2.12.3 2.13.0 2.13.1 2.13.2 2.13.3 2.13.4 2.14.0 2.15.0 2.16.0 2.16.1 2.17.0 2.17.1 2.17.3 2.18.0 2.18.1 2.19.1 2.19.2 2.19.3 2.19.4 2.19.5 2.19.6 2.19.7 2.19.8 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 2.20.0 2.20.1 2.20.2 2.21.0 2.21.1 2.21.2 2.21.3 2.21.4 2.22.0 2.22.1 2.22.2 2.22.3 2.23.0 2.23.1 2.23.2 2.24.0 2.24.1 2.24.2 2.25.0 2.25.1 2.25.2 2.25.3 2.26.0 2.27.0 2.27.1 2.27.2 2.27.3 2.28.0 2.29.0 2.29.1 2.29.2
give / includes / admin / settings / class-settings-gateways.php
give / includes / admin / settings Last commit date
class-settings-addon.php 9 years ago class-settings-advanced.php 8 years ago class-settings-cmb2-backward-compatibility.php 8 years ago class-settings-display.php 8 years ago class-settings-email.php 8 years ago class-settings-gateways.php 8 years ago class-settings-general.php 8 years ago class-settings-license.php 8 years ago
class-settings-gateways.php
240 lines
1 <?php
2 /**
3 * Give Settings Page/Tab
4 *
5 * @package Give
6 * @subpackage Classes/Give_Settings_Gateways
7 * @copyright Copyright (c) 2016, WordImpress
8 * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
9 * @since 1.8
10 */
11
12 if ( ! defined( 'ABSPATH' ) ) {
13 exit; // Exit if accessed directly
14 }
15
16 if ( ! class_exists( 'Give_Settings_Gateways' ) ) :
17
18 /**
19 * Give_Settings_Gateways.
20 *
21 * @sine 1.8
22 */
23 class Give_Settings_Gateways extends Give_Settings_Page {
24
25 /**
26 * Constructor.
27 */
28 public function __construct() {
29 $this->id = 'gateways';
30 $this->label = esc_html__( 'Payment Gateways', 'give' );
31
32 $this->default_tab = 'gateways-settings';
33
34 parent::__construct();
35 }
36
37 /**
38 * Get settings array.
39 *
40 * @since 1.8
41 * @return array
42 */
43 public function get_settings() {
44 $settings = array();
45 $current_section = give_get_current_setting_section();
46
47 switch ( $current_section ) {
48 case 'paypal-standard':
49 $settings = array(
50 // Section 2: PayPal Standard.
51 array(
52 'type' => 'title',
53 'id' => 'give_title_gateway_settings_2',
54 ),
55 array(
56 'name' => __( 'PayPal Email', 'give' ),
57 'desc' => __( 'Enter your PayPal account\'s email.', 'give' ),
58 'id' => 'paypal_email',
59 'type' => 'email',
60 ),
61 array(
62 'name' => __( 'PayPal Page Style', 'give' ),
63 'desc' => __( 'Enter the name of the PayPal page style to use, or leave blank to use the default.', 'give' ),
64 'id' => 'paypal_page_style',
65 'type' => 'text',
66 ),
67 array(
68 'name' => __( 'PayPal Transaction Type', 'give' ),
69 'desc' => __( 'Nonprofits must verify their status to withdraw donations they receive via PayPal. PayPal users that are not verified nonprofits must demonstrate how their donations will be used, once they raise more than $10,000. By default, Give transactions are sent to PayPal as donations. You may change the transaction type using this option if you feel you may not meet PayPal\'s donation requirements.', 'give' ),
70 'id' => 'paypal_button_type',
71 'type' => 'radio_inline',
72 'options' => array(
73 'donation' => __( 'Donation', 'give' ),
74 'standard' => __( 'Standard Transaction', 'give' )
75 ),
76 'default' => 'donation',
77 ),
78 array(
79 'name' => __( 'Billing Details', 'give' ),
80 'desc' => __( 'This option will enable the billing details section for PayPal Standard which requires the donor\'s address to complete the donation. These fields are not required by PayPal to process the transaction, but you may have a need to collect the data.', 'give' ),
81 'id' => 'paypal_standard_billing_details',
82 'type' => 'radio_inline',
83 'default' => 'disabled',
84 'options' => array(
85 'enabled' => __( 'Enabled', 'give' ),
86 'disabled' => __( 'Disabled', 'give' ),
87 )
88 ),
89 array(
90 'name' => __( 'PayPal IPN Verification', 'give' ),
91 'desc' => __( 'If donations are not getting marked as complete, use a slightly less secure method of verifying donations.', 'give' ),
92 'id' => 'paypal_verification',
93 'type' => 'radio_inline',
94 'default' => 'enabled',
95 'options' => array(
96 'enabled' => __( 'Enabled', 'give' ),
97 'disabled' => __( 'Disabled', 'give' ),
98 )
99 ),
100 array(
101 'name' => __( 'PayPal Standard Gateway Settings Docs Link', 'give' ),
102 'id' => 'paypal_standard_gateway_settings_docs_link',
103 'url' => esc_url( 'http://docs.givewp.com/settings-gateway-paypal-standard' ),
104 'title' => __( 'PayPal Standard Gateway Settings', 'give' ),
105 'type' => 'give_docs_link',
106 ),
107 array(
108 'type' => 'sectionend',
109 'id' => 'give_title_gateway_settings_2',
110 )
111 );
112 break;
113
114 case 'offline-donations' :
115 $settings = array(
116 // Section 3: Offline gateway.
117 array(
118 'type' => 'title',
119 'id' => 'give_title_gateway_settings_3',
120 ),
121 array(
122 'name' => __( 'Collect Billing Details', 'give' ),
123 'desc' => __( 'Enable to request billing details for offline donations. Will appear above offline donation instructions. Can be enabled/disabled per form.', 'give' ),
124 'id' => 'give_offline_donation_enable_billing_fields',
125 'type' => 'radio_inline',
126 'default' => 'disabled',
127 'options' => array(
128 'enabled' => __( 'Enabled', 'give' ),
129 'disabled' => __( 'Disabled', 'give' )
130 )
131 ),
132 array(
133 'name' => __( 'Offline Donation Instructions', 'give' ),
134 'desc' => __( 'The following content will appear for all forms when the user selects the offline donation payment option. Note: You may customize the content per form as needed.', 'give' ),
135 'id' => 'global_offline_donation_content',
136 'default' => give_get_default_offline_donation_content(),
137 'type' => 'wysiwyg',
138 'options' => array(
139 'textarea_rows' => 6,
140 )
141 ),
142 array(
143 'name' => esc_html__( 'Offline Donations Settings Docs Link', 'give' ),
144 'id' => 'offline_gateway_settings_docs_link',
145 'url' => esc_url( 'http://docs.givewp.com/offlinegateway' ),
146 'title' => __( 'Offline Gateway Settings', 'give' ),
147 'type' => 'give_docs_link',
148 ),
149 array(
150 'type' => 'sectionend',
151 'id' => 'give_title_gateway_settings_3',
152 )
153 );
154 break;
155
156 case 'gateways-settings':
157 $settings = array(
158 // Section 1: Gateways.
159 array(
160 'id' => 'give_title_gateway_settings_1',
161 'type' => 'title'
162 ),
163 array(
164 'name' => __( 'Test Mode', 'give' ),
165 'desc' => __( 'While in test mode no live donations are processed. To fully use test mode, you must have a sandbox (test) account for the payment gateway you are testing.', 'give' ),
166 'id' => 'test_mode',
167 'type' => 'radio_inline',
168 'default' => 'disabled',
169 'options' => array(
170 'enabled' => __( 'Enabled', 'give' ),
171 'disabled' => __( 'Disabled', 'give' ),
172 )
173 ),
174 array(
175 'name' => __( 'Enabled Gateways', 'give' ),
176 'desc' => __( 'Enable your payment gateway. Can be ordered by dragging.', 'give' ),
177 'id' => 'gateways',
178 'type' => 'enabled_gateways'
179 ),
180 array(
181 'name' => __( 'Default Gateway', 'give' ),
182 'desc' => __( 'The gateway that will be selected by default.', 'give' ),
183 'id' => 'default_gateway',
184 'type' => 'default_gateway'
185 ),
186 array(
187 'name' => __( 'Gateways Docs Link', 'give' ),
188 'id' => 'gateway_settings_docs_link',
189 'url' => esc_url( 'http://docs.givewp.com/settings-gateways' ),
190 'title' => __( 'Gateway Settings', 'give' ),
191 'type' => 'give_docs_link',
192 ),
193 array(
194 'id' => 'give_title_gateway_settings_1',
195 'type' => 'sectionend'
196 ),
197 );
198 break;
199 }
200
201 /**
202 * Filter the payment gateways settings.
203 * Backward compatibility: Please do not use this filter. This filter is deprecated in 1.8
204 */
205 $settings = apply_filters( 'give_settings_gateways', $settings );
206
207 /**
208 * Filter the settings.
209 *
210 * @since 1.8
211 *
212 * @param array $settings
213 */
214 $settings = apply_filters( 'give_get_settings_' . $this->id, $settings );
215
216 // Output.
217 return $settings;
218 }
219
220 /**
221 * Get sections.
222 *
223 * @since 1.8
224 * @return array
225 */
226 public function get_sections() {
227 $sections = array(
228 'gateways-settings' => __( 'Gateways', 'give' ),
229 'paypal-standard' => __( 'PayPal Standard', 'give' ),
230 'offline-donations' => __( 'Offline Donations', 'give' )
231 );
232
233 return apply_filters( 'give_get_sections_' . $this->id, $sections );
234 }
235 }
236
237 endif;
238
239 return new Give_Settings_Gateways();
240