AbstractIntegration   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 3
Bugs 0 Features 0
Metric Value
eloc 18
c 3
b 0
f 0
dl 0
loc 26
ccs 0
cts 21
cp 0
rs 10
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 25 2
1
<?php
2
3
namespace Pronamic\WordPress\Pay\Gateways\Ingenico;
4
5
use Pronamic\WordPress\Pay\AbstractGatewayIntegration;
6
7
abstract class AbstractIntegration extends AbstractGatewayIntegration {
8
	public function __construct( $args = array() ) {
9
		$args = wp_parse_args(
10
			$args,
11
			array(
12
				'id'            => null,
13
				'name'          => null,
14
				'url'           => 'https://secure.ogone.com/',
15
				'product_url'   => \__( 'https://payment-services.ingenico.com/nl/en', 'pronamic_ideal' ),
16
				'manual_url'    => \__( 'https://www.pronamic.eu/support/how-to-connect-ingenico-with-wordpress-via-pronamic-pay/', 'pronamic_ideal' ),
17
				'dashboard_url' => 'https://secure.ogone.com/',
18
				'provider'      => 'ogone',
19
				'supports'      => array(
20
					'webhook',
21
					'webhook_log',
22
				),
23
			)
24
		);
25
26
		parent::__construct( $args );
27
28
		// Actions.
29
		$function = array( __NAMESPACE__ . '\Listener', 'listen' );
30
31
		if ( ! has_action( 'wp_loaded', $function ) ) {
32
			add_action( 'wp_loaded', $function );
33
		}
34
	}
35
}
36