Failed Conditions
Push — develop ( 3acd85...15fe99 )
by Reüel
14:37
created

src/AbstractIntegration.php (1 issue)

1
<?php
2
3
namespace Pronamic\WordPress\Pay\Gateways\Ingenico;
4
5
use Pronamic\WordPress\Pay\Gateways\Common\AbstractIntegration as Common_AbstractIntegration;
6
7
abstract class AbstractIntegration extends Common_AbstractIntegration {
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
				'dashboard_url' => 'https://secure.ogone.com/',
17
				'provider'      => 'ogone',
18
			)
19
		);
20
21
		$this->id            = $args['id'];
22
		$this->name          = $args['name'];
23
		$this->url           = $args['url'];
24
		$this->product_url   = $args['product_url'];
25
		$this->dashboard_url = $args['dashboard_url'];
26
		$this->provider      = $args['provider'];
27
28
		// Supports.
29
		$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...
30
			'webhook',
31
		);
32
33
		// Actions.
34
		$function = array( __NAMESPACE__ . '\Listener', 'listen' );
35
36
		if ( ! has_action( 'wp_loaded', $function ) ) {
37
			add_action( 'wp_loaded', $function );
38
		}
39
	}
40
}
41