Changeset 3091915
- Timestamp:
- 05/24/2024 07:06:17 AM (23 months ago)
- Location:
- e-payeye-payments/trunk
- Files:
-
- 5 edited
-
readme.txt (modified) (2 diffs)
-
src/Gateway/PayEyeGateway.php (modified) (3 diffs)
-
src/Hooks/Wordpress/WordpressAjaxReturnStatus.php (modified) (1 diff)
-
src/Shared/Helpers/PluginEnvironmentHelper.php (modified) (2 diffs)
-
src/Shared/PluginSetup.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
e-payeye-payments/trunk/readme.txt
r3084111 r3091915 6 6 Tested up to: 6.3 7 7 Requires PHP: 7.2 8 Stable tag: 1.0. 18 Stable tag: 1.0.2 9 9 License: GPLv3 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 20 20 * Submit a form to create merchant account: https://payeye.com/business-e-commerce#ecommerce-form 21 21 * After you received your configuration keys, follow configuration instructions from: https://static.payeye.com/e-commerce/modules/woocommerce/e-payeye/Instalation_and_update_WooCommerce_0.8.4_EN.pdf 22 23 == Changelog == 24 = 1.0.2 - 2024-05-17 = 25 * Fix for exception for missing config files. 22 26 23 27 == Changelog == -
e-payeye-payments/trunk/src/Gateway/PayEyeGateway.php
r3071758 r3091915 462 462 { 463 463 $data = $this->get_post_data(); 464 465 464 if (!empty($data['woocommerce_payeye_environment'])) { 466 $this->setPluginEnvironment( $data['woocommerce_payeye_environment']);465 $this->setPluginEnvironment(strtoupper($data['woocommerce_payeye_environment'])); 467 466 } 468 467 … … 731 730 update_option(App::CONFIG_PATH_OPTION_NAME, $newEnvConfig->getConfigPath()); 732 731 $this->update_option(GatewayOptionNames::PLUGIN_ENVIRONMENT, $newEnv); 732 $this->update_option('environment', $newEnv); 733 733 } catch (\RuntimeException $exception) { 734 734 WordpressAdminNotices::displayError( … … 744 744 public function isTestingEnvironment(): bool 745 745 { 746 return $this->get PluginEnvironment() !== PluginEnvironments::PLUGIN_ENV_PRODUCTION;746 return $this->getCurrentPluginEnvironmentConfig()->getName() !== PluginEnvironments::PLUGIN_ENV_PRODUCTION; 747 747 } 748 748 } -
e-payeye-payments/trunk/src/Hooks/Wordpress/WordpressAjaxReturnStatus.php
r2926560 r3091915 5 5 namespace PayEye\Hooks\Wordpress; 6 6 7 use PayEye\App;8 use PayEye\Entity\ReturnEntity;9 use PayEye\Lib\Auth\AuthService;10 use PayEye\Lib\Auth\HashService;11 use PayEye\Lib\Enum\ReturnStatus;12 use PayEye\Lib\Enum\SignatureFrom;13 use PayEye\Lib\Enum\TransferStatus;14 use PayEye\Lib\Env\Config;15 use PayEye\Lib\HttpClient\Exception\HttpException;16 use PayEye\Lib\HttpClient\Model\ReturnStatusRequest;17 use PayEye\Lib\HttpClient\PayEyeHttpClient;18 use PayEye\Lib\Tool\JsonHelper;19 7 use PayEye\Repository\Returns\ReturnProductRepository; 20 8 use PayEye\Repository\Returns\ReturnRepository; 21 9 use PayEye\Shared\Enums\AjaxActionType; 22 use PayEye\Shared\Logger;23 10 use PayEye\Shared\RegisterHookInterface; 24 11 -
e-payeye-payments/trunk/src/Shared/Helpers/PluginEnvironmentHelper.php
r3071784 r3091915 14 14 class PluginEnvironmentHelper 15 15 { 16 16 public const DEFAULT_ENVIRONMENT_NAME = 'PRODUCTION'; 17 17 /** @var array */ 18 18 protected $configs = []; … … 97 97 $envName = strtoupper($envName); 98 98 if (!array_key_exists($envName, $this->configs)) { 99 throw new RuntimeException("Config does not exits: $envName");99 $envName = static::DEFAULT_ENVIRONMENT_NAME; 100 100 } 101 101 return $this->configs[$envName]; -
e-payeye-payments/trunk/src/Shared/PluginSetup.php
r3071784 r3091915 47 47 public function setCurrentPluginEnvironment(string $environment): self 48 48 { 49 $this->currentEnvironment = $environment;49 $this->currentEnvironment = strtoupper($environment); 50 50 return $this; 51 51 }
Note: See TracChangeset
for help on using the changeset viewer.