| 1 |
<?php |
| 2 |
|
| 3 |
namespace Bookit\Gateways\Contracts; |
| 4 |
|
| 5 |
/** |
| 6 |
* Abstract Settings |
| 7 |
* |
| 8 |
* @since 2.5.0 |
| 9 |
* |
| 10 |
* @package Bookit\Gateways\Contracts |
| 11 |
*/ |
| 12 |
abstract class Abstract_Settings { |
| 13 |
|
| 14 |
/** |
| 15 |
* The option key for the gateway-specific sandbox. |
| 16 |
* |
| 17 |
* @since 2.5.0 |
| 18 |
* |
| 19 |
* @var string |
| 20 |
*/ |
| 21 |
public static $option_sandbox; |
| 22 |
|
| 23 |
/** |
| 24 |
* Get the connection settings in the admin. |
| 25 |
* |
| 26 |
* @since 2.5.0 |
| 27 |
* |
| 28 |
* @return string |
| 29 |
*/ |
| 30 |
abstract function get_connection_settings(); |
| 31 |
|
| 32 |
/** |
| 33 |
* Check if this gateway is currently in test mode. |
| 34 |
* |
| 35 |
* @since 2.5.0 |
| 36 |
* |
| 37 |
* @return bool |
| 38 |
*/ |
| 39 |
public function is_gateway_test_mode() { |
| 40 |
return bookit_is_truthy( get_option( static::$option_sandbox ) ); |
| 41 |
} |
| 42 |
} |
| 43 |
|