for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Config factory
*
* @author Pronamic <[email protected]>
* @copyright 2005-2018 Pronamic
* @license GPL-3.0-or-later
* @package Pronamic\WordPress\Pay\Gateways\Adyen
*/
namespace Pronamic\WordPress\Pay\Gateways\Adyen;
use Pronamic\WordPress\Pay\Core\GatewayConfigFactory;
* @author Remco Tolsma
* @version 2.0.0
* @since 2.0.0
class ConfigFactory extends GatewayConfigFactory {
* Get configuration by post ID.
* @param string $post_id Post ID.
* @return Config
public function get_config( $post_id ) {
$config = new Config();
$config->post_id = intval( $post_id );
$config->mode = $this->get_meta( $post_id, 'mode' );
$config->api_key = $this->get_meta( $post_id, 'adyen_api_key' );
$config->merchant_account = $this->get_meta( $post_id, 'adyen_merchant_account' );
return $config;
}