1 | <?php |
||
2 | /** |
||
3 | * Plugin Name: Pronamic Pay |
||
4 | * Plugin URI: https://www.pronamic.eu/plugins/pronamic-ideal/ |
||
5 | * Description: The Pronamic Pay plugin adds payment methods like iDEAL, Bancontact, credit card and more to your WordPress site for a variety of payment providers. |
||
6 | * |
||
7 | * Version: 5.8.0 |
||
8 | * Requires at least: 4.7 |
||
9 | * |
||
10 | * Author: Pronamic |
||
11 | * Author URI: https://www.pronamic.eu/ |
||
12 | * |
||
13 | * Text Domain: pronamic_ideal |
||
14 | * Domain Path: /languages/ |
||
15 | * |
||
16 | * License: GPL-3.0-or-later |
||
17 | * |
||
18 | * GitHub URI: https://github.com/pronamic/wp-pronamic-ideal |
||
19 | * |
||
20 | * @author Pronamic <[email protected]> |
||
21 | * @copyright 2005-2019 Pronamic |
||
22 | * @license GPL-3.0-or-later |
||
23 | * @package Pronamic\WordPress\Pay |
||
24 | */ |
||
25 | |||
26 | /** |
||
27 | * Autoload. |
||
28 | */ |
||
29 | if ( ! defined( 'PRONAMIC_PAY_DEBUG' ) ) { |
||
30 | define( 'PRONAMIC_PAY_DEBUG', false ); |
||
31 | } |
||
32 | |||
33 | if ( PRONAMIC_PAY_DEBUG ) { |
||
34 | foreach ( glob( __DIR__ . '/repositories/wp-pay/*/vendor/composer/autoload_files.php' ) as $file ) { |
||
35 | $files = require $file; |
||
36 | |||
37 | foreach ( $files as $identifier => $filepath ) { |
||
38 | if ( ! empty( $GLOBALS['__composer_autoload_files'][ $identifier ] ) ) { |
||
39 | continue; |
||
40 | } |
||
41 | |||
42 | require $filepath; |
||
43 | |||
44 | $GLOBALS['__composer_autoload_files'][ $identifier ] = true; |
||
45 | } |
||
46 | } |
||
47 | } |
||
48 | |||
49 | $loader = require plugin_dir_path( __FILE__ ) . 'vendor/autoload.php'; |
||
50 | |||
51 | if ( PRONAMIC_PAY_DEBUG ) { |
||
52 | foreach ( glob( __DIR__ . '/repositories/*/*/composer.json' ) as $file ) { |
||
53 | $content = file_get_contents( $file ); |
||
54 | |||
55 | $object = json_decode( $content ); |
||
56 | |||
57 | if ( ! isset( $object->autoload ) ) { |
||
58 | continue; |
||
59 | } |
||
60 | |||
61 | foreach ( $object->autoload as $autoload_type => $classmap ) { |
||
62 | if ( 'psr-4' !== $autoload_type ) { |
||
63 | continue; |
||
64 | } |
||
65 | |||
66 | foreach ( $classmap as $prefix => $filepath ) { |
||
67 | $loader->addPsr4( $prefix, dirname( $file ) . '/' . $filepath, true ); |
||
68 | } |
||
69 | } |
||
70 | } |
||
71 | } |
||
72 | |||
73 | /** |
||
74 | * Bootstrap. |
||
75 | */ |
||
76 | \Pronamic\WordPress\Pay\Plugin::instance( |
||
77 | array( |
||
78 | 'file' => __FILE__, |
||
79 | 'options' => array( |
||
80 | 'about_page_file' => __DIR__ . '/admin/page-about.php', |
||
81 | ), |
||
82 | 'extensions' => array( |
||
83 | '\Pronamic\WordPress\Pay\Extensions\Charitable\Extension::bootstrap', |
||
84 | '\Pronamic\WordPress\Pay\Extensions\Give\Extension::bootstrap', |
||
85 | '\Pronamic\WordPress\Pay\Extensions\WooCommerce\Extension::bootstrap', |
||
86 | '\Pronamic\WordPress\Pay\Extensions\GravityForms\Extension::bootstrap', |
||
87 | '\Pronamic\WordPress\Pay\Extensions\Shopp\Extension::bootstrap', |
||
88 | '\Pronamic\WordPress\Pay\Extensions\Jigoshop\Extension::bootstrap', |
||
89 | '\Pronamic\WordPress\Pay\Extensions\WPeCommerce\Extension::bootstrap', |
||
90 | '\Pronamic\WordPress\Pay\Extensions\ClassiPress\Extension::bootstrap', |
||
91 | '\Pronamic\WordPress\Pay\Extensions\EventEspressoLegacy\Extension::bootstrap', |
||
92 | '\Pronamic\WordPress\Pay\Extensions\EventEspresso\Extension::bootstrap', |
||
93 | '\Pronamic\WordPress\Pay\Extensions\AppThemes\Extension::bootstrap', |
||
94 | '\Pronamic\WordPress\Pay\Extensions\S2Member\Extension::bootstrap', |
||
95 | '\Pronamic\WordPress\Pay\Extensions\Membership\Extension::bootstrap', |
||
96 | '\Pronamic\WordPress\Pay\Extensions\EasyDigitalDownloads\Extension::bootstrap', |
||
97 | '\Pronamic\WordPress\Pay\Extensions\IThemesExchange\Extension::bootstrap', |
||
98 | '\Pronamic\WordPress\Pay\Extensions\MemberPress\Extension::bootstrap', |
||
99 | '\Pronamic\WordPress\Pay\Extensions\FormidableForms\Extension::bootstrap', |
||
100 | '\Pronamic\WordPress\Pay\Extensions\NinjaForms\Extension::bootstrap', |
||
101 | ), |
||
102 | ) |
||
103 | ); |
||
104 | |||
105 | add_filter( |
||
106 | 'pronamic_pay_plugin_integrations', |
||
107 | function( $integrations ) { |
||
108 | // Restrict Content Pro. |
||
109 | $integrations[] = new \Pronamic\WordPress\Pay\Extensions\RestrictContentPro\Extension( |
||
110 | array( |
||
0 ignored issues
–
show
|
|||
111 | 'slug' => 'restrict-content-pro', |
||
112 | 'option_db_version' => 'pronamic_pay_restrictcontentpro_db_version', |
||
113 | 'name' => 'Restrict Content Pro', |
||
114 | 'manual_url' => null, |
||
115 | /** |
||
116 | * Affiliate link. |
||
117 | * |
||
118 | * @link https://restrictcontentpro.com/affiliates/ |
||
119 | * @link https://restrictcontentpro.com/affiliate-agreement/ |
||
120 | * @todo Request a Restrict Content Pro affiliate link. |
||
121 | */ |
||
122 | 'affiliate_url' => null, |
||
123 | /** |
||
124 | * Requirements. |
||
125 | * |
||
126 | * @link https://github.com/dsawardekar/wp-requirements |
||
127 | * @link https://github.com/afragen/wp-dependency-installer |
||
128 | * @link https://github.com/wearerequired/wp-requirements-check |
||
129 | * @link https://github.com/ultraleettech/wp-requirements-checker |
||
130 | * @link https://waclawjacek.com/check-wordpress-plugin-dependencies/ |
||
131 | * @link https://github.com/xwp/wp-plugin-dependencies |
||
132 | * @link https://wordpress.org/plugins/plugin-dependencies/ |
||
133 | * @link https://github.com/joshbetz/wp-plugin-dependencies |
||
134 | * @link https://github.com/jrfnl/wp-known-plugin-dependencies |
||
135 | * @link https://github.com/xwp/wp-plugin-dependencies/issues/34 |
||
136 | * @link https://github.com/WordPress/WordPress/blob/master/wp-includes/class.wp-dependencies.php |
||
137 | * @link https://github.com/WordPress/WordPress/blob/master/wp-includes/class-wp-dependency.php |
||
138 | * @link https://github.com/Yoast/yoast-acf-analysis/blob/2.3.0/inc/ac-yoast-seo-acf-content-analysis.php#L30-L32 |
||
139 | * @link https://github.com/Yoast/yoast-acf-analysis/blob/2.3.0/inc/requirements.php |
||
140 | */ |
||
141 | 'requirements' => array( |
||
142 | array( |
||
143 | 'type' => 'php', |
||
144 | 'requires_at_least' => '5.6.20', |
||
145 | ), |
||
146 | array( |
||
147 | 'type' => 'php-ext', |
||
0 ignored issues
–
show
|
|||
148 | 'name' => 'Internationalization', |
||
0 ignored issues
–
show
|
|||
149 | 'slug' => 'intl', |
||
0 ignored issues
–
show
|
|||
150 | 'is_active' => function() { |
||
0 ignored issues
–
show
|
|||
151 | return \extension_loaded( 'intl' ); |
||
152 | } |
||
0 ignored issues
–
show
|
|||
153 | ), |
||
154 | array( |
||
155 | 'type' => 'wp', |
||
156 | 'requires_at_least' => '4.7', |
||
157 | ), |
||
158 | array( |
||
159 | 'type' => 'wp-plugin', |
||
160 | 'name' => 'Restrict Content Pro', |
||
161 | 'slug' => 'restrict-content-pro', |
||
162 | 'uri' => 'https://restrictcontentpro.com/', |
||
163 | 'requires_at_least' => '3.0.0', |
||
164 | 'tested_up_to' => '3.1.2', |
||
165 | 'is_active' => function() { |
||
166 | return \defined( 'RCP_PLUGIN_VERSION' ); |
||
167 | }, |
||
168 | 'get_version' => function() { |
||
169 | if ( \defined( 'RCP_PLUGIN_VERSION' ) ) { |
||
170 | return RCP_PLUGIN_VERSION; |
||
1 ignored issue
–
show
|
|||
171 | } |
||
172 | } |
||
0 ignored issues
–
show
|
|||
173 | ), |
||
174 | ), |
||
175 | ) |
||
176 | ); |
||
177 | |||
178 | // Return integrations. |
||
179 | return $integrations; |
||
180 | } |
||
181 | ); |
||
182 | |||
183 | add_filter( |
||
184 | 'pronamic_pay_gateways', |
||
185 | function( $gateways ) { |
||
186 | // ABN AMRO - iDEAL Zelfbouw (v3). |
||
187 | $gateways[] = new \Pronamic\WordPress\Pay\Gateways\IDealAdvancedV3\Integration( |
||
188 | array( |
||
189 | 'id' => 'abnamro-ideal-zelfbouw-v3', |
||
190 | 'name' => 'ABN AMRO - iDEAL Zelfbouw (v3)', |
||
191 | 'provider' => 'abnamro', |
||
192 | 'url' => 'https://abnamro.ideal-payment.de/', |
||
193 | 'product_url' => 'https://www.abnamro.nl/nl/zakelijk/betalen/online-betalen/betaaloplossing/', |
||
194 | 'dashboard_url' => array( |
||
195 | 'test' => 'https://abnamro-test.ideal-payment.de/', |
||
196 | 'live' => 'https://abnamro.ideal-payment.de/', |
||
197 | ), |
||
198 | 'aquirer_url' => 'https://abnamro.ideal-payment.de/ideal/iDEALv3', |
||
199 | 'aquirer_test_url' => 'https://abnamro-test.ideal-payment.de/ideal/iDEALv3', |
||
200 | 'certificates' => array(), |
||
201 | ) |
||
202 | ); |
||
203 | |||
204 | // Buckaroo. |
||
205 | $gateways[] = new \Pronamic\WordPress\Pay\Gateways\Buckaroo\Integration(); |
||
206 | |||
207 | // Deutsche Bank - iDEAL Expert (v3). |
||
208 | $gateways[] = new \Pronamic\WordPress\Pay\Gateways\IDealAdvancedV3\Integration( |
||
209 | array( |
||
210 | 'id' => 'deutschebank-ideal-expert-v3', |
||
211 | 'name' => 'Deutsche Bank - iDEAL Expert (v3)', |
||
212 | 'provider' => 'deutschebank', |
||
213 | 'product_url' => 'https://www.deutschebank.nl/nl/content/producten_en_services_commercial_banking_cash_management_betalen_ideal.html', |
||
214 | 'dashboard_url' => array( |
||
215 | 'test' => 'https://myideal.test.db.com/', |
||
216 | 'live' => 'https://myideal.db.com/', |
||
217 | ), |
||
218 | 'aquirer_url' => 'https://myideal.db.com/ideal/iDealv3', |
||
219 | 'aquirer_test_url' => null, |
||
220 | 'certificates' => array(), |
||
221 | ) |
||
222 | ); |
||
223 | |||
224 | // EMS - eCommerce. |
||
225 | $gateways[] = new \Pronamic\WordPress\Pay\Gateways\EMS\ECommerce\Integration(); |
||
226 | |||
227 | // Fibonacci ORANGE. |
||
228 | $gateways[] = new \Pronamic\WordPress\Pay\Gateways\Icepay\Integration( |
||
229 | array( |
||
230 | 'id' => 'fibonacciorange', |
||
231 | 'name' => 'Fibonacci ORANGE', |
||
232 | 'provider' => 'fibonacciorange', |
||
233 | 'product_url' => 'http://www.fibonacciorange.nl/', |
||
234 | ) |
||
235 | ); |
||
236 | |||
237 | // ICEPAY. |
||
238 | $gateways[] = new \Pronamic\WordPress\Pay\Gateways\Icepay\Integration(); |
||
239 | |||
240 | // iDEAL Simulator - iDEAL Professional / Advanced / Zelfbouw (v3). |
||
241 | $gateways[] = new \Pronamic\WordPress\Pay\Gateways\IDealAdvancedV3\Integration( |
||
242 | array( |
||
243 | 'id' => 'ideal-simulator-ideal-advanced-v3', |
||
244 | 'name' => 'iDEAL Simulator - iDEAL Professional / Advanced', |
||
245 | 'provider' => 'ideal-simulator', |
||
246 | 'product_url' => 'https://www.ideal-checkout.nl/support/ideal-simulator', |
||
247 | 'aquirer_url' => 'https://www.ideal-checkout.nl/simulator/', |
||
248 | 'aquirer_test_url' => null, |
||
249 | 'certificates' => array(), |
||
250 | ) |
||
251 | ); |
||
252 | |||
253 | // ING - iDEAL Basic. |
||
254 | $gateways[] = new \Pronamic\WordPress\Pay\Gateways\IDealBasic\Integration( |
||
255 | array( |
||
256 | 'id' => 'ing-ideal-basic', |
||
257 | 'name' => 'ING - iDEAL Basic', |
||
258 | 'provider' => 'ing', |
||
259 | 'product_url' => 'https://www.ing.nl/zakelijk/betalen/geld-ontvangen/ideal/', |
||
260 | 'manual_url' => __( 'https://www.pronamic.eu/support/how-to-connect-ing-ideal-basic-with-wordpress-via-pronamic-pay/', 'pronamic_ideal' ), |
||
261 | 'dashboard_url' => array( |
||
262 | 'test' => 'https://idealtest.secure-ing.com/', |
||
263 | 'live' => 'https://ideal.secure-ing.com/', |
||
264 | ), |
||
265 | 'aquirer_url' => 'https://ideal.secure-ing.com/ideal/mpiPayInitIng.do', |
||
266 | 'aquirer_test_url' => 'https://idealtest.secure-ing.com/ideal/mpiPayInitIng.do', |
||
267 | ) |
||
268 | ); |
||
269 | |||
270 | // ING - iDEAL Advanced (v3). |
||
271 | $gateways[] = new \Pronamic\WordPress\Pay\Gateways\IDealAdvancedV3\Integration( |
||
272 | array( |
||
273 | 'id' => 'ing-ideal-advanced-v3', |
||
274 | 'name' => 'ING - iDEAL Advanced (v3)', |
||
275 | 'provider' => 'ing', |
||
276 | 'product_url' => 'https://www.ing.nl/zakelijk/betalen/geld-ontvangen/ideal/', |
||
277 | 'manual_url' => __( 'https://www.pronamic.eu/support/how-to-connect-ing-ideal-advanced-v3-with-wordpress-via-pronamic-pay/', 'pronamic_ideal' ), |
||
278 | 'dashboard_url' => array( |
||
279 | 'test' => 'https://idealtest.secure-ing.com/', |
||
280 | 'live' => 'https://ideal.secure-ing.com/', |
||
281 | ), |
||
282 | 'aquirer_url' => 'https://ideal.secure-ing.com/ideal/iDEALv3', |
||
283 | 'aquirer_test_url' => 'https://idealtest.secure-ing.com/ideal/iDEALv3', |
||
284 | 'certificates' => array(), |
||
285 | ) |
||
286 | ); |
||
287 | |||
288 | // ING - Kassa Compleet. |
||
289 | $gateways[] = new \Pronamic\WordPress\Pay\Gateways\ING\KassaCompleet\Integration(); |
||
290 | |||
291 | // Mollie. |
||
292 | $gateways[] = new \Pronamic\WordPress\Pay\Gateways\Mollie\Integration(); |
||
293 | |||
294 | // Mollie - iDEAL. |
||
295 | $gateways[] = new \Pronamic\WordPress\Pay\Gateways\MollieIDeal\Integration(); |
||
296 | |||
297 | // Mollie - iDEAL Basic. |
||
298 | $gateways[] = new \Pronamic\WordPress\Pay\Gateways\IDealBasic\Integration( |
||
299 | array( |
||
300 | 'id' => 'mollie-ideal-basic', |
||
301 | 'name' => 'Mollie - iDEAL Basic', |
||
302 | 'provider' => 'mollie', |
||
303 | 'dashboard_url' => 'http://www.mollie.nl/beheer/', |
||
304 | 'deprecated' => true, |
||
305 | 'aquirer_url' => 'https://secure.mollie.nl/xml/idealAcquirer/lite/', |
||
306 | 'aquirer_test_url' => 'https://secure.mollie.nl/xml/idealAcquirer/testmode/lite/', |
||
307 | ) |
||
308 | ); |
||
309 | |||
310 | // MultiSafePay - Connect. |
||
311 | $gateways[] = new \Pronamic\WordPress\Pay\Gateways\MultiSafepay\Integration(); |
||
312 | |||
313 | // Nocks. |
||
314 | $gateways[] = new \Pronamic\WordPress\Pay\Gateways\Nocks\Integration(); |
||
315 | |||
316 | // Ingenico - DirectLink. |
||
317 | $gateways[] = new \Pronamic\WordPress\Pay\Gateways\Ingenico\DirectLink\Integration(); |
||
318 | |||
319 | // Ingenico - OrderStandard. |
||
320 | $gateways[] = new \Pronamic\WordPress\Pay\Gateways\Ingenico\OrderStandard\Integration(); |
||
321 | |||
322 | // Rabobank - OmniKassa. |
||
323 | $gateways[] = new \Pronamic\WordPress\Pay\Gateways\OmniKassa\Integration(); |
||
324 | |||
325 | // Rabobank - OmniKassa 2.0. |
||
326 | $gateways[] = new \Pronamic\WordPress\Pay\Gateways\OmniKassa2\Integration(); |
||
327 | |||
328 | // Pay.nl. |
||
329 | $gateways[] = new \Pronamic\WordPress\Pay\Gateways\PayNL\Integration(); |
||
330 | |||
331 | // Rabobank - iDEAL Professional (v3). |
||
332 | $gateways[] = new \Pronamic\WordPress\Pay\Gateways\IDealAdvancedV3\Integration( |
||
333 | array( |
||
334 | 'id' => 'rabobank-ideal-professional-v3', |
||
335 | 'name' => 'Rabobank - iDEAL Professional (v3)', |
||
336 | 'provider' => 'rabobank', |
||
337 | 'product_url' => 'https://www.rabobank.nl/bedrijven/betalen/geld-ontvangen/ideal-professional/', |
||
338 | 'manual_url' => __( 'https://www.pronamic.eu/support/how-to-connect-rabobank-ideal-professional-v3-with-wordpress-via-pronamic-pay/', 'pronamic_ideal' ), |
||
339 | 'dashboard_url' => array( |
||
340 | 'test' => 'https://idealtest.rabobank.nl/', |
||
341 | 'live' => 'https://ideal.rabobank.nl/', |
||
342 | ), |
||
343 | 'aquirer_url' => 'https://ideal.rabobank.nl/ideal/iDEALv3', |
||
344 | 'aquirer_test_url' => 'https://idealtest.rabobank.nl/ideal/iDEALv3', |
||
345 | 'certificates' => array(), |
||
346 | ) |
||
347 | ); |
||
348 | |||
349 | // Sisow. |
||
350 | $gateways[] = new \Pronamic\WordPress\Pay\Gateways\Sisow\Integration(); |
||
351 | |||
352 | // Sisow - iDEAL Basic. |
||
353 | $gateways[] = new \Pronamic\WordPress\Pay\Gateways\IDealBasic\Integration( |
||
354 | array( |
||
355 | 'id' => 'sisow-ideal-basic', |
||
356 | 'name' => 'Sisow - iDEAL Basic', |
||
357 | 'provider' => 'sisow', |
||
358 | 'url' => 'https://www.sisow.nl/', |
||
359 | 'dashboard_url' => 'https://www.sisow.nl/Sisow/iDeal/Login.aspx', |
||
360 | 'deprecated' => true, |
||
361 | 'aquirer_url' => 'https://www.sisow.nl/Sisow/iDeal/IssuerHandler.ashx', |
||
362 | 'aquirer_test_url' => 'https://www.sisow.nl/Sisow/iDeal/IssuerHandler.ashx/test', |
||
363 | ) |
||
364 | ); |
||
365 | |||
366 | // TargetPay. |
||
367 | $gateways[] = new \Pronamic\WordPress\Pay\Gateways\TargetPay\Integration(); |
||
368 | |||
369 | // Return gateways. |
||
370 | return $gateways; |
||
371 | } |
||
372 | ); |
||
373 | |||
374 | /** |
||
375 | * Backward compatibility. |
||
376 | */ |
||
377 | global $pronamic_ideal; |
||
378 | |||
379 | $pronamic_ideal = pronamic_pay_plugin(); |
||
380 |
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.
If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. Please note the @ignore annotation hint above.