Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PIPRES-353: Header stamp and indexation #21

Merged
merged 8 commits into from
Nov 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
15 changes: 15 additions & 0 deletions .htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Apache 2.2
<IfModule !mod_authz_core.c>
Order deny,allow
Deny from all
<Files ~ "(?i)^.*\.(jpg|jpeg|gif|png|bmp|tiff|svg|pdf|mov|mpeg|mp4|avi|mpg|wma|flv|webm|ico|webp|woff|woff2|ttf|eot|otf|css|js)$">
Allow from all
</Files>
</IfModule>
# Apache 2.4
<IfModule mod_authz_core.c>
Require all denied
<Files ~ "(?i)^.*\.(jpg|jpeg|gif|png|bmp|tiff|svg|pdf|mov|mpeg|mp4|avi|mpg|wma|flv|webm|ico|webp|woff|woff2|ttf|eot|otf|css|js)$">
Require all granted
</Files>
</IfModule>
3 changes: 2 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
# Changelog #

## Changes in release 5.4.3 ##
+ Enabled PrestaShop CloudSync
+ New payment method: Billie.
+ Enabled PrestaShop CloudSync.
+ Migrated dependency injection service from Symfony to League container.
+ Overall improvements and bug fixes.

Expand Down
88 changes: 44 additions & 44 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,47 +1,47 @@
{
"name": "mollie/prestashop",
"license": "AFL-3.0",
"description": "Mollie module for PrestaShop",
"require": {
"ext-curl": "*",
"ext-json": "*",
"ext-simplexml": "*",
"prestashop/decimal": "^1.3",
"mollie/mollie-api-php": "v2.42.1",
"segmentio/analytics-php": "^1.5",
"sentry/sentry": "^1.11.0",
"vlucas/phpdotenv": "3.4",
"prestashop/autoindex": "^1.0",
"league/container": "2.5.0",
"prestashop/prestashop-accounts-installer": "^1.0.4",
"prestashop/module-lib-service-container": "v2.0"
},
"require-dev": {
"roave/security-advisories": "dev-latest",
"prestashop/php-dev-tools": "*",
"phpunit/phpunit": "6.5.14"
},
"autoload-dev": {
"psr-4": {
"Mollie\\Tests\\": "tests/"
}
},
"autoload": {
"psr-4": {
"Mollie\\": "src/"
"name": "mollie/prestashop",
"license": "AFL-3.0",
"description": "Mollie module for PrestaShop",
"require": {
"ext-curl": "*",
"ext-json": "*",
"ext-simplexml": "*",
"prestashop/decimal": "^1.3",
"mollie/mollie-api-php": "v2.42.1",
"segmentio/analytics-php": "^1.5",
"sentry/sentry": "^1.11.0",
"vlucas/phpdotenv": "3.4",
"prestashop/autoindex": "^1.0",
"league/container": "2.5.0",
"prestashop/prestashop-accounts-installer": "^1.0.4",
"prestashop/module-lib-service-container": "v2.0"
},
"classmap": [
"mollie.php",
"controllers/",
"src/"
]
},
"config": {
"platform": {
"php": "7.0.8"
"require-dev": {
"roave/security-advisories": "dev-latest",
"prestashop/php-dev-tools": "*",
"phpunit/phpunit": "6.5.14"
},
"prepend-autoloader": false
},
"type": "prestashop-module",
"author": "PrestaShop"
}
"autoload-dev": {
"psr-4": {
"Mollie\\Tests\\": "tests/"
}
},
"autoload": {
"psr-4": {
"Mollie\\": "src/"
},
"classmap": [
"mollie.php",
"controllers/",
"src/"
]
},
"config": {
"platform": {
"php": "7.0.8"
},
"prepend-autoloader": false
},
"type": "prestashop-module",
"author": "PrestaShop"
}
20 changes: 20 additions & 0 deletions config/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php
/**
* Mollie https://www.mollie.nl
*
* @author Mollie B.V. <[email protected]>
* @copyright Mollie B.V.
* @license https://github.com/mollie/PrestaShop/blob/master/LICENSE.md
*
* @see https://github.com/mollie/PrestaShop
* @codingStandardsIgnoreStart
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');

header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');

header('Location: ../');
exit;
4 changes: 4 additions & 0 deletions controllers/admin/AdminMollieAjaxController.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
use Mollie\Utility\NumberUtility;
use Mollie\Utility\TimeUtility;

if (!defined('_PS_VERSION_')) {
exit;
}

class AdminMollieAjaxController extends ModuleAdminController
{
/** @var Mollie */
Expand Down
10 changes: 7 additions & 3 deletions controllers/admin/AdminMollieModuleController.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
<?php

use Mollie\Bootstrap\ModuleTabs;

/**
* Mollie https://www.mollie.nl
*
Expand All @@ -12,6 +9,13 @@
* @see https://github.com/mollie/PrestaShop
* @codingStandardsIgnoreStart
*/

use Mollie\Bootstrap\ModuleTabs;

if (!defined('_PS_VERSION_')) {
exit;
}

class AdminMollieModuleController extends ModuleAdminController
{
public function init()
Expand Down
14 changes: 14 additions & 0 deletions controllers/admin/AdminMollieSettingsController.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
<?php
/**
* Mollie https://www.mollie.nl
*
* @author Mollie B.V. <[email protected]>
* @copyright Mollie B.V.
* @license https://github.com/mollie/PrestaShop/blob/master/LICENSE.md
*
* @see https://github.com/mollie/PrestaShop
* @codingStandardsIgnoreStart
*/

use Mollie\Adapter\ConfigurationAdapter;
use Mollie\Adapter\ToolsAdapter;
Expand All @@ -17,6 +27,10 @@
use PrestaShop\PsAccountsInstaller\Installer\Facade\PsAccounts;
use PrestaShop\PsAccountsInstaller\Installer\Installer as PsAccountsInstaller;

if (!defined('_PS_VERSION_')) {
exit;
}

class AdminMollieSettingsController extends ModuleAdminController
{
const FILE_NAME = 'AdminMollieSettingsController';
Expand Down
4 changes: 4 additions & 0 deletions controllers/front/ajax.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
use Mollie\Repository\CurrencyRepositoryInterface;
use Mollie\Utility\NumberUtility;

if (!defined('_PS_VERSION_')) {
exit;
}

class MollieAjaxModuleFrontController extends AbstractMollieController
{
const FILE_NAME = 'ajax';
Expand Down
4 changes: 4 additions & 0 deletions controllers/front/applePayDirectAjax.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
use Mollie\Builder\ApplePayDirect\ApplePayProductBuilder;
use Mollie\Utility\OrderRecoverUtility;

if (!defined('_PS_VERSION_')) {
exit;
}

class MollieApplePayDirectAjaxModuleFrontController extends ModuleFrontController
{
/** @var Mollie */
Expand Down
4 changes: 4 additions & 0 deletions controllers/front/bancontactAjax.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
use Mollie\Utility\OrderNumberUtility;
use Mollie\Utility\OrderRecoverUtility;

if (!defined('_PS_VERSION_')) {
exit;
}

class MollieBancontactAjaxModuleFrontController extends ModuleFrontController
{
/** @var Mollie */
Expand Down
4 changes: 4 additions & 0 deletions controllers/front/fail.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@

use PrestaShop\PrestaShop\Adapter\Order\OrderPresenter;

if (!defined('_PS_VERSION_')) {
exit;
}

class MollieFailModuleFrontController extends ModuleFrontController
{
/**
Expand Down
4 changes: 4 additions & 0 deletions controllers/front/payScreen.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
use Mollie\Api\Types\PaymentMethod;
use Mollie\Provider\ProfileIdProviderInterface;

if (!defined('_PS_VERSION_')) {
exit;
}

class MolliePayScreenModuleFrontController extends ModuleFrontController
{
/** @var Mollie */
Expand Down
2 changes: 1 addition & 1 deletion controllers/front/payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
use Mollie\Utility\OrderNumberUtility;

if (!defined('_PS_VERSION_')) {
return;
exit;
}

require_once dirname(__FILE__) . '/../../mollie.php';
Expand Down
4 changes: 4 additions & 0 deletions mollie.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@
use PrestaShop\PrestaShop\Core\Localization\Locale\Repository;
use PrestaShop\PsAccountsInstaller\Installer\Installer as PsAccountsInstaller;

if (!defined('_PS_VERSION_')) {
exit;
}

require_once __DIR__ . '/vendor/autoload.php';

class Mollie extends PaymentModule
Expand Down
4 changes: 4 additions & 0 deletions src/Adapter/API/CurlPSMollieHttpAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
use Mollie\Api\HttpAdapter\MollieHttpAdapterInterface;
use Mollie\Api\MollieApiClient;

if (!defined('_PS_VERSION_')) {
exit;
}

final class CurlPSMollieHttpAdapter implements MollieHttpAdapterInterface
{
/**
Expand Down
4 changes: 4 additions & 0 deletions src/Adapter/ConfigurationAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
use Mollie\Config\Config;
use Shop;

if (!defined('_PS_VERSION_')) {
exit;
}

class ConfigurationAdapter
{
public function get($key, $idShop = null, $idLang = null, $idShopGroup = null)
Expand Down
4 changes: 4 additions & 0 deletions src/Adapter/Context.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@
use Configuration as PrestashopConfiguration;
use Context as PrestaShopContext;

if (!defined('_PS_VERSION_')) {
exit;
}

class Context
{
public function getContext()
Expand Down
14 changes: 14 additions & 0 deletions src/Adapter/Language.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,23 @@
<?php
/**
* Mollie https://www.mollie.nl
*
* @author Mollie B.V. <[email protected]>
* @copyright Mollie B.V.
* @license https://github.com/mollie/PrestaShop/blob/master/LICENSE.md
*
* @see https://github.com/mollie/PrestaShop
* @codingStandardsIgnoreStart
*/

namespace Mollie\Adapter;

use Language as PrestashopLanguage;

if (!defined('_PS_VERSION_')) {
exit;
}

class Language
{
public function getAllLanguages(): array
Expand Down
14 changes: 14 additions & 0 deletions src/Adapter/Tab.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,23 @@
<?php
/**
* Mollie https://www.mollie.nl
*
* @author Mollie B.V. <[email protected]>
* @copyright Mollie B.V.
* @license https://github.com/mollie/PrestaShop/blob/master/LICENSE.md
*
* @see https://github.com/mollie/PrestaShop
* @codingStandardsIgnoreStart
*/

namespace Mollie\Adapter;

use Tab as PrestashopTab;

if (!defined('_PS_VERSION_')) {
exit;
}

class Tab
{
public function initTab(int $idTab = null): PrestashopTab
Expand Down
4 changes: 4 additions & 0 deletions src/Adapter/ToolsAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
use Currency;
use Tools;

if (!defined('_PS_VERSION_')) {
exit;
}

class ToolsAdapter
{
public function strtoupper($str)
Expand Down
4 changes: 4 additions & 0 deletions src/Application/Command/CreateApplePayOrder.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@

use Mollie\DTO\ApplePay\Order;

if (!defined('_PS_VERSION_')) {
exit;
}

final class CreateApplePayOrder
{
/**
Expand Down
4 changes: 4 additions & 0 deletions src/Application/Command/RequestApplePayPaymentSession.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@

namespace Mollie\Application\Command;

if (!defined('_PS_VERSION_')) {
exit;
}

final class RequestApplePayPaymentSession
{
/**
Expand Down
4 changes: 4 additions & 0 deletions src/Application/Command/UpdateApplePayShippingContact.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@

use Mollie\DTO\ApplePay\Product;

if (!defined('_PS_VERSION_')) {
exit;
}

final class UpdateApplePayShippingContact
{
/**
Expand Down
Loading