Skip to content

Commit

Permalink
Extend from AbstractGatewayIntegration class.
Browse files Browse the repository at this point in the history
  • Loading branch information
remcotolsma committed Feb 10, 2020
1 parent 9a75d9b commit 66dbff2
Showing 1 changed file with 11 additions and 19 deletions.
30 changes: 11 additions & 19 deletions src/Integration.php
Expand Up @@ -2,7 +2,7 @@

namespace Pronamic\WordPress\Pay\Gateways\IDealAdvancedV3;

use Pronamic\WordPress\Pay\Gateways\IDeal\AbstractIntegration;
use Pronamic\WordPress\Pay\AbstractGatewayIntegration;

/**
* Title: iDEAL Advanced v3 integration
Expand All @@ -14,45 +14,37 @@
* @version 2.0.5
* @since 2.0.0
*/
class Integration extends AbstractIntegration {
class Integration extends AbstractGatewayIntegration {
/**
* Settings constructor.
* Construct iDEAL Advanced v3 integration.
*
* @param array $args Arguments.
*/
public function __construct( $args = array() ) {
$args = wp_parse_args(
$args,
array(
'id' => 'ideal-advanced-v3',
'name' => 'iDEAL Advanced v3',
'url' => __( 'https://www.ideal.nl/en/', 'pronamic_ideal' ),
'product_url' => __( 'https://www.ideal.nl/en/', 'pronamic_ideal' ),
'url' => \__( 'https://www.ideal.nl/en/', 'pronamic_ideal' ),
'product_url' => \__( 'https://www.ideal.nl/en/', 'pronamic_ideal' ),
'manual_url' => null,
'dashboard_url' => null,
'provider' => null,
'aquirer_url' => null,
'aquirer_test_url' => null,
'supports' => array(
'payment_status_request',
),
)
);

parent::__construct( $args );

$this->id = $args['id'];
$this->name = $args['name'];
$this->url = $args['url'];
$this->product_url = $args['product_url'];
$this->dashboard_url = $args['dashboard_url'];
$this->provider = $args['provider'];

// Acquirer URL.
$this->aquirer_url = $args['aquirer_url'];
$this->aquirer_test_url = $args['aquirer_test_url'];

$this->set_manual_url( $args['manual_url'] );

// Supported features.
$this->supports = array(
'payment_status_request',
);

// Actions.
add_action( 'current_screen', array( $this, 'maybe_download_private_certificate' ) );
add_action( 'current_screen', array( $this, 'maybe_download_private_key' ) );
Expand Down

0 comments on commit 66dbff2

Please sign in to comment.