Failed Conditions
Push — develop ( a7c8c9...652c37 )
by Remco
03:29
created

src/Integration.php (1 issue)

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
	/**
17
	 * Construct and initialize integration.
18
	 */
19
	public function __construct() {
20
		$this->supports = array(
0 ignored issues
show
Bug Best Practice introduced by
The property supports does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
21
			'webhook',
22
		);
23
	}
24
25
	public function get_settings_fields() {
26
		$fields = array();
27
28
		// Hash Key
29
		$fields[] = array(
30
			'section'  => 'general',
31
			'filter'   => FILTER_SANITIZE_STRING,
32
			'meta_key' => '_pronamic_gateway_ideal_hash_key',
33
			'title'    => __( 'Hash Key', 'pronamic_ideal' ),
34
			'type'     => 'text',
35
			'classes'  => array( 'regular-text', 'code' ),
36
			'tooltip'  => __( 'Hash key (also known as: key or secret key) as mentioned in the payment provider dashboard.', 'pronamic_ideal' ),
37
			'methods'  => array( 'ideal-basic' ),
38
		);
39
40
		// XML Notification URL.
41
		$fields[] = array(
42
			'section'  => 'feedback',
43
			'title'    => __( 'XML Notification URL', 'pronamic_ideal' ),
44
			'type'     => 'text',
45
			'classes'  => array( 'regular-text', 'code' ),
46
			'value'    => add_query_arg(
47
				array(
48
					'gateway'          => 'IDealBasic',
49
					'xml_notification' => 'true',
50
				),
51
				site_url( '/' )
52
			),
53
			'methods'  => array( 'ideal-basic' ),
54
			'readonly' => true,
55
			'size'     => 200,
56
			'tooltip'  => __( 'Copy the XML notification URL to the payment provider dashboard to receive automatic transaction status updates.', 'pronamic_ideal' ),
57
		);
58
59
		// Return fields.
60
		return $fields;
61
	}
62
}
63