Failed Conditions
Push — develop ( c3d0ec...a72652 )
by Reüel
03:47 queued 10s
created

pronamic-ideal.php (1 issue)

Labels
Severity
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.4.1
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
$autoload_before = __DIR__ . '/src/autoload-before.php';
36
37
if ( is_readable( $autoload_before ) ) {
38
	require $autoload_before;
39
}
40
41
$loader = require __DIR__ . '/vendor/autoload.php';
42
43
$autoload_after = __DIR__ . '/src/autoload-after.php';
44
45
if ( is_readable( $autoload_after ) ) {
46
	require $autoload_after;
47
}
48
49
/**
50
 * Bootstrap.
51
 */
52
\Pronamic\WordPress\Pay\Plugin::instance(
53
	array(
54
		'file'    => __FILE__,
55
		'options' => array(
56
			'about_page_file' => __DIR__ . '/admin/page-about.php',
57
		),
58
	)
59
);
60
61
add_filter(
62
	'pronamic_pay_plugin_integrations',
63
	function( $integrations ) {
64
		// Charitable.
65
		$integrations[] = new \Pronamic\WordPress\Pay\Extensions\Charitable\Extension();
66
67
		// Easy Digital Downloads.
68
		$integrations[] = new \Pronamic\WordPress\Pay\Extensions\EasyDigitalDownloads\Extension();
69
70
		// Event Espresso.
71
		$integrations[] = new \Pronamic\WordPress\Pay\Extensions\EventEspressoLegacy\Extension();
72
		$integrations[] = new \Pronamic\WordPress\Pay\Extensions\EventEspresso\Extension();
73
74
		// Give.
75
		$integrations[] = new \Pronamic\WordPress\Pay\Extensions\Give\Extension();
76
77
		// WooCommerce.
78
		$integrations[] = new \Pronamic\WordPress\Pay\Extensions\WooCommerce\Extension();
79
80
		// Gravity Forms.
81
		$integrations[] = new \Pronamic\WordPress\Pay\Extensions\GravityForms\Extension();
82
83
		// FormidableForms.
84
		$integrations[] = new \Pronamic\WordPress\Pay\Extensions\FormidableForms\Extension();
85
86
		// MemberPress.
87
		$integrations[] = new \Pronamic\WordPress\Pay\Extensions\MemberPress\Extension();
88
89
		// NinjaForms.
90
		$integrations[] = new \Pronamic\WordPress\Pay\Extensions\NinjaForms\Extension();
91
92
		// Restrict Content Pro.
93
		$integrations[] = new \Pronamic\WordPress\Pay\Extensions\RestrictContentPro\Extension(
94
			array(
95
				'slug'                   => 'restrict-content-pro',
96
				'db_version_option_name' => 'pronamic_pay_restrictcontentpro_db_version',
97
				'name'                   => 'Restrict Content Pro',
98
				'manual_url'             => null,
99
				/**
100
				 * Affiliate link.
101
				 *
102
				 * @link https://restrictcontentpro.com/affiliates/
103
				 * @link https://restrictcontentpro.com/affiliate-agreement/
104
				 * @todo Request a Restrict Content Pro affiliate link.
105
				 */
106
				'affiliate_url'          => null,
107
				/**
108
				 * Requirements.
109
				 *
110
				 * @link https://github.com/dsawardekar/wp-requirements
111
				 * @link https://github.com/afragen/wp-dependency-installer
112
				 * @link https://github.com/wearerequired/wp-requirements-check
113
				 * @link https://github.com/ultraleettech/wp-requirements-checker
114
				 * @link https://waclawjacek.com/check-wordpress-plugin-dependencies/
115
				 * @link https://github.com/xwp/wp-plugin-dependencies
116
				 * @link https://wordpress.org/plugins/plugin-dependencies/
117
				 * @link https://github.com/joshbetz/wp-plugin-dependencies
118
				 * @link https://github.com/jrfnl/wp-known-plugin-dependencies
119
				 * @link https://github.com/xwp/wp-plugin-dependencies/issues/34
120
				 * @link https://github.com/WordPress/WordPress/blob/master/wp-includes/class.wp-dependencies.php
121
				 * @link https://github.com/WordPress/WordPress/blob/master/wp-includes/class-wp-dependency.php
122
				 * @link https://github.com/Yoast/yoast-acf-analysis/blob/2.3.0/inc/ac-yoast-seo-acf-content-analysis.php#L30-L32
123
				 * @link https://github.com/Yoast/yoast-acf-analysis/blob/2.3.0/inc/requirements.php
124
				 */
125
				'requirements'           => array(
126
					array(
127
						'type'              => 'php',
128
						'requires_at_least' => '5.6.20',
129
					),
130
					array(
131
						'type'      => 'php-ext',
132
						'name'      => 'Internationalization',
133
						'slug'      => 'intl',
134
						'is_active' => function() {
135
							return \extension_loaded( 'intl' );
136
						},
137
					),
138
					array(
139
						'type'              => 'wp',
140
						'requires_at_least' => '4.7',
141
					),
142
					array(
143
						'type'              => 'wp-plugin',
144
						'name'              => 'Restrict Content Pro',
145
						'slug'              => 'restrict-content-pro',
146
						'uri'               => 'https://restrictcontentpro.com/',
147
						'requires_at_least' => '3.0.0',
148
						'tested_up_to'      => '3.1.2',
149
						'is_active'         => function() {
150
							return \defined( 'RCP_PLUGIN_VERSION' );
151
						},
152
						'get_version'       => function() {
153
							if ( \defined( 'RCP_PLUGIN_VERSION' ) ) {
154
								return RCP_PLUGIN_VERSION;
155
							}
156
						},
157
					),
158
				),
159
			)
160
		);
161
162
		// s2Member.
163
		$integrations[] = new \Pronamic\WordPress\Pay\Extensions\S2Member\Extension();
164
165
		// WP e-Commerce.
166
		$integrations[] = new \Pronamic\WordPress\Pay\Extensions\WPeCommerce\Extension();
167
168
		// Return integrations.
169
		return $integrations;
170
	}
171
);
172
173
add_filter(
174
	'pronamic_pay_gateways',
175
	function( $gateways ) {
176
		// ABN AMRO - iDEAL Zelfbouw (v3).
177
		$gateways[] = new \Pronamic\WordPress\Pay\Gateways\IDealAdvancedV3\Integration(
178
			array(
179
				'id'                => 'abnamro-ideal-zelfbouw-v3',
180
				'name'              => 'ABN AMRO - iDEAL Zelfbouw (v3)',
181
				'provider'          => 'abnamro',
182
				'url'               => 'https://abnamro.ideal-payment.de/',
183
				'product_url'       => 'https://www.abnamro.nl/nl/zakelijk/betalen/online-betalen/betaaloplossing/',
184
				'dashboard_url'     => array(
185
					'test' => 'https://abnamro-test.ideal-payment.de/',
186
					'live' => 'https://abnamro.ideal-payment.de/',
187
				),
188
				'acquirer_url'      => 'https://abnamro.ideal-payment.de/ideal/iDEALv3',
189
				'acquirer_test_url' => 'https://abnamro-test.ideal-payment.de/ideal/iDEALv3',
190
				'certificates'      => array(),
191
			)
192
		);
193
194
		// Buckaroo.
195
		$gateways[] = new \Pronamic\WordPress\Pay\Gateways\Buckaroo\Integration();
196
197
		// Deutsche Bank - iDEAL Expert (v3).
198
		$gateways[] = new \Pronamic\WordPress\Pay\Gateways\IDealAdvancedV3\Integration(
199
			array(
200
				'id'                => 'deutschebank-ideal-expert-v3',
201
				'name'              => 'Deutsche Bank - iDEAL Expert (v3)',
202
				'provider'          => 'deutschebank',
203
				'product_url'       => 'https://www.deutschebank.nl/nl/content/producten_en_services_commercial_banking_cash_management_betalen_ideal.html',
204
				'dashboard_url'     => array(
205
					'test' => 'https://myideal.test.db.com/',
206
					'live' => 'https://myideal.db.com/',
207
				),
208
				'acquirer_url'      => 'https://myideal.db.com/ideal/iDealv3',
209
				'acquirer_test_url' => null,
210
				'certificates'      => array(),
211
			)
212
		);
213
214
		// EMS - eCommerce.
215
		$gateways[] = new \Pronamic\WordPress\Pay\Gateways\EMS\ECommerce\Integration();
216
217
		// Fibonacci ORANGE.
218
		$gateways[] = new \Pronamic\WordPress\Pay\Gateways\Icepay\Integration(
219
			array(
220
				'id'          => 'fibonacciorange',
221
				'name'        => 'Fibonacci ORANGE',
222
				'provider'    => 'fibonacciorange',
223
				'product_url' => 'http://www.fibonacciorange.nl/',
224
			)
225
		);
226
227
		// ICEPAY.
228
		$gateways[] = new \Pronamic\WordPress\Pay\Gateways\Icepay\Integration();
229
230
		// iDEAL Simulator - iDEAL Professional / Advanced / Zelfbouw (v3).
231
		$gateways[] = new \Pronamic\WordPress\Pay\Gateways\IDealAdvancedV3\Integration(
232
			array(
233
				'id'                => 'ideal-simulator-ideal-advanced-v3',
234
				'name'              => 'iDEAL Simulator - iDEAL Professional / Advanced',
235
				'provider'          => 'ideal-simulator',
236
				'product_url'       => 'https://www.ideal-checkout.nl/support/ideal-simulator',
237
				'acquirer_url'      => 'https://www.ideal-checkout.nl/simulator/',
238
				'acquirer_test_url' => null,
239
				'certificates'      => array(),
240
			)
241
		);
242
243
		// ING - iDEAL Basic.
244
		$gateways[] = new \Pronamic\WordPress\Pay\Gateways\IDealBasic\Integration(
245
			array(
246
				'id'                => 'ing-ideal-basic',
247
				'name'              => 'ING - iDEAL Basic',
248
				'provider'          => 'ing',
249
				'product_url'       => 'https://www.ing.nl/zakelijk/betalen/geld-ontvangen/ideal/',
250
				'manual_url'        => __( 'https://www.pronamic.eu/support/how-to-connect-ing-ideal-basic-with-wordpress-via-pronamic-pay/', 'pronamic_ideal' ),
251
				'dashboard_url'     => array(
252
					'test' => 'https://idealtest.secure-ing.com/',
253
					'live' => 'https://ideal.secure-ing.com/',
254
				),
255
				'acquirer_url'      => 'https://ideal.secure-ing.com/ideal/mpiPayInitIng.do',
256
				'acquirer_test_url' => 'https://idealtest.secure-ing.com/ideal/mpiPayInitIng.do',
257
			)
258
		);
259
260
		// ING - iDEAL Advanced (v3).
261
		$gateways[] = new \Pronamic\WordPress\Pay\Gateways\IDealAdvancedV3\Integration(
262
			array(
263
				'id'                => 'ing-ideal-advanced-v3',
264
				'name'              => 'ING - iDEAL Advanced (v3)',
265
				'provider'          => 'ing',
266
				'product_url'       => 'https://www.ing.nl/zakelijk/betalen/geld-ontvangen/ideal/',
267
				'manual_url'        => __( 'https://www.pronamic.eu/support/how-to-connect-ing-ideal-advanced-v3-with-wordpress-via-pronamic-pay/', 'pronamic_ideal' ),
268
				'dashboard_url'     => array(
269
					'test' => 'https://idealtest.secure-ing.com/',
270
					'live' => 'https://ideal.secure-ing.com/',
271
				),
272
				'acquirer_url'      => 'https://ideal.secure-ing.com/ideal/iDEALv3',
273
				'acquirer_test_url' => 'https://idealtest.secure-ing.com/ideal/iDEALv3',
274
				'certificates'      => array(),
275
			)
276
		);
277
278
		// ING - Kassa Compleet.
279
		$gateways[] = new \Pronamic\WordPress\Pay\Gateways\ING\KassaCompleet\Integration();
280
281
		// Mollie.
282
		$gateways[] = new \Pronamic\WordPress\Pay\Gateways\Mollie\Integration(
283
			array(
0 ignored issues
show
array('register_url' => ...pay_mollie_db_version') of type array<string,string> is incompatible with the type array<string,array> expected by parameter $args of Pronamic\WordPress\Pay\G...egration::__construct(). ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

283
			/** @scrutinizer ignore-type */ array(
Loading history...
284
				'register_url'           => 'https://www.mollie.com/nl/signup/665327',
285
				'manual_url'             => \__( 'https://www.pronamic.eu/support/how-to-connect-mollie-with-wordpress-via-pronamic-pay/', 'pronamic_ideal' ),
286
				'version_option_name'    => 'pronamic_pay_mollie_version',
287
				'db_version_option_name' => 'pronamic_pay_mollie_db_version',
288
			)
289
		);
290
291
		// Mollie - iDEAL.
292
		$gateways[] = new \Pronamic\WordPress\Pay\Gateways\MollieIDeal\Integration();
293
294
		// Mollie - iDEAL Basic.
295
		$gateways[] = new \Pronamic\WordPress\Pay\Gateways\IDealBasic\Integration(
296
			array(
297
				'id'                => 'mollie-ideal-basic',
298
				'name'              => 'Mollie - iDEAL Basic',
299
				'provider'          => 'mollie',
300
				'dashboard_url'     => 'http://www.mollie.nl/beheer/',
301
				'deprecated'        => true,
302
				'acquirer_url'      => 'https://secure.mollie.nl/xml/idealAcquirer/lite/',
303
				'acquirer_test_url' => 'https://secure.mollie.nl/xml/idealAcquirer/testmode/lite/',
304
			)
305
		);
306
307
		// MultiSafePay - Connect.
308
		$gateways[] = new \Pronamic\WordPress\Pay\Gateways\MultiSafepay\Integration();
309
310
		// Nocks.
311
		$gateways[] = new \Pronamic\WordPress\Pay\Gateways\Nocks\Integration();
312
313
		// Ingenico - DirectLink.
314
		$gateways[] = new \Pronamic\WordPress\Pay\Gateways\Ingenico\DirectLink\Integration();
315
316
		// Ingenico - OrderStandard.
317
		$gateways[] = new \Pronamic\WordPress\Pay\Gateways\Ingenico\OrderStandard\Integration();
318
319
		// Rabobank - OmniKassa.
320
		$gateways[] = new \Pronamic\WordPress\Pay\Gateways\OmniKassa\Integration();
321
322
		// Rabobank - OmniKassa 2.0.
323
		$gateways[] = new \Pronamic\WordPress\Pay\Gateways\OmniKassa2\Integration();
324
325
		// Pay.nl.
326
		$gateways[] = new \Pronamic\WordPress\Pay\Gateways\PayNL\Integration();
327
328
		// Rabobank - iDEAL Professional (v3).
329
		$gateways[] = new \Pronamic\WordPress\Pay\Gateways\IDealAdvancedV3\Integration(
330
			array(
331
				'id'                => 'rabobank-ideal-professional-v3',
332
				'name'              => 'Rabobank - iDEAL Professional (v3)',
333
				'provider'          => 'rabobank',
334
				'product_url'       => 'https://www.rabobank.nl/bedrijven/betalen/geld-ontvangen/ideal-professional/',
335
				'manual_url'        => __( 'https://www.pronamic.eu/support/how-to-connect-rabobank-ideal-professional-v3-with-wordpress-via-pronamic-pay/', 'pronamic_ideal' ),
336
				'dashboard_url'     => array(
337
					'test' => 'https://idealtest.rabobank.nl/',
338
					'live' => 'https://ideal.rabobank.nl/',
339
				),
340
				'acquirer_url'      => 'https://ideal.rabobank.nl/ideal/iDEALv3',
341
				'acquirer_test_url' => 'https://idealtest.rabobank.nl/ideal/iDEALv3',
342
				'certificates'      => array(),
343
			)
344
		);
345
346
		// Sisow.
347
		$gateways[] = new \Pronamic\WordPress\Pay\Gateways\Sisow\Integration();
348
349
		// Sisow - iDEAL Basic.
350
		$gateways[] = new \Pronamic\WordPress\Pay\Gateways\IDealBasic\Integration(
351
			array(
352
				'id'                => 'sisow-ideal-basic',
353
				'name'              => 'Sisow - iDEAL Basic',
354
				'provider'          => 'sisow',
355
				'url'               => 'https://www.sisow.nl/',
356
				'dashboard_url'     => 'https://www.sisow.nl/Sisow/iDeal/Login.aspx',
357
				'deprecated'        => true,
358
				'acquirer_url'      => 'https://www.sisow.nl/Sisow/iDeal/IssuerHandler.ashx',
359
				'acquirer_test_url' => 'https://www.sisow.nl/Sisow/iDeal/IssuerHandler.ashx/test',
360
			)
361
		);
362
363
		// TargetPay.
364
		$gateways[] = new \Pronamic\WordPress\Pay\Gateways\TargetPay\Integration();
365
366
		// Return gateways.
367
		return $gateways;
368
	}
369
);
370
371
/**
372
 * Backward compatibility.
373
 */
374
global $pronamic_ideal;
375
376
$pronamic_ideal = pronamic_pay_plugin();
377