Skip to content

Commit

Permalink
Simplified settings.
Browse files Browse the repository at this point in the history
  • Loading branch information
remcotolsma committed May 29, 2019
1 parent e1e1db9 commit 05d10fa
Show file tree
Hide file tree
Showing 5 changed files with 215 additions and 264 deletions.
16 changes: 3 additions & 13 deletions src/DirectLink/Integration.php
Expand Up @@ -3,6 +3,7 @@
namespace Pronamic\WordPress\Pay\Gateways\Ingenico\DirectLink;

use Pronamic\WordPress\Pay\Gateways\Ingenico\AbstractIntegration;
use Pronamic\WordPress\Pay\Gateways\Ingenico\Settings;

class Integration extends AbstractIntegration {
public function __construct() {
Expand All @@ -16,18 +17,7 @@ public function get_config_factory_class() {
return __NAMESPACE__ . '\ConfigFactory';
}

/**
* Get required settings for this integration.
*
* @link https://github.com/wp-premium/gravityforms/blob/1.9.16/includes/fields/class-gf-field-multiselect.php#L21-L42
* @since 1.1.3
* @return array
*/
public function get_settings() {
$settings = parent::get_settings();

$settings[] = 'ogone_directlink';

return $settings;
public function get_settings_fields() {
return Settings::get_settings_fields( 'directlink' );
}
}
16 changes: 3 additions & 13 deletions src/OrderStandard/Gateway.php
Expand Up @@ -52,7 +52,9 @@ public function __construct( Config $config ) {
$this->set_slug( self::SLUG );

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

// Client.
$this->client = new Client( $this->config->psp_id );
Expand All @@ -68,18 +70,6 @@ public function __construct( Config $config ) {
$this->client->set_hash_algorithm( $config->hash_algorithm );
}
}

/**
* Get supported features.
*
* @return array
*/
public static function get_supported_features() {
return array(
'payment_status_request',
);
}

/**
* Get supported payment methods
*
Expand Down
13 changes: 4 additions & 9 deletions src/OrderStandard/Integration.php
Expand Up @@ -3,6 +3,7 @@
namespace Pronamic\WordPress\Pay\Gateways\Ingenico\OrderStandard;

use Pronamic\WordPress\Pay\Gateways\Ingenico\AbstractIntegration;
use Pronamic\WordPress\Pay\Gateways\Ingenico\Settings;

class Integration extends AbstractIntegration {
public function __construct() {
Expand All @@ -17,17 +18,11 @@ public function get_config_factory_class() {
}

/**
* Get required settings for this integration.
* Get settings fields.
*
* @link https://github.com/wp-premium/gravityforms/blob/1.9.16/includes/fields/class-gf-field-multiselect.php#L21-L42
* @since 1.1.3
* @return array
*/
public function get_settings() {
$settings = parent::get_settings();

$settings[] = 'ogone_orderstandard';

return $settings;
public function get_settings_fields() {
return Settings::get_settings_fields( 'standard' );
}
}
12 changes: 3 additions & 9 deletions src/OrderStandardEasy/Integration.php
Expand Up @@ -17,17 +17,11 @@ public function get_config_factory_class() {
}

/**
* Get required settings for this integration.
* Get settings fields.
*
* @link https://github.com/wp-premium/gravityforms/blob/1.9.16/includes/fields/class-gf-field-multiselect.php#L21-L42
* @since 1.1.3
* @return array
*/
public function get_settings() {
$settings = parent::get_settings();

$settings[] = 'ogone_orderstandard_easy';

return $settings;
public function get_settings_fields() {
return Settings::get_settings_fields( 'easy' );
}
}

0 comments on commit 05d10fa

Please sign in to comment.