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( $args, array( |
||
10 | 'id' => null, |
||
11 | 'name' => null, |
||
12 | 'url' => 'https://secure.ogone.com/', |
||
13 | 'product_url' => __( 'https://payment-services.ingenico.com/nl/en', 'pronamic_ideal' ), |
||
14 | 'dashboard_url' => 'https://secure.ogone.com/', |
||
15 | 'provider' => 'ogone', |
||
16 | ) ); |
||
17 | |||
18 | $this->id = $args['id']; |
||
19 | $this->name = $args['name']; |
||
20 | $this->url = $args['url']; |
||
21 | $this->product_url = $args['product_url']; |
||
22 | $this->dashboard_url = $args['dashboard_url']; |
||
23 | $this->provider = $args['provider']; |
||
24 | |||
25 | // Supports. |
||
26 | $this->supports = array( |
||
0 ignored issues
–
show
Bug
Best Practice
introduced
by
Loading history...
|
|||
27 | 'webhook', |
||
28 | ); |
||
29 | |||
30 | // Actions. |
||
31 | $function = array( __NAMESPACE__ . '\Listener', 'listen' ); |
||
32 | |||
33 | if ( ! has_action( 'wp_loaded', $function ) ) { |
||
34 | add_action( 'wp_loaded', $function ); |
||
35 | } |
||
36 | } |
||
37 | } |
||
38 |