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