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