Test Failed
Push — develop ( e9d4b5...08d3b2 )
by Remco
04:40
created

pronamic-ideal.php (26 issues)

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.6.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
 * 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 => $path ) {
0 ignored issues
show
Overriding WordPress globals is prohibited. Found assignment to $path
Loading history...
38
			if ( ! empty( $GLOBALS['__composer_autoload_files'][ $identifier ] ) ) {
39
				continue;
40
			}
41
42
			require $path;
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 $type => $map ) {
0 ignored issues
show
Overriding WordPress globals is prohibited. Found assignment to $type
Loading history...
Overriding WordPress globals is prohibited. Found assignment to $map
Loading history...
62
			if ( 'psr-4' !== $type ) {
63
				continue;
64
			}
65
66
			foreach ( $map as $prefix => $path ) {
0 ignored issues
show
Overriding WordPress globals is prohibited. Found assignment to $path
Loading history...
67
				$loader->addPsr4( $prefix, dirname( $file ) . '/' . $path, true );
68
			}
69
		}
70
	}
71
}
72
73
/**
74
 * Bootstrap.
75
 */
76
\Pronamic\WordPress\Pay\Plugin::instance(
77
	array(
78
		'file'       => __FILE__,
79
		'version'    => '5.6.2',
80
		'gateways'   => array(
81
			// ABN AMRO - iDEAL Zelfbouw (v3).
82
			new \Pronamic\WordPress\Pay\Gateways\IDealAdvancedV3\Integration(
83
				array(
0 ignored issues
show
The call to Pronamic\WordPress\Pay\G...egration::__construct() has too many arguments starting with array('id' => 'abnamro-i...rtificates' => array()). ( Ignorable by Annotation )

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

83
			/** @scrutinizer ignore-call */ 
84
   new \Pronamic\WordPress\Pay\Gateways\IDealAdvancedV3\Integration(

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.

Loading history...
84
					'id'               => 'abnamro-ideal-zelfbouw-v3',
85
					'name'             => 'ABN AMRO - iDEAL Zelfbouw (v3)',
86
					'provider'         => 'abnamro',
87
					'url'              => 'https://abnamro.ideal-payment.de/',
88
					'product_url'      => 'https://www.abnamro.nl/nl/zakelijk/betalen/online-betalen/betaaloplossing/',
89
					'dashboard_url'    => array(
90
						'test' => 'https://abnamro-test.ideal-payment.de/',
91
						'live' => 'https://abnamro.ideal-payment.de/',
92
					),
93
					'aquirer_url'      => 'https://abnamro.ideal-payment.de/ideal/iDEALv3',
94
					'aquirer_test_url' => 'https://abnamro-test.ideal-payment.de/ideal/iDEALv3',
95
					'certificates'     => array(),
96
				)
97
			),
98
			// Buckaroo.
99
			new \Pronamic\WordPress\Pay\Gateways\Buckaroo\Integration(),
100
			// Deutsche Bank - iDEAL via Ogone.
101
			new \Pronamic\WordPress\Pay\Gateways\Ingenico\OrderStandardEasy\Integration(
102
				array(
0 ignored issues
show
The call to Pronamic\WordPress\Pay\G...egration::__construct() has too many arguments starting with array('id' => 'deutscheb...nt_betalen_ideal.html'). ( Ignorable by Annotation )

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

102
			/** @scrutinizer ignore-call */ 
103
   new \Pronamic\WordPress\Pay\Gateways\Ingenico\OrderStandardEasy\Integration(

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.

Loading history...
103
					'id'          => 'deutschebank-ideal-via-ogone',
104
					'name'        => 'Deutsche Bank - iDEAL via Ogone',
105
					'provider'    => 'deutschebank',
106
					'product_url' => 'https://www.deutschebank.nl/nl/content/producten_en_services_commercial_banking_cash_management_betalen_ideal.html',
107
				)
108
			),
109
			// Deutsche Bank - iDEAL Expert (v3).
110
			new \Pronamic\WordPress\Pay\Gateways\IDealAdvancedV3\Integration(
111
				array(
112
					'id'            => 'deutschebank-ideal-expert-v3',
0 ignored issues
show
Array double arrow not aligned correctly; expected 15 space(s) between "'id'" and double arrow, but found 12.
Loading history...
113
					'name'          => 'Deutsche Bank - iDEAL Expert (v3)',
0 ignored issues
show
Array double arrow not aligned correctly; expected 13 space(s) between "'name'" and double arrow, but found 10.
Loading history...
114
					'provider'      => 'deutschebank',
0 ignored issues
show
Array double arrow not aligned correctly; expected 9 space(s) between "'provider'" and double arrow, but found 6.
Loading history...
115
					'product_url'   => 'https://www.deutschebank.nl/nl/content/producten_en_services_commercial_banking_cash_management_betalen_ideal.html',
0 ignored issues
show
Array double arrow not aligned correctly; expected 6 space(s) between "'product_url'" and double arrow, but found 3.
Loading history...
116
					'dashboard_url' => array(
0 ignored issues
show
Array double arrow not aligned correctly; expected 4 space(s) between "'dashboard_url'" and double arrow, but found 1.
Loading history...
117
						'test' => 'https://myideal.test.db.com/',
118
						'live' => 'https://myideal.db.com/',
119
					),
120
					'aquirer_url'      => 'https://myideal.db.com/ideal/iDealv3',
121
					'aquirer_test_url' => null,
122
					'certificates'     => array(),
123
				)
124
			),
125
			// EMS - eCommerce.
126
			new \Pronamic\WordPress\Pay\Gateways\EMS\ECommerce\Integration(),
127
			// Fibonacci ORANGE.
128
			new \Pronamic\WordPress\Pay\Gateways\Icepay\Integration(
129
				array(
0 ignored issues
show
The call to Pronamic\WordPress\Pay\G...egration::__construct() has too many arguments starting with array('id' => 'fibonacci...w.fibonacciorange.nl/'). ( Ignorable by Annotation )

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

129
			/** @scrutinizer ignore-call */ 
130
   new \Pronamic\WordPress\Pay\Gateways\Icepay\Integration(

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.

Loading history...
130
					'id'          => 'fibonacciorange',
131
					'name'        => 'Fibonacci ORANGE',
132
					'provider'    => 'fibonacciorange',
133
					'product_url' => 'http://www.fibonacciorange.nl/',
134
				)
135
			),
136
			// ICEPAY.
137
			new \Pronamic\WordPress\Pay\Gateways\Icepay\Integration(),
138
			// iDEAL Simulator - iDEAL Professional / Advanced / Zelfbouw (v3).
139
			new \Pronamic\WordPress\Pay\Gateways\IDealAdvancedV3\Integration(
140
				array(
141
					'id'               => 'ideal-simulator-ideal-advanced-v3',
142
					'name'             => 'iDEAL Simulator - iDEAL Professional / Advanced',
143
					'provider'         => 'ideal-simulator',
144
					'product_url'      => 'https://www.ideal-checkout.nl/support/ideal-simulator',
145
					'aquirer_url'      => 'https://www.ideal-checkout.nl/simulator/',
146
					'aquirer_test_url' => null,
147
					'certificates'     => array(),
148
				)
149
			),
150
			// ING - iDEAL Basic.
151
			new \Pronamic\WordPress\Pay\Gateways\IDealBasic\Integration(
152
				array(
0 ignored issues
show
The call to Pronamic\WordPress\Pay\G...egration::__construct() has too many arguments starting with array('id' => 'ing-ideal...deal/mpiPayInitIng.do'). ( Ignorable by Annotation )

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

152
			/** @scrutinizer ignore-call */ 
153
   new \Pronamic\WordPress\Pay\Gateways\IDealBasic\Integration(

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.

Loading history...
153
					'id'            => 'ing-ideal-basic',
0 ignored issues
show
Array double arrow not aligned correctly; expected 15 space(s) between "'id'" and double arrow, but found 12.
Loading history...
154
					'name'          => 'ING - iDEAL Basic',					
0 ignored issues
show
Array double arrow not aligned correctly; expected 13 space(s) between "'name'" and double arrow, but found 10.
Loading history...
Expected 1 space between comma and "'provider'"; 17 found
Loading history...
Spaces must be used for mid-line alignment; tabs are not allowed
Loading history...
155
					'provider'      => 'ing',
0 ignored issues
show
Array double arrow not aligned correctly; expected 9 space(s) between "'provider'" and double arrow, but found 6.
Loading history...
156
					'product_url'   => 'https://www.ing.nl/zakelijk/betalen/geld-ontvangen/ideal/',
0 ignored issues
show
Array double arrow not aligned correctly; expected 6 space(s) between "'product_url'" and double arrow, but found 3.
Loading history...
157
					'dashboard_url' => array(
0 ignored issues
show
Array double arrow not aligned correctly; expected 4 space(s) between "'dashboard_url'" and double arrow, but found 1.
Loading history...
158
						'test' => 'https://idealtest.secure-ing.com/',
159
						'live' => 'https://ideal.secure-ing.com/',
160
					),
161
					'aquirer_url'      => 'https://ideal.secure-ing.com/ideal/mpiPayInitIng.do',
162
					'aquirer_test_url' => 'https://idealtest.secure-ing.com/ideal/mpiPayInitIng.do',
163
				)
164
			),
165
			// ING - iDEAL Advanced (v3).
166
			new \Pronamic\WordPress\Pay\Gateways\IDealAdvancedV3\Integration(
167
				array(
168
					'id'            => 'ing-ideal-advanced-v3',
0 ignored issues
show
Array double arrow not aligned correctly; expected 15 space(s) between "'id'" and double arrow, but found 12.
Loading history...
169
					'name'          => 'ING - iDEAL Advanced (v3)',
0 ignored issues
show
Array double arrow not aligned correctly; expected 13 space(s) between "'name'" and double arrow, but found 10.
Loading history...
170
					'provider'      => 'ing',
0 ignored issues
show
Array double arrow not aligned correctly; expected 9 space(s) between "'provider'" and double arrow, but found 6.
Loading history...
171
					'product_url'   => 'https://www.ing.nl/zakelijk/betalen/geld-ontvangen/ideal/',
0 ignored issues
show
Array double arrow not aligned correctly; expected 6 space(s) between "'product_url'" and double arrow, but found 3.
Loading history...
172
					'dashboard_url' => array(
0 ignored issues
show
Array double arrow not aligned correctly; expected 4 space(s) between "'dashboard_url'" and double arrow, but found 1.
Loading history...
173
						'test' => 'https://idealtest.secure-ing.com/',
174
						'live' => 'https://ideal.secure-ing.com/',
175
					),
176
					'aquirer_url'      => 'https://ideal.secure-ing.com/ideal/iDEALv3',
177
					'aquirer_test_url' => 'https://idealtest.secure-ing.com/ideal/iDEALv3',
178
					'certificates'     => array(),
179
				)
180
			),
181
			// ING - Kassa Compleet.
182
			new \Pronamic\WordPress\Pay\Gateways\ING\KassaCompleet\Integration(),
183
			// Mollie.
184
			new \Pronamic\WordPress\Pay\Gateways\Mollie\Integration(),
185
			// Mollie - iDEAL.
186
			new \Pronamic\WordPress\Pay\Gateways\MollieIDeal\Integration(),
187
			// Mollie - iDEAL Basic.
188
			new \Pronamic\WordPress\Pay\Gateways\IDealBasic\Integration(
189
				array(
190
					'id'               => 'mollie-ideal-basic',
191
					'name'             => 'Mollie - iDEAL Basic',
192
					'provider'         => 'mollie',
193
					'dashboard_url'    => 'http://www.mollie.nl/beheer/',
194
					'deprecated'       => true,
195
					'aquirer_url'      => 'https://secure.mollie.nl/xml/idealAcquirer/lite/',
196
					'aquirer_test_url' => 'https://secure.mollie.nl/xml/idealAcquirer/testmode/lite/',
197
				)
198
			),
199
			// MultiSafePay - Connect.
200
			new \Pronamic\WordPress\Pay\Gateways\MultiSafepay\Integration(),
0 ignored issues
show
The type Pronamic\WordPress\Pay\G...ultiSafepay\Integration was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
201
			// Nocks.
202
			new \Pronamic\WordPress\Pay\Gateways\Nocks\Integration(),
203
			// Ingenico - DirectLink.
204
			new \Pronamic\WordPress\Pay\Gateways\Ingenico\DirectLink\Integration(),
205
			// Ingenico - OrderStandard.
206
			new \Pronamic\WordPress\Pay\Gateways\Ingenico\OrderStandard\Integration(),
207
			// Rabobank - OmniKassa.
208
			new \Pronamic\WordPress\Pay\Gateways\OmniKassa\Integration(),
209
			// Rabobank - OmniKassa 2.0.
210
			new \Pronamic\WordPress\Pay\Gateways\OmniKassa2\Integration(),
211
			// Pay.nl.
212
			new \Pronamic\WordPress\Pay\Gateways\PayNL\Integration(),
213
			// Rabobank - iDEAL Professional (v3).
214
			new \Pronamic\WordPress\Pay\Gateways\IDealAdvancedV3\Integration(
215
				array(
216
					'id'               => 'rabobank-ideal-professional-v3',
217
					'name'             => 'Rabobank - iDEAL Professional (v3)',
218
					'provider'         => 'rabobank',
219
					'product_url'      => 'https://www.rabobank.nl/bedrijven/betalen/geld-ontvangen/ideal-professional/',
220
					'dashboard_url'    => array(
221
						'test' => 'https://idealtest.rabobank.nl/',
222
						'live' => 'https://ideal.rabobank.nl/',
223
					),
224
					'aquirer_url'      => 'https://ideal.rabobank.nl/ideal/iDEALv3',
225
					'aquirer_test_url' => 'https://idealtest.rabobank.nl/ideal/iDEALv3',
226
					'certificates'     => array(),
227
				)
228
			),
229
			// Sisow.
230
			new \Pronamic\WordPress\Pay\Gateways\Sisow\Integration(),
231
			// Sisow - iDEAL Basic.
232
			new \Pronamic\WordPress\Pay\Gateways\IDealBasic\Integration(
233
				array(
234
					'id'               => 'sisow-ideal-basic',
235
					'name'             => 'Sisow - iDEAL Basic',
236
					'provider'         => 'sisow',
237
					'url'              => 'https://www.sisow.nl/',
238
					'dashboard_url'    => 'https://www.sisow.nl/Sisow/iDeal/Login.aspx',
239
					'deprecated'       => true,
240
					'aquirer_url'      => 'https://www.sisow.nl/Sisow/iDeal/IssuerHandler.ashx',
241
					'aquirer_test_url' => 'https://www.sisow.nl/Sisow/iDeal/IssuerHandler.ashx/test',
242
				)
243
			),
244
			// TargetPay.
245
			new \Pronamic\WordPress\Pay\Gateways\TargetPay\Integration(),
246
		),
247
		'extensions' => array(
248
			'\Pronamic\WordPress\Pay\Extensions\Charitable\Extension::bootstrap',
249
			'\Pronamic\WordPress\Pay\Extensions\Give\Extension::bootstrap',
250
			'\Pronamic\WordPress\Pay\Extensions\WooCommerce\Extension::bootstrap',
251
			'\Pronamic\WordPress\Pay\Extensions\GravityForms\Extension::bootstrap',
252
			'\Pronamic\WordPress\Pay\Extensions\Shopp\Extension::bootstrap',
253
			'\Pronamic\WordPress\Pay\Extensions\Jigoshop\Extension::bootstrap',
254
			'\Pronamic\WordPress\Pay\Extensions\WPeCommerce\Extension::bootstrap',
255
			'\Pronamic\WordPress\Pay\Extensions\ClassiPress\Extension::bootstrap',
256
			'\Pronamic\WordPress\Pay\Extensions\EventEspressoLegacy\Extension::bootstrap',
257
			'\Pronamic\WordPress\Pay\Extensions\EventEspresso\Extension::bootstrap',
258
			'\Pronamic\WordPress\Pay\Extensions\AppThemes\Extension::bootstrap',
259
			'\Pronamic\WordPress\Pay\Extensions\S2Member\Extension::bootstrap',
260
			'\Pronamic\WordPress\Pay\Extensions\Membership\Extension::bootstrap',
261
			'\Pronamic\WordPress\Pay\Extensions\EasyDigitalDownloads\Extension::bootstrap',
262
			'\Pronamic\WordPress\Pay\Extensions\IThemesExchange\Extension::bootstrap',
263
			'\Pronamic\WordPress\Pay\Extensions\MemberPress\Extension::bootstrap',
264
			'\Pronamic\WordPress\Pay\Extensions\FormidableForms\Extension::bootstrap',
265
			'\Pronamic\WordPress\Pay\Extensions\RestrictContentPro\Extension::bootstrap',
266
			'\Pronamic\WordPress\Pay\Extensions\NinjaForms\Extension::bootstrap',
267
		),
268
	)
269
);
270
271
/**
272
 * Backward compatibility.
273
 */
274
global $pronamic_ideal;
275
276
$pronamic_ideal = pronamic_pay_plugin();
277