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 | * 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-2019 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 | 'extensions' => array( |
||
85 | '\Pronamic\WordPress\Pay\Extensions\Charitable\Extension::bootstrap', |
||
86 | '\Pronamic\WordPress\Pay\Extensions\Give\Extension::bootstrap', |
||
87 | '\Pronamic\WordPress\Pay\Extensions\WooCommerce\Extension::bootstrap', |
||
88 | '\Pronamic\WordPress\Pay\Extensions\GravityForms\Extension::bootstrap', |
||
89 | '\Pronamic\WordPress\Pay\Extensions\Shopp\Extension::bootstrap', |
||
90 | '\Pronamic\WordPress\Pay\Extensions\Jigoshop\Extension::bootstrap', |
||
91 | '\Pronamic\WordPress\Pay\Extensions\WPeCommerce\Extension::bootstrap', |
||
92 | '\Pronamic\WordPress\Pay\Extensions\ClassiPress\Extension::bootstrap', |
||
93 | '\Pronamic\WordPress\Pay\Extensions\EventEspressoLegacy\Extension::bootstrap', |
||
94 | '\Pronamic\WordPress\Pay\Extensions\EventEspresso\Extension::bootstrap', |
||
95 | '\Pronamic\WordPress\Pay\Extensions\AppThemes\Extension::bootstrap', |
||
96 | '\Pronamic\WordPress\Pay\Extensions\S2Member\Extension::bootstrap', |
||
97 | '\Pronamic\WordPress\Pay\Extensions\Membership\Extension::bootstrap', |
||
98 | '\Pronamic\WordPress\Pay\Extensions\EasyDigitalDownloads\Extension::bootstrap', |
||
99 | '\Pronamic\WordPress\Pay\Extensions\IThemesExchange\Extension::bootstrap', |
||
100 | '\Pronamic\WordPress\Pay\Extensions\MemberPress\Extension::bootstrap', |
||
101 | '\Pronamic\WordPress\Pay\Extensions\FormidableForms\Extension::bootstrap', |
||
102 | '\Pronamic\WordPress\Pay\Extensions\NinjaForms\Extension::bootstrap', |
||
103 | ), |
||
104 | ) |
||
105 | ); |
||
106 | |||
107 | add_filter( |
||
108 | 'pronamic_pay_plugin_integrations', |
||
109 | function( $integrations ) { |
||
110 | // Restrict Content Pro. |
||
111 | $integrations[] = new \Pronamic\WordPress\Pay\Extensions\RestrictContentPro\Extension( |
||
112 | array( |
||
113 | 'slug' => 'restrict-content-pro', |
||
114 | 'option_db_version' => 'pronamic_pay_restrictcontentpro_db_version', |
||
115 | 'name' => 'Restrict Content Pro', |
||
116 | 'manual_url' => null, |
||
117 | /** |
||
118 | * Affiliate link. |
||
119 | * |
||
120 | * @link https://restrictcontentpro.com/affiliates/ |
||
121 | * @link https://restrictcontentpro.com/affiliate-agreement/ |
||
122 | * @todo Request a Restrict Content Pro affiliate link. |
||
123 | */ |
||
124 | 'affiliate_url' => null, |
||
125 | /** |
||
126 | * Requirements. |
||
127 | * |
||
128 | * @link https://github.com/dsawardekar/wp-requirements |
||
129 | * @link https://github.com/afragen/wp-dependency-installer |
||
130 | * @link https://github.com/wearerequired/wp-requirements-check |
||
131 | * @link https://github.com/ultraleettech/wp-requirements-checker |
||
132 | * @link https://waclawjacek.com/check-wordpress-plugin-dependencies/ |
||
133 | * @link https://github.com/xwp/wp-plugin-dependencies |
||
134 | * @link https://wordpress.org/plugins/plugin-dependencies/ |
||
135 | * @link https://github.com/joshbetz/wp-plugin-dependencies |
||
136 | * @link https://github.com/jrfnl/wp-known-plugin-dependencies |
||
137 | * @link https://github.com/xwp/wp-plugin-dependencies/issues/34 |
||
138 | * @link https://github.com/WordPress/WordPress/blob/master/wp-includes/class.wp-dependencies.php |
||
139 | * @link https://github.com/WordPress/WordPress/blob/master/wp-includes/class-wp-dependency.php |
||
140 | * @link https://github.com/Yoast/yoast-acf-analysis/blob/2.3.0/inc/ac-yoast-seo-acf-content-analysis.php#L30-L32 |
||
141 | * @link https://github.com/Yoast/yoast-acf-analysis/blob/2.3.0/inc/requirements.php |
||
142 | */ |
||
143 | 'requirements' => array( |
||
144 | array( |
||
145 | 'type' => 'php', |
||
146 | 'requires_at_least' => '5.6.20', |
||
147 | ), |
||
148 | array( |
||
149 | 'type' => 'php-ext', |
||
150 | 'name' => 'Internationalization', |
||
151 | 'slug' => 'intl', |
||
152 | 'is_active' => function() { |
||
153 | return \extension_loaded( 'intl' ); |
||
154 | } |
||
155 | ), |
||
156 | array( |
||
157 | 'type' => 'wp', |
||
158 | 'requires_at_least' => '4.7', |
||
159 | ), |
||
160 | array( |
||
161 | 'type' => 'wp-plugin', |
||
162 | 'name' => 'Restrict Content Pro', |
||
163 | 'slug' => 'restrict-content-pro', |
||
164 | 'uri' => 'https://restrictcontentpro.com/', |
||
165 | 'requires_at_least' => '3.0.0', |
||
166 | 'tested_up_to' => '3.1.2', |
||
167 | 'is_active' => function() { |
||
168 | return \defined( 'RCP_PLUGIN_VERSION' ); |
||
169 | }, |
||
170 | 'get_version' => function() { |
||
171 | if ( \defined( 'RCP_PLUGIN_VERSION' ) ) { |
||
172 | return RCP_PLUGIN_VERSION; |
||
1 ignored issue
–
show
Bug
introduced
by
![]() |
|||
173 | } |
||
174 | } |
||
175 | ), |
||
176 | ), |
||
177 | ) |
||
178 | ); |
||
179 | |||
180 | // Return integrations. |
||
181 | return $integrations; |
||
182 | } |
||
183 | ); |
||
184 | |||
185 | add_filter( |
||
186 | 'pronamic_pay_gateways', |
||
187 | function( $gateways ) { |
||
188 | // ABN AMRO - iDEAL Zelfbouw (v3). |
||
189 | $gateways[] = new \Pronamic\WordPress\Pay\Gateways\IDealAdvancedV3\Integration( |
||
190 | array( |
||
191 | 'id' => 'abnamro-ideal-zelfbouw-v3', |
||
192 | 'name' => 'ABN AMRO - iDEAL Zelfbouw (v3)', |
||
193 | 'provider' => 'abnamro', |
||
194 | 'url' => 'https://abnamro.ideal-payment.de/', |
||
195 | 'product_url' => 'https://www.abnamro.nl/nl/zakelijk/betalen/online-betalen/betaaloplossing/', |
||
196 | 'dashboard_url' => array( |
||
197 | 'test' => 'https://abnamro-test.ideal-payment.de/', |
||
198 | 'live' => 'https://abnamro.ideal-payment.de/', |
||
199 | ), |
||
200 | 'aquirer_url' => 'https://abnamro.ideal-payment.de/ideal/iDEALv3', |
||
201 | 'aquirer_test_url' => 'https://abnamro-test.ideal-payment.de/ideal/iDEALv3', |
||
202 | 'certificates' => array(), |
||
203 | ) |
||
204 | ); |
||
205 | |||
206 | // Buckaroo. |
||
207 | $gateways[] = new \Pronamic\WordPress\Pay\Gateways\Buckaroo\Integration(); |
||
208 | |||
209 | // Deutsche Bank - iDEAL Expert (v3). |
||
210 | $gateways[] = new \Pronamic\WordPress\Pay\Gateways\IDealAdvancedV3\Integration( |
||
211 | array( |
||
212 | 'id' => 'deutschebank-ideal-expert-v3', |
||
213 | 'name' => 'Deutsche Bank - iDEAL Expert (v3)', |
||
214 | 'provider' => 'deutschebank', |
||
215 | 'product_url' => 'https://www.deutschebank.nl/nl/content/producten_en_services_commercial_banking_cash_management_betalen_ideal.html', |
||
216 | 'dashboard_url' => array( |
||
217 | 'test' => 'https://myideal.test.db.com/', |
||
218 | 'live' => 'https://myideal.db.com/', |
||
219 | ), |
||
220 | 'aquirer_url' => 'https://myideal.db.com/ideal/iDealv3', |
||
221 | 'aquirer_test_url' => null, |
||
222 | 'certificates' => array(), |
||
223 | ) |
||
224 | ); |
||
225 | |||
226 | // EMS - eCommerce. |
||
227 | $gateways[] = new \Pronamic\WordPress\Pay\Gateways\EMS\ECommerce\Integration(); |
||
228 | |||
229 | // Fibonacci ORANGE. |
||
230 | $gateways[] = new \Pronamic\WordPress\Pay\Gateways\Icepay\Integration( |
||
231 | array( |
||
232 | 'id' => 'fibonacciorange', |
||
233 | 'name' => 'Fibonacci ORANGE', |
||
234 | 'provider' => 'fibonacciorange', |
||
235 | 'product_url' => 'http://www.fibonacciorange.nl/', |
||
236 | ) |
||
237 | ); |
||
238 | |||
239 | // ICEPAY. |
||
240 | $gateways[] = new \Pronamic\WordPress\Pay\Gateways\Icepay\Integration(); |
||
241 | |||
242 | // iDEAL Simulator - iDEAL Professional / Advanced / Zelfbouw (v3). |
||
243 | $gateways[] = new \Pronamic\WordPress\Pay\Gateways\IDealAdvancedV3\Integration( |
||
244 | array( |
||
245 | 'id' => 'ideal-simulator-ideal-advanced-v3', |
||
246 | 'name' => 'iDEAL Simulator - iDEAL Professional / Advanced', |
||
247 | 'provider' => 'ideal-simulator', |
||
248 | 'product_url' => 'https://www.ideal-checkout.nl/support/ideal-simulator', |
||
249 | 'aquirer_url' => 'https://www.ideal-checkout.nl/simulator/', |
||
250 | 'aquirer_test_url' => null, |
||
251 | 'certificates' => array(), |
||
252 | ) |
||
253 | ); |
||
254 | |||
255 | // ING - iDEAL Basic. |
||
256 | $gateways[] = new \Pronamic\WordPress\Pay\Gateways\IDealBasic\Integration( |
||
257 | array( |
||
258 | 'id' => 'ing-ideal-basic', |
||
259 | 'name' => 'ING - iDEAL Basic', |
||
260 | 'provider' => 'ing', |
||
261 | 'product_url' => 'https://www.ing.nl/zakelijk/betalen/geld-ontvangen/ideal/', |
||
262 | 'manual_url' => __( 'https://www.pronamic.eu/support/how-to-connect-ing-ideal-basic-with-wordpress-via-pronamic-pay/', 'pronamic_ideal' ), |
||
263 | 'dashboard_url' => array( |
||
264 | 'test' => 'https://idealtest.secure-ing.com/', |
||
265 | 'live' => 'https://ideal.secure-ing.com/', |
||
266 | ), |
||
267 | 'aquirer_url' => 'https://ideal.secure-ing.com/ideal/mpiPayInitIng.do', |
||
268 | 'aquirer_test_url' => 'https://idealtest.secure-ing.com/ideal/mpiPayInitIng.do', |
||
269 | ) |
||
270 | ); |
||
271 | |||
272 | // ING - iDEAL Advanced (v3). |
||
273 | $gateways[] = new \Pronamic\WordPress\Pay\Gateways\IDealAdvancedV3\Integration( |
||
274 | array( |
||
275 | 'id' => 'ing-ideal-advanced-v3', |
||
276 | 'name' => 'ING - iDEAL Advanced (v3)', |
||
277 | 'provider' => 'ing', |
||
278 | 'product_url' => 'https://www.ing.nl/zakelijk/betalen/geld-ontvangen/ideal/', |
||
279 | 'manual_url' => __( 'https://www.pronamic.eu/support/how-to-connect-ing-ideal-advanced-v3-with-wordpress-via-pronamic-pay/', 'pronamic_ideal' ), |
||
280 | 'dashboard_url' => array( |
||
281 | 'test' => 'https://idealtest.secure-ing.com/', |
||
282 | 'live' => 'https://ideal.secure-ing.com/', |
||
283 | ), |
||
284 | 'aquirer_url' => 'https://ideal.secure-ing.com/ideal/iDEALv3', |
||
285 | 'aquirer_test_url' => 'https://idealtest.secure-ing.com/ideal/iDEALv3', |
||
286 | 'certificates' => array(), |
||
287 | ) |
||
288 | ); |
||
289 | |||
290 | // ING - Kassa Compleet. |
||
291 | $gateways[] = new \Pronamic\WordPress\Pay\Gateways\ING\KassaCompleet\Integration(); |
||
292 | |||
293 | // Mollie. |
||
294 | $gateways[] = new \Pronamic\WordPress\Pay\Gateways\Mollie\Integration(); |
||
295 | |||
296 | // Mollie - iDEAL. |
||
297 | $gateways[] = new \Pronamic\WordPress\Pay\Gateways\MollieIDeal\Integration(); |
||
298 | |||
299 | // Mollie - iDEAL Basic. |
||
300 | $gateways[] = new \Pronamic\WordPress\Pay\Gateways\IDealBasic\Integration( |
||
301 | array( |
||
302 | 'id' => 'mollie-ideal-basic', |
||
303 | 'name' => 'Mollie - iDEAL Basic', |
||
304 | 'provider' => 'mollie', |
||
305 | 'dashboard_url' => 'http://www.mollie.nl/beheer/', |
||
306 | 'deprecated' => true, |
||
307 | 'aquirer_url' => 'https://secure.mollie.nl/xml/idealAcquirer/lite/', |
||
308 | 'aquirer_test_url' => 'https://secure.mollie.nl/xml/idealAcquirer/testmode/lite/', |
||
309 | ) |
||
310 | ); |
||
311 | |||
312 | // MultiSafePay - Connect. |
||
313 | $gateways[] = new \Pronamic\WordPress\Pay\Gateways\MultiSafepay\Integration(); |
||
314 | |||
315 | // Nocks. |
||
316 | $gateways[] = new \Pronamic\WordPress\Pay\Gateways\Nocks\Integration(); |
||
317 | |||
318 | // Ingenico - DirectLink. |
||
319 | $gateways[] = new \Pronamic\WordPress\Pay\Gateways\Ingenico\DirectLink\Integration(); |
||
320 | |||
321 | // Ingenico - OrderStandard. |
||
322 | $gateways[] = new \Pronamic\WordPress\Pay\Gateways\Ingenico\OrderStandard\Integration(); |
||
323 | |||
324 | // Rabobank - OmniKassa. |
||
325 | $gateways[] = new \Pronamic\WordPress\Pay\Gateways\OmniKassa\Integration(); |
||
326 | |||
327 | // Rabobank - OmniKassa 2.0. |
||
328 | $gateways[] = new \Pronamic\WordPress\Pay\Gateways\OmniKassa2\Integration(); |
||
329 | |||
330 | // Pay.nl. |
||
331 | $gateways[] = new \Pronamic\WordPress\Pay\Gateways\PayNL\Integration(); |
||
332 | |||
333 | // Rabobank - iDEAL Professional (v3). |
||
334 | $gateways[] = new \Pronamic\WordPress\Pay\Gateways\IDealAdvancedV3\Integration( |
||
335 | array( |
||
336 | 'id' => 'rabobank-ideal-professional-v3', |
||
337 | 'name' => 'Rabobank - iDEAL Professional (v3)', |
||
338 | 'provider' => 'rabobank', |
||
339 | 'product_url' => 'https://www.rabobank.nl/bedrijven/betalen/geld-ontvangen/ideal-professional/', |
||
340 | 'manual_url' => __( 'https://www.pronamic.eu/support/how-to-connect-rabobank-ideal-professional-v3-with-wordpress-via-pronamic-pay/', 'pronamic_ideal' ), |
||
341 | 'dashboard_url' => array( |
||
342 | 'test' => 'https://idealtest.rabobank.nl/', |
||
343 | 'live' => 'https://ideal.rabobank.nl/', |
||
344 | ), |
||
345 | 'aquirer_url' => 'https://ideal.rabobank.nl/ideal/iDEALv3', |
||
346 | 'aquirer_test_url' => 'https://idealtest.rabobank.nl/ideal/iDEALv3', |
||
347 | 'certificates' => array(), |
||
348 | ) |
||
349 | ); |
||
350 | |||
351 | // Sisow. |
||
352 | $gateways[] = new \Pronamic\WordPress\Pay\Gateways\Sisow\Integration(); |
||
353 | |||
354 | // Sisow - iDEAL Basic. |
||
355 | $gateways[] = new \Pronamic\WordPress\Pay\Gateways\IDealBasic\Integration( |
||
356 | array( |
||
357 | 'id' => 'sisow-ideal-basic', |
||
358 | 'name' => 'Sisow - iDEAL Basic', |
||
359 | 'provider' => 'sisow', |
||
360 | 'url' => 'https://www.sisow.nl/', |
||
361 | 'dashboard_url' => 'https://www.sisow.nl/Sisow/iDeal/Login.aspx', |
||
362 | 'deprecated' => true, |
||
363 | 'aquirer_url' => 'https://www.sisow.nl/Sisow/iDeal/IssuerHandler.ashx', |
||
364 | 'aquirer_test_url' => 'https://www.sisow.nl/Sisow/iDeal/IssuerHandler.ashx/test', |
||
365 | ) |
||
366 | ); |
||
367 | |||
368 | // TargetPay. |
||
369 | $gateways[] = new \Pronamic\WordPress\Pay\Gateways\TargetPay\Integration(); |
||
370 | |||
371 | // Return gateways. |
||
372 | return $gateways; |
||
373 | } |
||
374 | ); |
||
375 | |||
376 | /** |
||
377 | * Backward compatibility. |
||
378 | */ |
||
379 | global $pronamic_ideal; |
||
380 | |||
381 | $pronamic_ideal = pronamic_pay_plugin(); |
||
382 |