| Conditions | 2 |
| Paths | 2 |
| Total Lines | 27 |
| Code Lines | 18 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 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( |
||
|
|
|||
| 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 | } |
||
| 38 |