Failed Conditions
Push — develop ( 08618a...c8f6de )
by Reüel
04:09
created

DirectDebitSofortGateway   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 12
dl 0
loc 33
ccs 0
cts 14
cp 0
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A get_alias() 0 2 1
A __construct() 0 12 1
1
<?php
2
/**
3
 * Direct Debit mandate via Sofort gateway
4
 *
5
 * @author    Pronamic <[email protected]>
6
 * @copyright 2005-2019 Pronamic
7
 * @license   GPL-3.0-or-later
8
 * @package   Pronamic\WordPress\Pay\Extensions\MemberPress
9
 */
10
11
namespace Pronamic\WordPress\Pay\Extensions\MemberPress\Gateways;
12
13
use Pronamic\WordPress\Pay\Core\PaymentMethods;
14
use Pronamic\WordPress\Pay\Plugin;
15
16
/**
17
 * WordPress pay MemberPress Direct Debit mandate via Sofort gateway
18
 *
19
 * @author  Reüel van der Steege
20
 * @version 2.0.1
21
 * @since   1.0.6
22
 */
23
class DirectDebitSofortGateway extends Gateway {
24
	/**
25
	 * Payment method.
26
	 *
27
	 * @var string
28
	 */
29
	protected $payment_method = PaymentMethods::DIRECT_DEBIT_SOFORT;
30
31
	/**
32
	 * Constructs and initialize credit card gateway.
33
	 */
34
	public function __construct() {
35
		parent::__construct();
36
37
		// Capabilities.
38
		$this->capabilities = array(
39
			'process-payments',
40
			'create-subscriptions',
41
			'cancel-subscriptions',
42
			'update-subscriptions',
43
			'suspend-subscriptions',
44
			'resume-subscriptions',
45
			'subscription-trial-payment',
46
		);
47
	}
48
49
	/**
50
	 * Get alias class name of this gateway.
51
	 *
52
	 * @return string
53
	 */
54
	public function get_alias() {
55
		return 'MeprDirectDebitSofortGateway';
56
	}
57
}
58