Failed Conditions
Push — develop ( 7d92e9...a7c8c9 )
by Remco
03:33
created

Integration::get_settings_fields()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 36
Code Lines 25

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 25
nc 1
nop 0
dl 0
loc 36
ccs 0
cts 30
cp 0
crap 2
rs 9.52
c 0
b 0
f 0
1
<?php
2
3
namespace Pronamic\WordPress\Pay\Gateways\IDealBasic;
4
5
/**
6
 * Title: Integration
7
 * Description:
8
 * Copyright: 2005-2019 Pronamic
9
 * Company: Pronamic
10
 *
11
 * @author  Remco Tolsma
12
 * @version 2.0.0
13
 * @since   1.0.0
14
 */
15
class Integration extends AbstractIntegration {
16
	public function get_settings_fields() {
17
		$fields = array();
18
19
		// Hash Key
20
		$fields[] = array(
21
			'section'  => 'general',
22
			'filter'   => FILTER_SANITIZE_STRING,
23
			'meta_key' => '_pronamic_gateway_ideal_hash_key',
24
			'title'    => __( 'Hash Key', 'pronamic_ideal' ),
25
			'type'     => 'text',
26
			'classes'  => array( 'regular-text', 'code' ),
27
			'tooltip'  => __( 'Hash key (also known as: key or secret key) as mentioned in the payment provider dashboard.', 'pronamic_ideal' ),
28
			'methods'  => array( 'ideal-basic' ),
29
		);
30
31
		// XML Notification URL.
32
		$fields[] = array(
33
			'section'  => 'feedback',
34
			'title'    => __( 'XML Notification URL', 'pronamic_ideal' ),
35
			'type'     => 'text',
36
			'classes'  => array( 'regular-text', 'code' ),
37
			'value'    => add_query_arg(
38
				array(
39
					'gateway'          => 'IDealBasic',
40
					'xml_notification' => 'true',
41
				),
42
				site_url( '/' )
43
			),
44
			'methods'  => array( 'ideal-basic' ),
45
			'readonly' => true,
46
			'size'     => 200,
47
			'tooltip'  => __( 'Copy the XML notification URL to the payment provider dashboard to receive automatic transaction status updates.', 'pronamic_ideal' ),
48
		);
49
50
		// Return fields.
51
		return $fields;
52
	}
53
}
54