Plugin Directory

Changeset 3091915


Ignore:
Timestamp:
05/24/2024 07:06:17 AM (23 months ago)
Author:
payeye
Message:

New release

Location:
e-payeye-payments/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • e-payeye-payments/trunk/readme.txt

    r3084111 r3091915  
    66Tested up to: 6.3
    77Requires PHP: 7.2
    8 Stable tag: 1.0.1
     8Stable tag: 1.0.2
    99License: GPLv3 or later
    1010License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    2020* Submit a form to create merchant account: https://payeye.com/business-e-commerce#ecommerce-form
    2121* 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.
    2226
    2327== Changelog ==
  • e-payeye-payments/trunk/src/Gateway/PayEyeGateway.php

    r3071758 r3091915  
    462462    {
    463463        $data = $this->get_post_data();
    464 
    465464        if (!empty($data['woocommerce_payeye_environment'])) {
    466             $this->setPluginEnvironment($data['woocommerce_payeye_environment']);
     465            $this->setPluginEnvironment(strtoupper($data['woocommerce_payeye_environment']));
    467466        }
    468467
     
    731730            update_option(App::CONFIG_PATH_OPTION_NAME, $newEnvConfig->getConfigPath());
    732731            $this->update_option(GatewayOptionNames::PLUGIN_ENVIRONMENT, $newEnv);
     732            $this->update_option('environment', $newEnv);
    733733        } catch (\RuntimeException $exception) {
    734734            WordpressAdminNotices::displayError(
     
    744744    public function isTestingEnvironment(): bool
    745745    {
    746         return $this->getPluginEnvironment() !== PluginEnvironments::PLUGIN_ENV_PRODUCTION;
     746        return $this->getCurrentPluginEnvironmentConfig()->getName() !== PluginEnvironments::PLUGIN_ENV_PRODUCTION;
    747747    }
    748748}
  • e-payeye-payments/trunk/src/Hooks/Wordpress/WordpressAjaxReturnStatus.php

    r2926560 r3091915  
    55namespace PayEye\Hooks\Wordpress;
    66
    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;
    197use PayEye\Repository\Returns\ReturnProductRepository;
    208use PayEye\Repository\Returns\ReturnRepository;
    219use PayEye\Shared\Enums\AjaxActionType;
    22 use PayEye\Shared\Logger;
    2310use PayEye\Shared\RegisterHookInterface;
    2411
  • e-payeye-payments/trunk/src/Shared/Helpers/PluginEnvironmentHelper.php

    r3071784 r3091915  
    1414class PluginEnvironmentHelper
    1515{
    16 
     16    public const DEFAULT_ENVIRONMENT_NAME = 'PRODUCTION';
    1717    /** @var array */
    1818    protected $configs = [];
     
    9797        $envName = strtoupper($envName);
    9898        if (!array_key_exists($envName, $this->configs)) {
    99             throw new RuntimeException("Config does not exits: $envName");
     99            $envName = static::DEFAULT_ENVIRONMENT_NAME;
    100100        }
    101101        return $this->configs[$envName];
  • e-payeye-payments/trunk/src/Shared/PluginSetup.php

    r3071784 r3091915  
    4747    public function setCurrentPluginEnvironment(string $environment): self
    4848    {
    49         $this->currentEnvironment = $environment;
     49        $this->currentEnvironment = strtoupper($environment);
    5050        return $this;
    5151    }
Note: See TracChangeset for help on using the changeset viewer.