Issues (7)

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.7.2
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-2021 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
		// ICEPAY.
218
		$gateways[] = new \Pronamic\WordPress\Pay\Gateways\Icepay\Integration();
219
220
		// iDEAL Simulator - iDEAL Professional / Advanced / Zelfbouw (v3).
221
		$gateways[] = new \Pronamic\WordPress\Pay\Gateways\IDealAdvancedV3\Integration(
222
			array(
223
				'id'                => 'ideal-simulator-ideal-advanced-v3',
224
				'name'              => 'iDEAL Simulator - iDEAL Professional / Advanced',
225
				'provider'          => 'ideal-simulator',
226
				'product_url'       => 'https://www.ideal-checkout.nl/support/ideal-simulator',
227
				'acquirer_url'      => 'https://www.ideal-checkout.nl/simulator/',
228
				'acquirer_test_url' => null,
229
				'certificates'      => array(),
230
			)
231
		);
232
233
		// ING - iDEAL Basic.
234
		$gateways[] = new \Pronamic\WordPress\Pay\Gateways\IDealBasic\Integration(
235
			array(
236
				'id'                => 'ing-ideal-basic',
237
				'name'              => 'ING - iDEAL Basic',
238
				'provider'          => 'ing',
239
				'product_url'       => 'https://www.ing.nl/zakelijk/betalen/geld-ontvangen/ideal/',
240
				'manual_url'        => __( 'https://www.pronamic.eu/support/how-to-connect-ing-ideal-basic-with-wordpress-via-pronamic-pay/', 'pronamic_ideal' ),
241
				'dashboard_url'     => array(
242
					'test' => 'https://idealtest.secure-ing.com/',
243
					'live' => 'https://ideal.secure-ing.com/',
244
				),
245
				'acquirer_url'      => 'https://ideal.secure-ing.com/ideal/mpiPayInitIng.do',
246
				'acquirer_test_url' => 'https://idealtest.secure-ing.com/ideal/mpiPayInitIng.do',
247
			)
248
		);
249
250
		// ING - iDEAL Advanced (v3).
251
		$gateways[] = new \Pronamic\WordPress\Pay\Gateways\IDealAdvancedV3\Integration(
252
			array(
253
				'id'                => 'ing-ideal-advanced-v3',
254
				'name'              => 'ING - iDEAL Advanced (v3)',
255
				'provider'          => 'ing',
256
				'product_url'       => 'https://www.ing.nl/zakelijk/betalen/geld-ontvangen/ideal/',
257
				'manual_url'        => __( 'https://www.pronamic.eu/support/how-to-connect-ing-ideal-advanced-v3-with-wordpress-via-pronamic-pay/', 'pronamic_ideal' ),
258
				'dashboard_url'     => array(
259
					'test' => 'https://idealtest.secure-ing.com/',
260
					'live' => 'https://ideal.secure-ing.com/',
261
				),
262
				'acquirer_url'      => 'https://ideal.secure-ing.com/ideal/iDEALv3',
263
				'acquirer_test_url' => 'https://idealtest.secure-ing.com/ideal/iDEALv3',
264
				'certificates'      => array(),
265
			)
266
		);
267
268
		// ING - Kassa Compleet.
269
		$gateways[] = new \Pronamic\WordPress\Pay\Gateways\ING\KassaCompleet\Integration();
270
271
		// Mollie.
272
		$gateways[] = new \Pronamic\WordPress\Pay\Gateways\Mollie\Integration(
273
			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

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