Failed Conditions
Push — develop ( 13dba3...7405d6 )
by Reüel
03:47
created

Integration::get_config_factory_class()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 2
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php
2
/**
3
 * Integration
4
 *
5
 * @author    Pronamic <[email protected]>
6
 * @copyright 2005-2019 Pronamic
7
 * @license   GPL-3.0-or-later
8
 * @package   Pronamic\WordPress\Pay\Gateways\Adyen
9
 */
10
11
namespace Pronamic\WordPress\Pay\Gateways\Adyen;
12
13
use Pronamic\WordPress\Pay\Gateways\Common\AbstractIntegration;
14
15
/**
16
 * Integration
17
 *
18
 * @author  Remco Tolsma
19
 * @version 1.0.0
20
 * @since   1.0.0
21
 */
22
class Integration extends AbstractIntegration {
23
	/**
24
	 * Integration constructor.
25
	 */
26 1
	public function __construct() {
27 1
		$this->id            = 'adyen';
28 1
		$this->name          = 'Adyen';
29 1
		$this->provider      = 'adyen';
30 1
		$this->url           = 'https://www.adyen.com/';
31 1
		$this->dashboard_url = array(
32 1
			__( 'test', 'pronamic_ideal' ) => 'https://ca-test.adyen.com/ca/ca/login.shtml',
33 1
			__( 'live', 'pronamic_ideal' ) => 'https://ca-live.adyen.com/ca/ca/login.shtml',
34
		);
35
36
		// Notifications.
37 1
		$notifications = new NotificationsController();
38
39 1
		$notifications->setup();
40 1
	}
41
42
	/**
43
	 * Get config factory class.
44
	 *
45
	 * @return string
46
	 */
47 1
	public function get_config_factory_class() {
48 1
		return __NAMESPACE__ . '\ConfigFactory';
49
	}
50
51
	/**
52
	 * Get settings class.
53
	 *
54
	 * @return string
55
	 */
56
	public function get_settings_class() {
57
		return __NAMESPACE__ . '\Settings';
58
	}
59
60
	/**
61
	 * Get required settings for this integration.
62
	 *
63
	 * @link https://github.com/wp-premium/gravityforms/blob/1.9.16/includes/fields/class-gf-field-multiselect.php#L21-L42
64
	 * @since 1.1.6
65
	 * @return array
66
	 */
67
	public function get_settings() {
68
		$settings = parent::get_settings();
69
70
		$settings[] = 'adyen';
71
72
		return $settings;
73
	}
74
}
75