├── logo.png ├── tests ├── phpstan │ ├── phpstan.neon │ ├── phpstan-1.7.8.x.neon │ └── phpstan-1.7.7.x.neon ├── UI │ ├── package.json │ ├── tsconfig.json │ ├── types │ │ └── global.d.ts │ ├── playwright.config.ts │ ├── docker-compose.yml │ └── campaigns │ │ ├── 02_configuration │ │ └── 01_placeOrderWithIt.spec.ts │ │ └── 01_installation │ │ └── 04_resetModule.spec.ts └── index.php ├── views ├── img │ ├── orderstate │ │ ├── PS_OS_COD_VALIDATION.gif │ │ └── index.php │ └── index.php ├── templates │ ├── hook │ │ ├── paymentOptions-additionalInformation.tpl │ │ ├── index.php │ │ └── displayOrderConfirmation.tpl │ └── index.php └── index.php ├── .gitignore ├── .github ├── workflows │ ├── build-release.yml │ ├── php.yml │ └── ui-test.yml ├── release-drafter.yml ├── dependabot.yml └── PULL_REQUEST_TEMPLATE.md ├── .php_cs.dist ├── config.xml ├── index.php ├── composer.json ├── upgrade ├── index.php ├── upgrade-1.0.7.php └── upgrade-2.0.0.php ├── controllers ├── index.php └── front │ ├── index.php │ └── validation.php ├── translations └── index.php ├── README.md ├── LICENSE.md ├── ps_cashondelivery.php └── composer.lock /logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrestaShop/ps_cashondelivery/HEAD/logo.png -------------------------------------------------------------------------------- /tests/phpstan/phpstan.neon: -------------------------------------------------------------------------------- 1 | parameters: 2 | # Base PHPStan configuration for the module 3 | # This file is included by version-specific configs 4 | -------------------------------------------------------------------------------- /views/img/orderstate/PS_OS_COD_VALIDATION.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrestaShop/ps_cashondelivery/HEAD/views/img/orderstate/PS_OS_COD_VALIDATION.gif -------------------------------------------------------------------------------- /tests/phpstan/phpstan-1.7.8.x.neon: -------------------------------------------------------------------------------- 1 | includes: 2 | - %currentWorkingDirectory%/tests/phpstan/phpstan.neon 3 | 4 | # No specific ignore rules needed for 1.7.8.x 5 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /vendor/ 2 | /config_*.xml 3 | /.php_cs.cache 4 | 5 | ## UI Tests 6 | /tests/UI/.env 7 | /tests/UI/node_modules/ 8 | /tests/UI/report.json 9 | /tests/UI/reports/ 10 | /tests/UI/test-results/ -------------------------------------------------------------------------------- /.github/workflows/build-release.yml: -------------------------------------------------------------------------------- 1 | name: Build 2 | on: [push, pull_request] 3 | 4 | jobs: 5 | build-and-release-draft: 6 | name: Build & Release draft 7 | uses: PrestaShop/.github/.github/workflows/build-release.yml@master 8 | -------------------------------------------------------------------------------- /.php_cs.dist: -------------------------------------------------------------------------------- 1 | setUsingCache(true) 7 | ->getFinder() 8 | ->in(__DIR__) 9 | ->exclude('vendor'); 10 | 11 | return $config; 12 | -------------------------------------------------------------------------------- /.github/release-drafter.yml: -------------------------------------------------------------------------------- 1 | branches: 2 | - master 3 | name-template: v$NEXT_PATCH_VERSION 4 | tag-template: v$NEXT_PATCH_VERSION 5 | categories: 6 | - title: 🚀 Improvements 7 | label: enhancement 8 | - title: 🐛 Bug Fixes 9 | label: bug 10 | change-template: '- #$NUMBER: $TITLE by @$AUTHOR' 11 | template: | 12 | # Changes 13 | 14 | $CHANGES 15 | 16 | -------------------------------------------------------------------------------- /tests/phpstan/phpstan-1.7.7.x.neon: -------------------------------------------------------------------------------- 1 | includes: 2 | - %currentWorkingDirectory%/tests/phpstan/phpstan.neon 3 | 4 | parameters: 5 | ignoreErrors: 6 | - '#Parameter \#9 \$secure_key of method PaymentModuleCore\:\:validateOrder\(\) expects bool, string given.#' 7 | - '#Parameter \#7 \$currency_special of method PaymentModuleCore\:\:validateOrder\(\) expects null, int given.#' 8 | -------------------------------------------------------------------------------- /tests/UI/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ps_cashondelivery_tests_ui", 3 | "version": "1.0.0", 4 | "description": "", 5 | "scripts": {}, 6 | "keywords": [], 7 | "author": "", 8 | "license": "MIT", 9 | "devDependencies": { 10 | "@prestashop-core/ui-testing": "https://github.com/PrestaShop/ui-testing-library#main", 11 | "@types/node": "^25.0.2", 12 | "@types/semver": "^7.7.1", 13 | "typescript": "^5.9.3" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ps_cashondelivery 4 | 5 | 6 | 7 | 8 | 0 9 | 1 10 | 11 | 12 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: composer 4 | directory: "/" 5 | schedule: 6 | interval: daily 7 | time: "04:00" 8 | open-pull-requests-limit: 10 9 | target-branch: dev 10 | - package-ecosystem: npm 11 | directory: "/tests/UI" 12 | schedule: 13 | interval: weekly 14 | day: monday 15 | time: "04:00" 16 | open-pull-requests-limit: 10 17 | target-branch: dev 18 | reviewers: 19 | - "PrestaShop/qa-automation" 20 | labels: 21 | - "dependencies" 22 | - "E2E Tests" 23 | - "TE" 24 | -------------------------------------------------------------------------------- /tests/UI/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "noImplicitAny": true, 4 | "noImplicitThis": true, 5 | "module": "es2022", 6 | "target": "es2017", 7 | "strict": true, 8 | "moduleResolution": "node", 9 | "allowSyntheticDefaultImports": true, 10 | "resolveJsonModule": true, 11 | "esModuleInterop": true, 12 | "allowJs": true, 13 | "downlevelIteration": true, 14 | "baseUrl": "./", 15 | "paths": {}, 16 | "typeRoots": [ 17 | "node_modules/@types" 18 | ], 19 | "skipLibCheck": true, 20 | "noEmit": true 21 | }, 22 | "include": ["types/global.d.ts", "campaigns/**/*"], 23 | "exclude": ["node_modules"] 24 | } -------------------------------------------------------------------------------- /tests/UI/types/global.d.ts: -------------------------------------------------------------------------------- 1 | import type { 2 | GlobalInstall, 3 | GlobalFO, 4 | GlobalBO, 5 | GlobalBrowserConfig, 6 | GlobalPSConfig, 7 | GlobalBrowserErrors, 8 | GlobalScreenshot, 9 | GlobalMaildevConfig, 10 | GlobalKeycloakConfig 11 | } from '@prestashop-core/ui-testing'; 12 | 13 | declare global { 14 | var INSTALL: GlobalInstall; 15 | var URLHasPort: boolean; 16 | var FO: GlobalFO; 17 | var BO: GlobalBO; 18 | var PSConfig: GlobalPSConfig; 19 | var BROWSER: GlobalBrowserConfig; 20 | var GENERATE_FAILED_STEPS: any; 21 | var SCREENSHOT: GlobalScreenshot; 22 | var maildevConfig: GlobalMaildevConfig; 23 | var keycloakConfig: GlobalKeycloakConfig; 24 | var browserErrors: GlobalBrowserErrors; 25 | } 26 | 27 | export {}; -------------------------------------------------------------------------------- /views/templates/hook/paymentOptions-additionalInformation.tpl: -------------------------------------------------------------------------------- 1 | {** 2 | * Copyright since 2007 PrestaShop SA and Contributors 3 | * PrestaShop is an International Registered Trademark & Property of PrestaShop SA 4 | * 5 | * NOTICE OF LICENSE 6 | * 7 | * This source file is subject to the Academic Free License version 3.0 8 | * that is bundled with this package in the file LICENSE.md. 9 | * It is also available through the world-wide-web at this URL: 10 | * https://opensource.org/licenses/AFL-3.0 11 | * If you did not receive a copy of the license and are unable to 12 | * obtain it through the world-wide-web, please send an email 13 | * to license@prestashop.com so we can send you a copy immediately. 14 | * 15 | * @author PrestaShop SA and Contributors 16 | * @copyright Since 2007 PrestaShop SA and Contributors 17 | * @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0 18 | *} 19 | 20 |
21 |

{l s='You pay for the merchandise upon delivery' d='Modules.Cashondelivery.Shop'}

22 |
23 | -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | 17 | * @copyright Since 2007 PrestaShop SA and Contributors 18 | * @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0 19 | */ 20 | header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); 21 | header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); 22 | 23 | header('Cache-Control: no-store, no-cache, must-revalidate'); 24 | header('Cache-Control: post-check=0, pre-check=0', false); 25 | header('Pragma: no-cache'); 26 | 27 | header('Location: ../'); 28 | exit; 29 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "prestashop/ps_cashondelivery", 3 | "description": "PrestaShop module ps_cashondelivery", 4 | "homepage": "https://github.com/PrestaShop/ps_cashondelivery", 5 | "license": "AFL-3.0", 6 | "authors": [ 7 | { 8 | "name": "PrestaShop SA", 9 | "email": "contact@prestashop.com" 10 | } 11 | ], 12 | "require": { 13 | "php": ">=5.6" 14 | }, 15 | "require-dev": { 16 | "prestashop/php-dev-tools": "~3.0" 17 | }, 18 | "config": { 19 | "platform": { 20 | "php": "5.6.0" 21 | }, 22 | "preferred-install": "dist", 23 | "classmap-authoritative": true, 24 | "optimize-autoloader": true, 25 | "prepend-autoloader": false 26 | }, 27 | "autoload": { 28 | "classmap": [ 29 | "ps_cashondelivery.php", 30 | "controllers" 31 | ] 32 | }, 33 | "scripts": { 34 | "set-license-header": [ 35 | "@php ./vendor/bin/header-stamp --license=vendor/prestashop/header-stamp/assets/afl.txt --exclude=.github,node_modules,vendor,tests,_dev" 36 | ] 37 | }, 38 | "type": "prestashop-module", 39 | "author": "PrestaShop" 40 | } -------------------------------------------------------------------------------- /views/index.php: -------------------------------------------------------------------------------- 1 | 17 | * @copyright Since 2007 PrestaShop SA and Contributors 18 | * @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0 19 | */ 20 | header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); 21 | header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); 22 | 23 | header('Cache-Control: no-store, no-cache, must-revalidate'); 24 | header('Cache-Control: post-check=0, pre-check=0', false); 25 | header('Pragma: no-cache'); 26 | 27 | header('Location: ../'); 28 | exit; 29 | -------------------------------------------------------------------------------- /upgrade/index.php: -------------------------------------------------------------------------------- 1 | 17 | * @copyright Since 2007 PrestaShop SA and Contributors 18 | * @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0 19 | */ 20 | header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); 21 | header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); 22 | 23 | header('Cache-Control: no-store, no-cache, must-revalidate'); 24 | header('Cache-Control: post-check=0, pre-check=0', false); 25 | header('Pragma: no-cache'); 26 | 27 | header('Location: ../'); 28 | exit; 29 | -------------------------------------------------------------------------------- /views/img/index.php: -------------------------------------------------------------------------------- 1 | 17 | * @copyright Since 2007 PrestaShop SA and Contributors 18 | * @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0 19 | */ 20 | header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); 21 | header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); 22 | 23 | header('Cache-Control: no-store, no-cache, must-revalidate'); 24 | header('Cache-Control: post-check=0, pre-check=0', false); 25 | header('Pragma: no-cache'); 26 | 27 | header('Location: ../'); 28 | exit; 29 | -------------------------------------------------------------------------------- /controllers/index.php: -------------------------------------------------------------------------------- 1 | 17 | * @copyright Since 2007 PrestaShop SA and Contributors 18 | * @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0 19 | */ 20 | header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); 21 | header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); 22 | 23 | header('Cache-Control: no-store, no-cache, must-revalidate'); 24 | header('Cache-Control: post-check=0, pre-check=0', false); 25 | header('Pragma: no-cache'); 26 | 27 | header('Location: ../'); 28 | exit; 29 | -------------------------------------------------------------------------------- /translations/index.php: -------------------------------------------------------------------------------- 1 | 17 | * @copyright Since 2007 PrestaShop SA and Contributors 18 | * @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0 19 | */ 20 | header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); 21 | header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); 22 | 23 | header('Cache-Control: no-store, no-cache, must-revalidate'); 24 | header('Cache-Control: post-check=0, pre-check=0', false); 25 | header('Pragma: no-cache'); 26 | 27 | header('Location: ../'); 28 | exit; 29 | -------------------------------------------------------------------------------- /views/templates/index.php: -------------------------------------------------------------------------------- 1 | 17 | * @copyright Since 2007 PrestaShop SA and Contributors 18 | * @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0 19 | */ 20 | header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); 21 | header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); 22 | 23 | header('Cache-Control: no-store, no-cache, must-revalidate'); 24 | header('Cache-Control: post-check=0, pre-check=0', false); 25 | header('Pragma: no-cache'); 26 | 27 | header('Location: ../'); 28 | exit; 29 | -------------------------------------------------------------------------------- /controllers/front/index.php: -------------------------------------------------------------------------------- 1 | 17 | * @copyright Since 2007 PrestaShop SA and Contributors 18 | * @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0 19 | */ 20 | header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); 21 | header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); 22 | 23 | header('Cache-Control: no-store, no-cache, must-revalidate'); 24 | header('Cache-Control: post-check=0, pre-check=0', false); 25 | header('Pragma: no-cache'); 26 | 27 | header('Location: ../'); 28 | exit; 29 | -------------------------------------------------------------------------------- /views/img/orderstate/index.php: -------------------------------------------------------------------------------- 1 | 17 | * @copyright Since 2007 PrestaShop SA and Contributors 18 | * @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0 19 | */ 20 | header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); 21 | header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); 22 | 23 | header('Cache-Control: no-store, no-cache, must-revalidate'); 24 | header('Cache-Control: post-check=0, pre-check=0', false); 25 | header('Pragma: no-cache'); 26 | 27 | header('Location: ../'); 28 | exit; 29 | -------------------------------------------------------------------------------- /views/templates/hook/index.php: -------------------------------------------------------------------------------- 1 | 17 | * @copyright Since 2007 PrestaShop SA and Contributors 18 | * @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0 19 | */ 20 | header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); 21 | header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); 22 | 23 | header('Cache-Control: no-store, no-cache, must-revalidate'); 24 | header('Cache-Control: post-check=0, pre-check=0', false); 25 | header('Pragma: no-cache'); 26 | 27 | header('Location: ../'); 28 | exit; 29 | -------------------------------------------------------------------------------- /tests/UI/playwright.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig, devices } from '@playwright/test'; 2 | 3 | /** 4 | * See https://playwright.dev/docs/test-configuration. 5 | */ 6 | export default defineConfig({ 7 | testDir: './', 8 | /* Run tests in files in serial */ 9 | fullyParallel: false, 10 | /* Fail the build on CI if you accidentally left test.only in the source code. */ 11 | forbidOnly: !!process.env.CI, 12 | retries: 0, 13 | workers: 1, 14 | /* Reporter to use. See https://playwright.dev/docs/test-reporters */ 15 | reporter: [ 16 | ['list', { printSteps: true }], 17 | ['json', { outputFile: 'report.json' }], 18 | ['html', { outputFolder: 'reports' }], 19 | ], 20 | /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ 21 | use: { 22 | /* Capture screenshot after each test failure */ 23 | screenshot: 'only-on-failure', 24 | }, 25 | 26 | /* Configure projects for major browsers */ 27 | projects: [ 28 | { 29 | name: 'chromium', 30 | use: { 31 | ...devices['Desktop Chrome'], 32 | contextOptions: { 33 | screen: { 34 | width: 1680, 35 | height: 900 36 | } 37 | }, 38 | }, 39 | }, 40 | ], 41 | }); -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 9 | 10 | | Questions | Answers 11 | | ----------------- | ------------------------------------------------------- 12 | | Description? | Please be specific when describing the PR.
Every detail helps: versions, browser/server configuration, specific module/theme, etc. Feel free to add more information below this table. 13 | | Type? | bug fix / improvement / new feature / refacto / critical 14 | | BC breaks? | yes / no 15 | | Deprecations? | yes / no 16 | | Fixed ticket? | Fixes PrestaShop/Prestashop#{issue number here}. 17 | | How to test? | Please indicate how to best verify that this PR is correct. 18 | | Sponsor company | Your company or customer's name goes here (if applicable). 19 | 20 | 21 | -------------------------------------------------------------------------------- /tests/index.php: -------------------------------------------------------------------------------- 1 | 22 | * @copyright 2007-2015 PrestaShop SA 23 | * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) 24 | * International Registered Trademark & Property of PrestaShop SA 25 | */ 26 | 27 | header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); 28 | header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); 29 | 30 | header('Cache-Control: no-store, no-cache, must-revalidate'); 31 | header('Cache-Control: post-check=0, pre-check=0', false); 32 | header('Pragma: no-cache'); 33 | 34 | header('Location: ../'); 35 | exit; 36 | -------------------------------------------------------------------------------- /upgrade/upgrade-1.0.7.php: -------------------------------------------------------------------------------- 1 | 17 | * @copyright Since 2007 PrestaShop SA and Contributors 18 | * @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0) 19 | */ 20 | 21 | use PrestaShop\PrestaShop\Core\Module\WidgetInterface; 22 | 23 | if (!defined('_PS_VERSION_')) { 24 | exit; 25 | } 26 | 27 | /** 28 | * @param Ps_Cashondelivery $module 29 | * 30 | * @return bool 31 | */ 32 | function upgrade_module_1_0_7($module) 33 | { 34 | $module->unregisterHook('paymentReturn'); 35 | if (method_exists($module, 'hookDisplayPaymentReturn') || $module instanceof WidgetInterface) { 36 | $module->registerHook('displayPaymentReturn'); 37 | } 38 | 39 | return true; 40 | } 41 | -------------------------------------------------------------------------------- /views/templates/hook/displayOrderConfirmation.tpl: -------------------------------------------------------------------------------- 1 | {** 2 | * Copyright since 2007 PrestaShop SA and Contributors 3 | * PrestaShop is an International Registered Trademark & Property of PrestaShop SA 4 | * 5 | * NOTICE OF LICENSE 6 | * 7 | * This source file is subject to the Academic Free License version 3.0 8 | * that is bundled with this package in the file LICENSE.md. 9 | * It is also available through the world-wide-web at this URL: 10 | * https://opensource.org/licenses/AFL-3.0 11 | * If you did not receive a copy of the license and are unable to 12 | * obtain it through the world-wide-web, please send an email 13 | * to license@prestashop.com so we can send you a copy immediately. 14 | * 15 | * @author PrestaShop SA and Contributors 16 | * @copyright Since 2007 PrestaShop SA and Contributors 17 | * @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0 18 | *} 19 | 20 |
21 |

{l s='Your order on %s is complete.' sprintf=[$shop_name] d='Modules.Cashondelivery.Shop'}

22 |

{l s='You have chosen the cash on delivery method.' d='Modules.Cashondelivery.Shop'}

23 |

{l s='Your order will be sent very soon.' d='Modules.Cashondelivery.Shop'}

24 |

{l s='For any questions or for further information, please contact our' d='Modules.Cashondelivery.Shop'} {l s='customer support' d='Modules.Cashondelivery.Shop'}.

25 |
26 | -------------------------------------------------------------------------------- /tests/UI/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3.7' 2 | 3 | services: 4 | prestashop: 5 | image: prestashop/prestashop:${PS_VERSION}-apache 6 | container_name: prestashop 7 | depends_on: 8 | - mysql 9 | environment: 10 | - PS_DEV_MODE=1 11 | - PS_DOMAIN=localhost 12 | - PS_LANGUAGE=en 13 | - PS_COUNTRY=fr 14 | - PS_INSTALL_AUTO=1 15 | - PS_FOLDER_ADMIN=admin-dev 16 | - PS_FOLDER_INSTALL=install-dev 17 | - PS_USE_DOCKER_MAILDEV=0 18 | - ADMIN_MAIL=demo@prestashop.com 19 | - ADMIN_PASSWD=prestashop 20 | - DB_SERVER=mysql 21 | - DB_USER=prestashop 22 | - DB_PASSWD=prestashop 23 | - DB_NAME=prestashop 24 | volumes: 25 | - type: bind 26 | # Local Path 27 | source: ../../ 28 | # Mount Path 29 | target: /var/www/html/modules/ps_cashondelivery 30 | ports: 31 | - 80:80 32 | mysql: 33 | image: mariadb:lts 34 | container_name: prestashop-mysql 35 | healthcheck: 36 | test: 37 | [ 38 | 'CMD', 39 | 'mysqladmin', 40 | 'ping', 41 | '--host=localhost', 42 | '--user=prestashop', 43 | '--password=prestashop', 44 | ] 45 | interval: 5s 46 | timeout: 10s 47 | retries: 5 48 | environment: 49 | - MYSQL_HOST=mysql 50 | - MYSQL_USER=prestashop 51 | - MYSQL_PASSWORD=prestashop 52 | - MYSQL_ROOT_PASSWORD=prestashop 53 | - MYSQL_PORT=3306 54 | - MYSQL_DATABASE=prestashop -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Cash on delivery (COD) 2 | 3 | ## About 4 | 5 | Accept cash payments on delivery to make it easy for customers to purchase on your store. 6 | 7 | ## Compatibility 8 | 9 | PrestaShop: `1.7.6.0` or later 10 | 11 | ## Multistore compatibility 12 | 13 | This module is compatible with the multistore :heavy_check_mark:
14 | It can be configured differently from one store to another.
15 | It can be configured quickly in the same way on all stores thanks to the all shops context or the group of shops.
16 | It can be activated on one store and deactivated on another 17 | 18 | ## How to test 19 | 20 | If module is enabled, check that COD payment method is displayed and available on FO 21 | 22 | Link to specs : https://docs.prestashop-project.org/functional-documentation/functional-documentation/ux-ui/back-office/improve/modules/cash-on-delivery-cod 23 | 24 | ## Reporting issues 25 | 26 | You can report issues with this module in the main PrestaShop repository. [Click here to report an issue][report-issue]. 27 | 28 | ## Contributing 29 | 30 | PrestaShop modules are open source extensions to the [PrestaShop e-commerce platform][prestashop]. Everyone is welcome and even encouraged to contribute with their own improvements! 31 | 32 | Just make sure to follow our [contribution guidelines][contribution-guidelines]. 33 | 34 | ## License 35 | 36 | This module is released under the [Academic Free License 3.0][AFL-3.0] 37 | 38 | [report-issue]: https://github.com/PrestaShop/PrestaShop/issues/new/choose 39 | [prestashop]: https://www.prestashop.com/ 40 | [contribution-guidelines]: https://devdocs.prestashop.com/1.7/contribute/contribution-guidelines/project-modules/ 41 | [AFL-3.0]: https://opensource.org/licenses/AFL-3.0 42 | -------------------------------------------------------------------------------- /.github/workflows/php.yml: -------------------------------------------------------------------------------- 1 | name: PHP tests 2 | on: [push, pull_request] 3 | 4 | jobs: 5 | php-linter: 6 | name: PHP Syntax check 5.6|7.2|7.3|7.4|8.0|8.1 7 | runs-on: ubuntu-latest 8 | steps: 9 | - name: Checkout 10 | uses: actions/checkout@v5 11 | 12 | - name: PHP syntax checker 5.6 13 | uses: prestashop/github-action-php-lint/5.6@master 14 | 15 | - name: PHP syntax checker 7.2 16 | uses: prestashop/github-action-php-lint/7.2@master 17 | 18 | - name: PHP syntax checker 7.3 19 | uses: prestashop/github-action-php-lint/7.3@master 20 | 21 | - name: PHP syntax checker 7.4 22 | uses: prestashop/github-action-php-lint/7.4@master 23 | 24 | - name: PHP syntax checker 8.0 25 | uses: prestashop/github-action-php-lint/8.0@master 26 | 27 | - name: PHP syntax checker 8.1 28 | uses: prestashop/github-action-php-lint/8.1@master 29 | 30 | php-cs-fixer: 31 | name: PHP-CS-Fixer 32 | runs-on: ubuntu-latest 33 | steps: 34 | - uses: PrestaShop/.github/.github/actions/php-ci/php-cs@master 35 | with: 36 | php-version: '7.4' 37 | 38 | phpstan: 39 | name: PHPStan 40 | runs-on: ubuntu-latest 41 | strategy: 42 | matrix: 43 | presta-version: ['1.7.7.x', '1.7.8.x'] 44 | steps: 45 | - name: Checkout repository 46 | uses: actions/checkout@v3 47 | with: 48 | path: ${{ github.event.repository.name }} 49 | 50 | - uses: PrestaShop/.github/.github/actions/php-ci/phpstan@master 51 | with: 52 | php-version: '7.4' 53 | presta-version: ${{ matrix.presta-version }} 54 | module-name: ${{ github.event.repository.name }} 55 | phpstan-level: '5' 56 | phpstan-config: 'tests/phpstan/phpstan-${{ matrix.presta-version }}.neon' 57 | phpstan-version: '^0.12' 58 | composer-version: '2.2.18' 59 | -------------------------------------------------------------------------------- /upgrade/upgrade-2.0.0.php: -------------------------------------------------------------------------------- 1 | 17 | * @copyright Since 2007 PrestaShop SA and Contributors 18 | * @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0 19 | */ 20 | if (!defined('_PS_VERSION_')) { 21 | exit; 22 | } 23 | 24 | /** 25 | * Update main function for module Version 2.0.0 26 | * 27 | * @param Ps_Cashondelivery $module 28 | * 29 | * @return bool 30 | */ 31 | function upgrade_module_2_0_0($module) 32 | { 33 | $orderStateId = (int) Configuration::get('PS_OS_COD_VALIDATION'); 34 | $orderState = new OrderState($orderStateId); 35 | 36 | // If OrderState is not exist, we create it, but it should be installed at PrestaShop setup 37 | if (!Validate::isLoadedObject($orderState)) { 38 | $module->installOrderState(); 39 | } 40 | 41 | // Hook displayOrderConfirmation replace hook displayPaymentReturn 42 | if (!$module->isRegisteredInHook('displayOrderConfirmation')) { 43 | $module->registerHook('displayOrderConfirmation'); 44 | } 45 | 46 | // Hook paymentOptions must be registered 47 | if (!$module->isRegisteredInHook('paymentOptions')) { 48 | $module->registerHook('paymentOptions'); 49 | } 50 | 51 | // Hook displayPaymentReturn is no longer used 52 | if ($module->isRegisteredInHook('displayPaymentReturn')) { 53 | $module->unregisterHook('displayPaymentReturn'); 54 | } 55 | 56 | return true; 57 | } 58 | -------------------------------------------------------------------------------- /.github/workflows/ui-test.yml: -------------------------------------------------------------------------------- 1 | name: UI Tests 2 | on: 3 | ## Check each PR 4 | push: 5 | pull_request: 6 | ## Manual execution on branch 7 | workflow_dispatch: 8 | ## Nightly 9 | ### Needs secrets 10 | #### GC_PROJECT_ID 11 | #### GC_SERVICE_KEY 12 | #### NIGHTLY_TOKEN 13 | schedule: 14 | - cron: '0 0 * * *' 15 | env: 16 | CAMPAIGN: 'ps_cashondelivery' 17 | jobs: 18 | ui_test: 19 | name: UI Tests 20 | runs-on: ubuntu-latest 21 | strategy: 22 | fail-fast: false 23 | matrix: 24 | PS_VERSION: 25 | - '1.7.6.9' 26 | - '1.7.7.8' 27 | - '1.7.8.11' 28 | - '8.0.5' 29 | - '8.1.6' 30 | - '8.2.1' 31 | - '9.0.x' 32 | - 'nightly' 33 | env: 34 | PS_VERSION: ${{ matrix.PS_VERSION }} 35 | steps: 36 | - name: Checkout 37 | uses: actions/checkout@v3.1.0 38 | 39 | - name: Start containers 40 | working-directory: tests/UI/ 41 | timeout-minutes: 15 42 | run: | 43 | docker compose -f "docker-compose.yml" up -d --build 44 | bash -c 'while [[ "$(curl -L -s -o /dev/null -w %{http_code} http://localhost/en/)" != "200" ]]; do sleep 5; done' 45 | 46 | - name: Install dependencies 47 | working-directory: tests/UI/ 48 | run: npm ci 49 | 50 | - name: Install Playwright Browsers 51 | working-directory: tests/UI/ 52 | run: npx playwright install chromium --with-deps 53 | 54 | - name: Run Playwright tests 55 | working-directory: tests/UI/ 56 | env: 57 | URL_FO: 'http://localhost/' 58 | PASSWD: 'prestashop' 59 | DB_SERVER: 'mysql' 60 | DB_NAME: 'prestashop' 61 | DB_USER: 'prestashop' 62 | DB_PASSWD: 'prestashop' 63 | run: npx playwright test 64 | 65 | - name: Export Docker errors 66 | working-directory: tests/UI/ 67 | if: always() 68 | run: docker compose logs --no-color >& docker-compose.log 69 | 70 | - name: Upload artifact 71 | uses: actions/upload-artifact@v4 72 | if: always() 73 | with: 74 | name: playwright-report-${{ matrix.PS_VERSION }} 75 | path: | 76 | tests/UI/reports/ 77 | tests/UI/report.json 78 | tests/UI/docker-compose.log 79 | retention-days: 30 80 | 81 | nightly: 82 | name: Nightly Report 83 | if: ${{ github.event_name == 'schedule' }} 84 | needs: 85 | - ui_test 86 | runs-on: ubuntu-latest 87 | strategy: 88 | fail-fast: false 89 | matrix: 90 | PS_VERSION: 91 | - '1.7.6.9' 92 | - '1.7.7.8' 93 | - '1.7.8.11' 94 | - '8.0.5' 95 | - '8.1.6' 96 | - '8.2.1' 97 | - '9.0.x' 98 | - 'nightly' 99 | permissions: 100 | contents: 'read' 101 | id-token: 'write' 102 | steps: 103 | - name: Checkout 104 | uses: actions/checkout@v4 105 | with: 106 | fetch-depth: 0 107 | 108 | - name: Download report 109 | uses: actions/download-artifact@v4 110 | with: 111 | name: playwright-report-${{ matrix.PS_VERSION }} 112 | path: tests/UI/ 113 | 114 | # Nightly : Rename file 115 | - name: "Nightly : Rename file" 116 | working-directory: tests/UI/ 117 | run: | 118 | mkdir -p nightly 119 | REPORT_NAME="${{ env.CAMPAIGN }}_$(date +%Y-%m-%d)-${{ matrix.PS_VERSION }}" 120 | mv report.json nightly/${REPORT_NAME}.json 121 | 122 | # Nightly : Auth GCP 123 | - name: "Nightly : Auth GCP" 124 | uses: google-github-actions/auth@v1 125 | with: 126 | credentials_json: ${{ secrets.GC_SERVICE_KEY }} 127 | project_id: ${{ secrets.GC_PROJECT_ID }} 128 | 129 | # Nightly : Setup GCP 130 | - name: "Nightly : Setup GCP" 131 | uses: google-github-actions/setup-gcloud@v1 132 | 133 | # Nightly : Upload to Google Cloud Storage (GCS) 134 | - name: "Nightly : Upload to Google Cloud Storage (GCS)" 135 | working-directory: tests/UI/ 136 | run: gsutil cp -r "nightly/**" gs://prestashop-core-nightly/reports 137 | 138 | # Nightly : Push Report 139 | - name: "Nightly : Push Report" 140 | run: | 141 | REPORT_NAME="${{ env.CAMPAIGN }}_$(date +%Y-%m-%d)-${{ matrix.PS_VERSION }}" 142 | curl -v "https://api-nightly.prestashop-project.org/import/report/playwright?token=${{ secrets.NIGHTLY_TOKEN }}&filename=${REPORT_NAME}.json&campaign=${{ env.CAMPAIGN }}&platform=chromium" 143 | -------------------------------------------------------------------------------- /controllers/front/validation.php: -------------------------------------------------------------------------------- 1 | 17 | * @copyright Since 2007 PrestaShop SA and Contributors 18 | * @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0 19 | */ 20 | 21 | /** 22 | * This Controller receives customer after approval on checkout page 23 | */ 24 | class Ps_CashondeliveryValidationModuleFrontController extends ModuleFrontController 25 | { 26 | /** 27 | * {@inheritdoc} 28 | * 29 | * @var bool 30 | */ 31 | public $ssl = true; 32 | 33 | /** 34 | * @var PaymentModule 35 | */ 36 | public $module; 37 | 38 | /** 39 | * {@inheritdoc} 40 | */ 41 | public function postProcess() 42 | { 43 | if (false === $this->checkIfContextIsValid() || false === $this->checkIfPaymentOptionIsAvailable()) { 44 | Tools::redirect($this->context->link->getPageLink( 45 | 'order', 46 | true, 47 | (int) $this->context->language->id, 48 | [ 49 | 'step' => 1, 50 | ] 51 | )); 52 | } 53 | 54 | $customer = new Customer($this->context->cart->id_customer); 55 | 56 | if (false === Validate::isLoadedObject($customer)) { 57 | Tools::redirect($this->context->link->getPageLink( 58 | 'order', 59 | true, 60 | (int) $this->context->language->id, 61 | [ 62 | 'step' => 1, 63 | ] 64 | )); 65 | } 66 | 67 | $this->module->validateOrder( 68 | (int) $this->context->cart->id, 69 | (int) Configuration::getGlobalValue(Ps_Cashondelivery::CONFIG_OS_CASH_ON_DELIVERY), 70 | (float) $this->context->cart->getOrderTotal(true, Cart::BOTH), 71 | $this->module->displayName, 72 | null, 73 | [], 74 | (int) $this->context->currency->id, 75 | false, 76 | $customer->secure_key 77 | ); 78 | 79 | Tools::redirect($this->context->link->getPageLink( 80 | 'order-confirmation', 81 | true, 82 | (int) $this->context->language->id, 83 | [ 84 | 'id_cart' => (int) $this->context->cart->id, 85 | 'id_module' => (int) $this->module->id, 86 | 'id_order' => (int) $this->module->currentOrder, 87 | 'key' => $customer->secure_key, 88 | ] 89 | )); 90 | } 91 | 92 | /** 93 | * Check if the context is valid 94 | * - Cart is loaded 95 | * - Cart has a Customer 96 | * - Cart has a delivery address 97 | * - Cart has an invoice address 98 | * - Cart doesn't contains virtual product 99 | * 100 | * @return bool 101 | */ 102 | private function checkIfContextIsValid() 103 | { 104 | return true === Validate::isLoadedObject($this->context->cart) 105 | && true === Validate::isUnsignedInt($this->context->cart->id_customer) 106 | && true === Validate::isUnsignedInt($this->context->cart->id_address_delivery) 107 | && true === Validate::isUnsignedInt($this->context->cart->id_address_invoice) 108 | && false === $this->context->cart->isVirtualCart(); 109 | } 110 | 111 | /** 112 | * Check that this payment option is still available in case the customer changed 113 | * his address just before the end of the checkout process 114 | * 115 | * @return bool 116 | */ 117 | private function checkIfPaymentOptionIsAvailable() 118 | { 119 | $modules = Module::getPaymentModules(); 120 | 121 | if (empty($modules)) { 122 | return false; 123 | } 124 | 125 | foreach ($modules as $module) { 126 | if (isset($module['name']) && $this->module->name === $module['name']) { 127 | return true; 128 | } 129 | } 130 | 131 | return false; 132 | } 133 | } 134 | -------------------------------------------------------------------------------- /tests/UI/campaigns/02_configuration/01_placeOrderWithIt.spec.ts: -------------------------------------------------------------------------------- 1 | import { 2 | boDashboardPage, 3 | boLoginPage, 4 | boOrdersPage, 5 | dataCustomers, 6 | dataOrderStatuses, 7 | dataPaymentMethods, 8 | foClassicCartPage, 9 | foClassicCheckoutPage, 10 | foClassicCheckoutOrderConfirmationPage, 11 | foClassicHomePage, 12 | foClassicLoginPage, 13 | utilsTest, 14 | foClassicModalBlockCartPage, 15 | foClassicModalQuickViewPage, 16 | } from '@prestashop-core/ui-testing'; 17 | 18 | import { test, expect, Page, BrowserContext } from '@playwright/test'; 19 | 20 | const baseContext: string = 'modules_ps_cashondelivery_configuration_placeOrderWithIt'; 21 | 22 | test.describe('Cash on delivery (COD) module - Place an order with it', async () => { 23 | let browserContext: BrowserContext; 24 | let page: Page; 25 | let orderReference: string; 26 | 27 | test.beforeAll(async ({ browser }) => { 28 | browserContext = await browser.newContext(); 29 | page = await browserContext.newPage(); 30 | }); 31 | test.afterAll(async () => { 32 | await page.close(); 33 | }); 34 | 35 | test.describe('FO - Order a product with Cash on delivery payment', async () => { 36 | test('should go to FO home page', async () => { 37 | await utilsTest.addContextItem(test.info(), 'testIdentifier', 'goToFO', baseContext); 38 | 39 | await foClassicHomePage.goToFo(page); 40 | 41 | const isHomePage = await foClassicHomePage.isHomePage(page); 42 | expect(isHomePage).toEqual(true); 43 | }); 44 | 45 | test('should go to login page', async () => { 46 | await utilsTest.addContextItem(test.info(), 'testIdentifier', 'goToLoginPageFO', baseContext); 47 | 48 | await foClassicHomePage.goToLoginPage(page); 49 | 50 | const pageTitle = await foClassicLoginPage.getPageTitle(page); 51 | expect(pageTitle).toContain(foClassicLoginPage.pageTitle); 52 | }); 53 | 54 | test('should sign in with default customer', async () => { 55 | await utilsTest.addContextItem(test.info(), 'testIdentifier', 'sighInFO', baseContext); 56 | 57 | await foClassicLoginPage.customerLogin(page, dataCustomers.johnDoe); 58 | 59 | const isCustomerConnected = await foClassicLoginPage.isCustomerConnected(page); 60 | expect(isCustomerConnected).toEqual(true); 61 | }); 62 | 63 | test('should add the first product to the cart', async () => { 64 | await utilsTest.addContextItem(test.info(), 'testIdentifier', 'addProductToCart', baseContext); 65 | 66 | await foClassicLoginPage.goToHomePage(page); 67 | 68 | // Add first product to cart by quick view 69 | await foClassicHomePage.quickViewProduct(page, 1); 70 | await foClassicModalQuickViewPage.addToCartByQuickView(page); 71 | await foClassicModalBlockCartPage.proceedToCheckout(page); 72 | 73 | const pageTitle = await foClassicCartPage.getPageTitle(page); 74 | expect(pageTitle).toEqual(foClassicCartPage.pageTitle); 75 | }); 76 | 77 | test('should proceed to checkout and check Step Address', async () => { 78 | await utilsTest.addContextItem(test.info(), 'testIdentifier', 'checkAddressStep', baseContext); 79 | 80 | await foClassicCartPage.clickOnProceedToCheckout(page); 81 | 82 | const isCheckoutPage = await foClassicCheckoutPage.isCheckoutPage(page); 83 | expect(isCheckoutPage).toEqual(true); 84 | 85 | const isStepPersonalInformationComplete = await foClassicCheckoutPage.isStepCompleted( 86 | page, 87 | foClassicCheckoutPage.personalInformationStepForm, 88 | ); 89 | expect(isStepPersonalInformationComplete).toEqual(true); 90 | }); 91 | 92 | test('should validate Step Address and go to Delivery Step', async () => { 93 | await utilsTest.addContextItem(test.info(), 'testIdentifier', 'checkDeliveryStep', baseContext); 94 | 95 | const isStepAddressComplete = await foClassicCheckoutPage.goToDeliveryStep(page); 96 | expect(isStepAddressComplete).toEqual(true); 97 | }); 98 | 99 | test('should go to payment step', async () => { 100 | await utilsTest.addContextItem(test.info(), 'testIdentifier', 'goToPaymentStep', baseContext); 101 | 102 | const isStepDeliveryComplete = await foClassicCheckoutPage.goToPaymentStep(page); 103 | expect(isStepDeliveryComplete, 'Step Address is not complete').toEqual(true); 104 | }); 105 | 106 | test('should choose payment method and confirm the order', async () => { 107 | await utilsTest.addContextItem(test.info(), 'testIdentifier', 'confirmOrder', baseContext); 108 | 109 | // Payment step - Choose payment step 110 | await foClassicCheckoutPage.choosePaymentAndOrder(page, dataPaymentMethods.cashOnDelivery.moduleName); 111 | 112 | // Check the confirmation message 113 | const cardTitle = await foClassicCheckoutOrderConfirmationPage.getOrderConfirmationCardTitle(page); 114 | expect(cardTitle).toContain(foClassicCheckoutOrderConfirmationPage.orderConfirmationCardTitle); 115 | 116 | orderReference = await foClassicCheckoutOrderConfirmationPage.getOrderReferenceValue(page); 117 | expect(orderReference.length).toBeGreaterThan(0); 118 | }); 119 | }); 120 | 121 | test.describe('BO - Check the last order', async () => { 122 | test('should login in BO', async () => { 123 | await utilsTest.addContextItem(test.info(), 'testIdentifier', 'loginBO', baseContext); 124 | 125 | await boLoginPage.goTo(page, global.BO.URL); 126 | await boLoginPage.successLogin(page, global.BO.EMAIL, global.BO.PASSWD); 127 | 128 | const pageTitle = await boDashboardPage.getPageTitle(page); 129 | expect(pageTitle).toContain(boDashboardPage.pageTitle); 130 | }); 131 | 132 | test('should go to \'Orders > Orders\' page', async () => { 133 | await utilsTest.addContextItem(test.info(), 'testIdentifier', 'goToOrdersPage', baseContext); 134 | 135 | await boDashboardPage.goToSubMenu( 136 | page, 137 | boDashboardPage.ordersParentLink, 138 | boDashboardPage.ordersLink, 139 | ); 140 | 141 | const pageTitle = await boOrdersPage.getPageTitle(page); 142 | expect(pageTitle).toContain(boOrdersPage.pageTitle); 143 | }); 144 | 145 | test('should reset all filters and get number of orders', async () => { 146 | await utilsTest.addContextItem(test.info(), 'testIdentifier', 'resetFiltersFirst', baseContext); 147 | 148 | const numberOfOrders = await boOrdersPage.resetAndGetNumberOfLines(page); 149 | expect(numberOfOrders).toBeGreaterThan(0); 150 | }); 151 | 152 | test('should check the last order', async () => { 153 | await utilsTest.addContextItem(test.info(), 'testIdentifier', 'checkLastOrder', baseContext); 154 | 155 | const rowOrderReference = await boOrdersPage.getTextColumn(page, 'reference', 1); 156 | expect(rowOrderReference).toEqual(orderReference); 157 | 158 | const rowOrderPayment = await boOrdersPage.getTextColumn(page, 'payment', 1); 159 | expect(rowOrderPayment).toEqual(dataPaymentMethods.cashOnDelivery.displayName); 160 | 161 | const rowOrderStatus = await boOrdersPage.getTextColumn(page, 'osname', 1); 162 | expect(rowOrderStatus).toEqual(dataOrderStatuses.awaitingCashOnDelivery.name); 163 | }); 164 | }); 165 | }); 166 | -------------------------------------------------------------------------------- /tests/UI/campaigns/01_installation/04_resetModule.spec.ts: -------------------------------------------------------------------------------- 1 | import { 2 | boDashboardPage, 3 | boLoginPage, 4 | boModuleManagerPage, 5 | boModuleManagerUninstalledModulesPage, 6 | dataCustomers, 7 | dataModules, 8 | foClassicCartPage, 9 | foClassicCheckoutPage, 10 | foClassicHomePage, 11 | foClassicLoginPage, 12 | foClassicModalBlockCartPage, 13 | foClassicModalQuickViewPage, 14 | utilsTest, 15 | } from '@prestashop-core/ui-testing'; 16 | 17 | import { test, expect, Page, BrowserContext } from '@playwright/test'; 18 | import semver from 'semver'; 19 | 20 | const baseContext: string = 'modules_ps_cashondelivery_installation_resetModule'; 21 | const psVersion = utilsTest.getPSVersion(); 22 | 23 | test.describe('Cash on delivery (COD) module - Reset module', async () => { 24 | let browserContext: BrowserContext; 25 | let page: Page; 26 | 27 | test.beforeAll(async ({ browser }) => { 28 | browserContext = await browser.newContext(); 29 | page = await browserContext.newPage(); 30 | }); 31 | test.afterAll(async () => { 32 | await page.close(); 33 | }); 34 | 35 | test('should login in BO', async () => { 36 | await utilsTest.addContextItem(test.info(), 'testIdentifier', 'loginBO', baseContext); 37 | 38 | await boLoginPage.goTo(page, global.BO.URL); 39 | await boLoginPage.successLogin(page, global.BO.EMAIL, global.BO.PASSWD); 40 | 41 | const pageTitle = await boDashboardPage.getPageTitle(page); 42 | expect(pageTitle).toContain(boDashboardPage.pageTitle); 43 | }); 44 | 45 | if (semver.lt(psVersion, '8.0.0')) { 46 | test('should go to \'Modules > Module Manager\' page for installing module', async () => { 47 | await utilsTest.addContextItem(test.info(), 'testIdentifier', 'goToModuleManagerPageToInstall', baseContext); 48 | 49 | await boDashboardPage.goToSubMenu( 50 | page, 51 | boDashboardPage.modulesParentLink, 52 | boDashboardPage.moduleManagerLink, 53 | ); 54 | await boModuleManagerPage.closeSfToolBar(page); 55 | 56 | const pageTitle = await boModuleManagerPage.getPageTitle(page); 57 | expect(pageTitle).toContain(boModuleManagerPage.pageTitle); 58 | }); 59 | 60 | test('should install module', async () => { 61 | await utilsTest.addContextItem(test.info(), 'testIdentifier', 'searchModuleToInstall', baseContext); 62 | 63 | await boModuleManagerUninstalledModulesPage.goToTabUninstalledModules(page); 64 | 65 | const isInstalled = await boModuleManagerUninstalledModulesPage.installModule(page, dataModules.psCashOnDelivery.tag); 66 | expect(isInstalled).toBeTruthy(); 67 | }); 68 | } 69 | 70 | test('should go to \'Modules > Module Manager\' page', async () => { 71 | await utilsTest.addContextItem(test.info(), 'testIdentifier', 'goToModuleManagerPage', baseContext); 72 | 73 | await boDashboardPage.goToSubMenu( 74 | page, 75 | boDashboardPage.modulesParentLink, 76 | boDashboardPage.moduleManagerLink, 77 | ); 78 | await boModuleManagerPage.closeSfToolBar(page); 79 | 80 | const pageTitle = await boModuleManagerPage.getPageTitle(page); 81 | expect(pageTitle).toContain(boModuleManagerPage.pageTitle); 82 | }); 83 | 84 | test(`should search the module ${dataModules.psCashOnDelivery.name}`, async () => { 85 | await utilsTest.addContextItem(test.info(), 'testIdentifier', 'searchModule', baseContext); 86 | 87 | const isModuleVisible = await boModuleManagerPage.searchModule(page, dataModules.psCashOnDelivery); 88 | expect(isModuleVisible).toEqual(true); 89 | }); 90 | 91 | test('should display the reset modal and cancel it', async () => { 92 | await utilsTest.addContextItem(test.info(), 'testIdentifier', 'resetModuleAndCancel', baseContext); 93 | 94 | const textResult = await boModuleManagerPage.setActionInModule(page, dataModules.psCashOnDelivery, 'reset', true); 95 | expect(textResult).toEqual(''); 96 | 97 | const isModuleVisible = await boModuleManagerPage.isModuleVisible(page, dataModules.psCashOnDelivery); 98 | expect(isModuleVisible).toEqual(true); 99 | 100 | const isModalVisible = await boModuleManagerPage.isModalActionVisible(page, dataModules.psCashOnDelivery, 'reset'); 101 | expect(isModalVisible).toEqual(false); 102 | }); 103 | 104 | test('should reset the module', async () => { 105 | await utilsTest.addContextItem(test.info(), 'testIdentifier', 'resetModule', baseContext); 106 | 107 | const successMessage = await boModuleManagerPage.setActionInModule(page, dataModules.psCashOnDelivery, 'reset'); 108 | expect(successMessage).toEqual(boModuleManagerPage.resetModuleSuccessMessage(dataModules.psCashOnDelivery.tag)); 109 | }); 110 | 111 | test('should go to Front Office', async () => { 112 | await utilsTest.addContextItem(test.info(), 'testIdentifier', 'goToFo', baseContext); 113 | 114 | page = await boModuleManagerPage.viewMyShop(page); 115 | await foClassicHomePage.changeLanguage(page, 'en'); 116 | 117 | const isHomePage = await foClassicHomePage.isHomePage(page); 118 | expect(isHomePage).toEqual(true); 119 | }); 120 | 121 | test('should go to login page', async () => { 122 | await utilsTest.addContextItem(test.info(), 'testIdentifier', 'goToLoginPageFO', baseContext); 123 | 124 | await foClassicHomePage.goToLoginPage(page); 125 | 126 | const pageTitle = await foClassicLoginPage.getPageTitle(page); 127 | expect(pageTitle).toContain(foClassicLoginPage.pageTitle); 128 | }); 129 | 130 | test('should sign in with default customer', async () => { 131 | await utilsTest.addContextItem(test.info(), 'testIdentifier', 'sighInFO', baseContext); 132 | 133 | await foClassicLoginPage.customerLogin(page, dataCustomers.johnDoe); 134 | 135 | const isCustomerConnected = await foClassicLoginPage.isCustomerConnected(page); 136 | expect(isCustomerConnected).toEqual(true); 137 | }); 138 | 139 | test('should add the first product to the cart', async () => { 140 | await utilsTest.addContextItem(test.info(), 'testIdentifier', 'addProductToCart', baseContext); 141 | 142 | await foClassicLoginPage.goToHomePage(page); 143 | 144 | // Add first product to cart by quick view 145 | await foClassicHomePage.quickViewProduct(page, 1); 146 | await foClassicModalQuickViewPage.addToCartByQuickView(page); 147 | await foClassicModalBlockCartPage.proceedToCheckout(page); 148 | 149 | const pageTitle = await foClassicCartPage.getPageTitle(page); 150 | expect(pageTitle).toEqual(foClassicCartPage.pageTitle); 151 | }); 152 | 153 | test('should proceed to checkout and check Step Address', async () => { 154 | await utilsTest.addContextItem(test.info(), 'testIdentifier', 'checkAddressStep', baseContext); 155 | 156 | await foClassicCartPage.clickOnProceedToCheckout(page); 157 | 158 | const isCheckoutPage = await foClassicCheckoutPage.isCheckoutPage(page); 159 | expect(isCheckoutPage).toEqual(true); 160 | 161 | const isStepPersonalInformationComplete = await foClassicCheckoutPage.isStepCompleted( 162 | page, 163 | foClassicCheckoutPage.personalInformationStepForm, 164 | ); 165 | expect(isStepPersonalInformationComplete).toEqual(true); 166 | }); 167 | 168 | test('should validate Step Address and go to Delivery Step', async () => { 169 | await utilsTest.addContextItem(test.info(), 'testIdentifier', 'checkDeliveryStep', baseContext); 170 | 171 | const isStepAddressComplete = await foClassicCheckoutPage.goToDeliveryStep(page); 172 | expect(isStepAddressComplete).toEqual(true); 173 | }); 174 | 175 | test('should go to payment step', async () => { 176 | await utilsTest.addContextItem(test.info(), 'testIdentifier', 'goToPaymentStep', baseContext); 177 | 178 | const isStepDeliveryComplete = await foClassicCheckoutPage.goToPaymentStep(page); 179 | expect(isStepDeliveryComplete, 'Step Address is not complete').toEqual(true); 180 | }); 181 | 182 | test(`should check the '${dataModules.psCashOnDelivery.name}' payment module`, async () => { 183 | await utilsTest.addContextItem(test.info(), 'testIdentifier', 'checkPaymentModule', baseContext); 184 | 185 | // Payment step - Choose payment step 186 | const isVisible = await foClassicCheckoutPage.isPaymentMethodExist(page, dataModules.psCashOnDelivery.tag); 187 | expect(isVisible).toEqual(true); 188 | }); 189 | }); 190 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | Academic Free License ("AFL") v. 3.0 2 | 3 | This Academic Free License (the "License") applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following licensing notice adjacent to the copyright notice for the Original Work: 4 | 5 | Licensed under the Academic Free License version 3.0 6 | 7 | 1) Grant of Copyright License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, for the duration of the copyright, to do the following: 8 | 9 | a) to reproduce the Original Work in copies, either alone or as part of a collective work; 10 | 11 | b) to translate, adapt, alter, transform, modify, or arrange the Original Work, thereby creating derivative works ("Derivative Works") based upon the Original Work; 12 | 13 | c) to distribute or communicate copies of the Original Work and Derivative Works to the public, under any license of your choice that does not contradict the terms and conditions, including Licensor's reserved rights and remedies, in this Academic Free License; 14 | 15 | d) to perform the Original Work publicly; and 16 | 17 | e) to display the Original Work publicly. 18 | 19 | 2) Grant of Patent License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, under patent claims owned or controlled by the Licensor that are embodied in the Original Work as furnished by the Licensor, for the duration of the patents, to make, use, sell, offer for sale, have made, and import the Original Work and Derivative Works. 20 | 21 | 3) Grant of Source Code License. The term "Source Code" means the preferred form of the Original Work for making modifications to it and all available documentation describing how to modify the Original Work. Licensor agrees to provide a machine-readable copy of the Source Code of the Original Work along with each copy of the Original Work that Licensor distributes. Licensor reserves the right to satisfy this obligation by placing a machine-readable copy of the Source Code in an information repository reasonably calculated to permit inexpensive and convenient access by You for as long as Licensor continues to distribute the Original Work. 22 | 23 | 4) Exclusions From License Grant. Neither the names of Licensor, nor the names of any contributors to the Original Work, nor any of their trademarks or service marks, may be used to endorse or promote products derived from this Original Work without express prior permission of the Licensor. Except as expressly stated herein, nothing in this License grants any license to Licensor's trademarks, copyrights, patents, trade secrets or any other intellectual property. No patent license is granted to make, use, sell, offer for sale, have made, or import embodiments of any patent claims other than the licensed claims defined in Section 2. No license is granted to the trademarks of Licensor even if such marks are included in the Original Work. Nothing in this License shall be interpreted to prohibit Licensor from licensing under terms different from this License any Original Work that Licensor otherwise would have a right to license. 24 | 25 | 5) External Deployment. The term "External Deployment" means the use, distribution, or communication of the Original Work or Derivative Works in any way such that the Original Work or Derivative Works may be used by anyone other than You, whether those works are distributed or communicated to those persons or made available as an application intended for use over a network. As an express condition for the grants of license hereunder, You must treat any External Deployment by You of the Original Work or a Derivative Work as a distribution under section 1(c). 26 | 27 | 6) Attribution Rights. You must retain, in the Source Code of any Derivative Works that You create, all copyright, patent, or trademark notices from the Source Code of the Original Work, as well as any notices of licensing and any descriptive text identified therein as an "Attribution Notice." You must cause the Source Code for any Derivative Works that You create to carry a prominent Attribution Notice reasonably calculated to inform recipients that You have modified the Original Work. 28 | 29 | 7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that the copyright in and to the Original Work and the patent rights granted herein by Licensor are owned by the Licensor or are sublicensed to You under the terms of this License with the permission of the contributor(s) of those copyrights and patent rights. Except as expressly stated in the immediately preceding sentence, the Original Work is provided under this License on an "AS IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without limitation, the warranties of non-infringement, merchantability or fitness for a particular purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No license to the Original Work is granted by this License except under this disclaimer. 30 | 31 | 8) Limitation of Liability. Under no circumstances and under no legal theory, whether in tort (including negligence), contract, or otherwise, shall the Licensor be liable to anyone for any indirect, special, incidental, or consequential damages of any character arising as a result of this License or the use of the Original Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses. This limitation of liability shall not apply to the extent applicable law prohibits such limitation. 32 | 33 | 9) Acceptance and Termination. If, at any time, You expressly assented to this License, that assent indicates your clear and irrevocable acceptance of this License and all of its terms and conditions. If You distribute or communicate copies of the Original Work or a Derivative Work, You must make a reasonable effort under the circumstances to obtain the express assent of recipients to the terms of this License. This License conditions your rights to undertake the activities listed in Section 1, including your right to create Derivative Works based upon the Original Work, and doing so without honoring these terms and conditions is prohibited by copyright law and international treaty. Nothing in this License is intended to affect copyright exceptions and limitations (including "fair use" or "fair dealing"). This License shall terminate immediately and You may no longer exercise any of the rights granted to You by this License upon your failure to honor the conditions in Section 1(c). 34 | 35 | 10) Termination for Patent Action. This License shall terminate automatically and You may no longer exercise any of the rights granted to You by this License as of the date You commence an action, including a cross-claim or counterclaim, against Licensor or any licensee alleging that the Original Work infringes a patent. This termination provision shall not apply for an action alleging patent infringement by combinations of the Original Work with other software or hardware. 36 | 37 | 11) Jurisdiction, Venue and Governing Law. Any action or suit relating to this License may be brought only in the courts of a jurisdiction wherein the Licensor resides or in which Licensor conducts its primary business, and under the laws of that jurisdiction excluding its conflict-of-law provisions. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any use of the Original Work outside the scope of this License or after its termination shall be subject to the requirements and penalties of copyright or patent law in the appropriate jurisdiction. This section shall survive the termination of this License. 38 | 39 | 12) Attorneys' Fees. In any action to enforce the terms of this License or seeking damages relating thereto, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. This section shall survive the termination of this License. 40 | 41 | 13) Miscellaneous. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. 42 | 43 | 14) Definition of "You" in This License. "You" throughout this License, whether in upper or lower case, means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with you. For purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. 44 | 45 | 15) Right to Use. You may use the Original Work in all ways not otherwise restricted or conditioned by this License or by law, and Licensor promises not to interfere with or be responsible for such uses by You. 46 | 47 | 16) Modification of This License. This License is Copyright © 2005 Lawrence Rosen. Permission is granted to copy, distribute, or communicate this License without modification. Nothing in this License permits You to modify this License as applied to the Original Work or to Derivative Works. However, You may modify the text of this License and copy, distribute or communicate your modified version (the "Modified License") and apply it to other original works of authorship subject to the following conditions: (i) You may not indicate in any way that your Modified License is the "Academic Free License" or "AFL" and you may not use those names in the name of your Modified License; (ii) You must replace the notice specified in the first paragraph above with the notice "Licensed under " or with a notice of your own that is not confusingly similar to the notice in this License; and (iii) You may not claim that your original works are open source software unless your Modified License has been approved by Open Source Initiative (OSI) and You comply with its license review and certification process. 48 | -------------------------------------------------------------------------------- /ps_cashondelivery.php: -------------------------------------------------------------------------------- 1 | 17 | * @copyright Since 2007 PrestaShop SA and Contributors 18 | * @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0 19 | */ 20 | if (!defined('_PS_VERSION_')) { 21 | exit; 22 | } 23 | 24 | if (file_exists(__DIR__ . '/vendor/autoload.php')) { 25 | require_once __DIR__ . '/vendor/autoload.php'; 26 | } 27 | 28 | use PrestaShop\PrestaShop\Core\Payment\PaymentOption; 29 | 30 | class Ps_Cashondelivery extends PaymentModule 31 | { 32 | const HOOKS = [ 33 | 'displayOrderConfirmation', 34 | 'paymentOptions', 35 | ]; 36 | 37 | const CONFIG_OS_CASH_ON_DELIVERY = 'PS_OS_COD_VALIDATION'; 38 | 39 | /** 40 | * {@inheritdoc} 41 | */ 42 | public function __construct() 43 | { 44 | $this->name = 'ps_cashondelivery'; 45 | $this->tab = 'payments_gateways'; 46 | $this->author = 'PrestaShop'; 47 | $this->version = '2.0.1'; 48 | $this->need_instance = 1; 49 | $this->ps_versions_compliancy = ['min' => '1.7.6.0', 'max' => _PS_VERSION_]; 50 | $this->controllers = ['validation']; 51 | $this->currencies = false; 52 | 53 | parent::__construct(); 54 | 55 | $this->displayName = $this->trans('Cash on delivery (COD)', [], 'Modules.Cashondelivery.Admin'); 56 | $this->description = $this->trans('Accept cash payments on delivery to make it easy for customers to purchase on your store.', [], 'Modules.Cashondelivery.Admin'); 57 | } 58 | 59 | /** 60 | * {@inheritdoc} 61 | */ 62 | public function install() 63 | { 64 | return parent::install() 65 | && (bool) $this->registerHook(static::HOOKS) 66 | && $this->installOrderState(); 67 | } 68 | 69 | /** 70 | * @param array{cookie: Cookie, cart: Cart, altern: int} $params 71 | * 72 | * @return array|PaymentOption[] Should always returns an array to avoid issue 73 | */ 74 | public function hookPaymentOptions(array $params) 75 | { 76 | if (empty($params['cart'])) { 77 | return []; 78 | } 79 | 80 | /** @var Cart $cart */ 81 | $cart = $params['cart']; 82 | 83 | if ($cart->isVirtualCart()) { 84 | return []; 85 | } 86 | 87 | $cashOnDeliveryOption = new PaymentOption(); 88 | $cashOnDeliveryOption->setModuleName($this->name); 89 | $cashOnDeliveryOption->setCallToActionText($this->trans('Pay by Cash on Delivery', [], 'Modules.Cashondelivery.Shop')); 90 | $cashOnDeliveryOption->setAction($this->context->link->getModuleLink($this->name, 'validation', [], true)); 91 | $cashOnDeliveryOption->setAdditionalInformation($this->fetch('module:ps_cashondelivery/views/templates/hook/paymentOptions-additionalInformation.tpl')); 92 | 93 | return [$cashOnDeliveryOption]; 94 | } 95 | 96 | /** 97 | * @param array{cookie: Cookie, cart: Cart, altern: int, order: Order, objOrder: Order} $params 98 | * 99 | * @return string 100 | */ 101 | public function hookDisplayOrderConfirmation(array $params) 102 | { 103 | /** @var Order $order */ 104 | $order = (isset($params['objOrder'])) ? $params['objOrder'] : $params['order']; 105 | 106 | if (!Validate::isLoadedObject($order) || $order->module !== $this->name) { 107 | return ''; 108 | } 109 | 110 | $this->context->smarty->assign([ 111 | 'shop_name' => $this->context->shop->name, 112 | 'total' => $this->context->getCurrentLocale()->formatPrice($params['order']->getOrdersTotalPaid(), (new Currency($params['order']->id_currency))->iso_code), 113 | 'reference' => $order->reference, 114 | 'contact_url' => $this->context->link->getPageLink('contact', true), 115 | ]); 116 | 117 | return $this->fetch('module:ps_cashondelivery/views/templates/hook/displayOrderConfirmation.tpl'); 118 | } 119 | 120 | /** 121 | * @return bool 122 | */ 123 | public function installOrderState() 124 | { 125 | if (Configuration::getGlobalValue(Ps_Cashondelivery::CONFIG_OS_CASH_ON_DELIVERY)) { 126 | $orderState = new OrderState((int) Configuration::getGlobalValue(Ps_Cashondelivery::CONFIG_OS_CASH_ON_DELIVERY)); 127 | 128 | if (Validate::isLoadedObject($orderState) && $this->name === $orderState->module_name) { 129 | return true; 130 | } 131 | } 132 | 133 | return $this->createOrderState( 134 | static::CONFIG_OS_CASH_ON_DELIVERY, 135 | [ 136 | 'en' => 'Awaiting Cash On Delivery validation', 137 | 'bs' => 'Čeka validaciju Plaćanje po dostavi', 138 | 'ca' => 'Esperant la validació del pagament contra reemborsament', 139 | 'da' => 'Afventer godkendelse af levering pr. efterkrav', 140 | 'de' => 'Warten auf Zahlungseingang Nachnahme', 141 | 'et' => 'Ootab sularaha kauba kättesaamisel kinnitust', 142 | 'es' => 'En espera de validación por contra reembolso.', 143 | 'mx' => 'En espera de validación por pago contra entrega', 144 | 'fr' => 'En attente de paiement à la livraison', 145 | 'qc' => 'En attente de paiement à la livraison', 146 | 'gl' => 'Agardando a validación do Pago Contra Reembolso', 147 | 'hr' => 'Awaiting cod validation', 148 | 'id' => 'Awaiting cod validation', 149 | 'it' => 'In attesa verifica contrassegno', 150 | 'lv' => 'Gaida skaidrās naudas apmaksas apstiprinājumu', 151 | 'hu' => 'Awaiting cod validation', 152 | 'nl' => 'Wachten op bevestiging (rembours)', 153 | 'no' => 'Awaiting cod validation', 154 | 'pl' => 'Oczekiwanie na płatność przy odbiorze', 155 | 'br' => 'Aguardando validação de pagamento na entrega', 156 | 'pt' => 'Awaiting cod validation', 157 | 'ro' => 'In asteptarea confirmarii platii la livrare', 158 | 'sq' => 'Në pritje të pagesës gjatë dorëzimit', 159 | 'sk' => 'Čaká sa na potvrdenie platby dobierkou', 160 | 'sr' => 'Čeka se potvrda keširanja pri isporuci', 161 | 'fi' => 'Odottaa maksuvahvistusta', 162 | 'sv' => 'Väntar på postförskott validering', 163 | 'tr' => 'Kapıda ödeme onayı bekleniyor', 164 | 'lt' => 'Awaiting cod validation', 165 | 'si' => 'Čaka potrdilo za plačilo po povzetju', 166 | 'vn' => 'Chờ xác nhận thanh toán COD', 167 | 'cs' => 'Čeká se na potvrzení dobírky', 168 | 'el' => 'Αναμονή επικύρωσης Αντικαταβολής', 169 | 'ru' => 'Ожидается подтверждение оплаты наличными', 170 | 'uk' => 'Очікується платіж післяплатою', 171 | 'bg' => 'В очакване на валидиране на плащане при доставка', 172 | 'mk' => 'Awaiting cod validation', 173 | 'he' => 'Awaiting cod validation', 174 | 'fa' => 'Awaiting cod validation', 175 | 'hi' => 'Awaiting Cash On Delivery validation', 176 | 'bn' => 'Awaiting cod validation', 177 | 'ar' => 'بإنتظار المصادقة على الدفع عند الإستلام', 178 | 'ja' => '代金引換払い確認待ち', 179 | 'zh' => '接受远程付费', 180 | 'tw' => '等待貨到付款驗證', 181 | 'ko' => '배송시 현금 지불 확인 대기', 182 | ], 183 | true === (bool) version_compare(_PS_VERSION_, '1.7.7.0', '>=') ? '#4169E1' : '#34219E' 184 | ); 185 | } 186 | 187 | /** 188 | * Create custom OrderState used for payment 189 | * 190 | * @param string $configurationKey Configuration key used to store OrderState identifier 191 | * @param array $nameByLangIsoCode An array of name for all languages, default is en 192 | * @param string $color Color of the label 193 | * @param bool $isLogable consider the associated order as validated 194 | * @param bool $isPaid set the order as paid 195 | * @param bool $isInvoice allow a customer to download and view PDF versions of his/her invoices 196 | * @param bool $isShipped set the order as shipped 197 | * @param bool $isDelivery show delivery PDF 198 | * @param bool $isPdfDelivery attach delivery slip PDF to email 199 | * @param bool $isPdfInvoice attach invoice PDF to email 200 | * @param bool $isSendEmail send an email to the customer when his/her order status has changed 201 | * @param string $template Only letters, numbers and underscores are allowed. Email template for both .html and .txt 202 | * @param bool $isHidden hide this status in all customer orders 203 | * @param bool $isUnremovable Disallow delete action for this OrderState 204 | * @param bool $isDeleted Set OrderState deleted 205 | * 206 | * @return bool 207 | */ 208 | private function createOrderState( 209 | $configurationKey, 210 | array $nameByLangIsoCode, 211 | $color, 212 | $isLogable = false, 213 | $isPaid = false, 214 | $isInvoice = false, 215 | $isShipped = false, 216 | $isDelivery = false, 217 | $isPdfDelivery = false, 218 | $isPdfInvoice = false, 219 | $isSendEmail = false, 220 | $template = '', 221 | $isHidden = false, 222 | $isUnremovable = true, 223 | $isDeleted = false 224 | ) { 225 | $tabNameByLangId = []; 226 | 227 | foreach ($nameByLangIsoCode as $langIsoCode => $name) { 228 | foreach (Language::getLanguages(false) as $language) { 229 | if (Tools::strtolower($language['iso_code']) === $langIsoCode) { 230 | $tabNameByLangId[(int) $language['id_lang']] = $name; 231 | } elseif (isset($nameByLangIsoCode['en'])) { 232 | $tabNameByLangId[(int) $language['id_lang']] = $nameByLangIsoCode['en']; 233 | } 234 | } 235 | } 236 | 237 | $orderState = new OrderState(); 238 | $orderState->module_name = $this->name; 239 | $orderState->name = $tabNameByLangId; 240 | $orderState->color = $color; 241 | $orderState->logable = $isLogable; 242 | $orderState->paid = $isPaid; 243 | $orderState->invoice = $isInvoice; 244 | $orderState->shipped = $isShipped; 245 | $orderState->delivery = $isDelivery; 246 | $orderState->pdf_delivery = $isPdfDelivery; 247 | $orderState->pdf_invoice = $isPdfInvoice; 248 | $orderState->send_email = $isSendEmail; 249 | $orderState->hidden = $isHidden; 250 | $orderState->unremovable = $isUnremovable; 251 | $orderState->template = $template; 252 | $orderState->deleted = $isDeleted; 253 | $result = (bool) $orderState->add(); 254 | 255 | if (false === $result) { 256 | $this->_errors[] = sprintf( 257 | 'Failed to create OrderState %s', 258 | $configurationKey 259 | ); 260 | 261 | return false; 262 | } 263 | 264 | $result = (bool) Configuration::updateGlobalValue($configurationKey, (int) $orderState->id); 265 | 266 | if (false === $result) { 267 | $this->_errors[] = sprintf( 268 | 'Failed to save OrderState %s to Configuration', 269 | $configurationKey 270 | ); 271 | 272 | return false; 273 | } 274 | 275 | $orderStateImgPath = $this->getLocalPath() . 'views/img/orderstate/' . $configurationKey . '.gif'; 276 | 277 | if (false === (bool) Tools::file_exists_cache($orderStateImgPath)) { 278 | $this->_errors[] = sprintf( 279 | 'Failed to find icon file of OrderState %s', 280 | $configurationKey 281 | ); 282 | 283 | return false; 284 | } 285 | 286 | if (false === (bool) Tools::copy($orderStateImgPath, _PS_ORDER_STATE_IMG_DIR_ . $orderState->id . '.gif')) { 287 | $this->_errors[] = sprintf( 288 | 'Failed to copy icon of OrderState %s', 289 | $configurationKey 290 | ); 291 | 292 | return false; 293 | } 294 | 295 | return true; 296 | } 297 | } 298 | -------------------------------------------------------------------------------- /composer.lock: -------------------------------------------------------------------------------- 1 | { 2 | "_readme": [ 3 | "This file locks the dependencies of your project to a known state", 4 | "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", 5 | "This file is @generated automatically" 6 | ], 7 | "content-hash": "3397fb623bb10effc17bec7a201b4b5b", 8 | "packages": [], 9 | "packages-dev": [ 10 | { 11 | "name": "composer/pcre", 12 | "version": "1.0.1", 13 | "source": { 14 | "type": "git", 15 | "url": "https://github.com/composer/pcre.git", 16 | "reference": "67a32d7d6f9f560b726ab25a061b38ff3a80c560" 17 | }, 18 | "dist": { 19 | "type": "zip", 20 | "url": "https://api.github.com/repos/composer/pcre/zipball/67a32d7d6f9f560b726ab25a061b38ff3a80c560", 21 | "reference": "67a32d7d6f9f560b726ab25a061b38ff3a80c560", 22 | "shasum": "" 23 | }, 24 | "require": { 25 | "php": "^5.3.2 || ^7.0 || ^8.0" 26 | }, 27 | "require-dev": { 28 | "phpstan/phpstan": "^1.3", 29 | "phpstan/phpstan-strict-rules": "^1.1", 30 | "symfony/phpunit-bridge": "^4.2 || ^5" 31 | }, 32 | "type": "library", 33 | "extra": { 34 | "branch-alias": { 35 | "dev-main": "1.x-dev" 36 | } 37 | }, 38 | "autoload": { 39 | "psr-4": { 40 | "Composer\\Pcre\\": "src" 41 | } 42 | }, 43 | "notification-url": "https://packagist.org/downloads/", 44 | "license": [ 45 | "MIT" 46 | ], 47 | "authors": [ 48 | { 49 | "name": "Jordi Boggiano", 50 | "email": "j.boggiano@seld.be", 51 | "homepage": "http://seld.be" 52 | } 53 | ], 54 | "description": "PCRE wrapping library that offers type-safe preg_* replacements.", 55 | "keywords": [ 56 | "PCRE", 57 | "preg", 58 | "regex", 59 | "regular expression" 60 | ], 61 | "time": "2022-01-21T20:24:37+00:00" 62 | }, 63 | { 64 | "name": "composer/semver", 65 | "version": "3.2.9", 66 | "source": { 67 | "type": "git", 68 | "url": "https://github.com/composer/semver.git", 69 | "reference": "a951f614bd64dcd26137bc9b7b2637ddcfc57649" 70 | }, 71 | "dist": { 72 | "type": "zip", 73 | "url": "https://api.github.com/repos/composer/semver/zipball/a951f614bd64dcd26137bc9b7b2637ddcfc57649", 74 | "reference": "a951f614bd64dcd26137bc9b7b2637ddcfc57649", 75 | "shasum": "" 76 | }, 77 | "require": { 78 | "php": "^5.3.2 || ^7.0 || ^8.0" 79 | }, 80 | "require-dev": { 81 | "phpstan/phpstan": "^1.4", 82 | "symfony/phpunit-bridge": "^4.2 || ^5" 83 | }, 84 | "type": "library", 85 | "extra": { 86 | "branch-alias": { 87 | "dev-main": "3.x-dev" 88 | } 89 | }, 90 | "autoload": { 91 | "psr-4": { 92 | "Composer\\Semver\\": "src" 93 | } 94 | }, 95 | "notification-url": "https://packagist.org/downloads/", 96 | "license": [ 97 | "MIT" 98 | ], 99 | "authors": [ 100 | { 101 | "name": "Nils Adermann", 102 | "email": "naderman@naderman.de", 103 | "homepage": "http://www.naderman.de" 104 | }, 105 | { 106 | "name": "Jordi Boggiano", 107 | "email": "j.boggiano@seld.be", 108 | "homepage": "http://seld.be" 109 | }, 110 | { 111 | "name": "Rob Bast", 112 | "email": "rob.bast@gmail.com", 113 | "homepage": "http://robbast.nl" 114 | } 115 | ], 116 | "description": "Semver library that offers utilities, version constraint parsing and validation.", 117 | "keywords": [ 118 | "semantic", 119 | "semver", 120 | "validation", 121 | "versioning" 122 | ], 123 | "time": "2022-02-04T13:58:43+00:00" 124 | }, 125 | { 126 | "name": "composer/xdebug-handler", 127 | "version": "2.0.5", 128 | "source": { 129 | "type": "git", 130 | "url": "https://github.com/composer/xdebug-handler.git", 131 | "reference": "9e36aeed4616366d2b690bdce11f71e9178c579a" 132 | }, 133 | "dist": { 134 | "type": "zip", 135 | "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/9e36aeed4616366d2b690bdce11f71e9178c579a", 136 | "reference": "9e36aeed4616366d2b690bdce11f71e9178c579a", 137 | "shasum": "" 138 | }, 139 | "require": { 140 | "composer/pcre": "^1", 141 | "php": "^5.3.2 || ^7.0 || ^8.0", 142 | "psr/log": "^1 || ^2 || ^3" 143 | }, 144 | "require-dev": { 145 | "phpstan/phpstan": "^1.0", 146 | "phpstan/phpstan-strict-rules": "^1.1", 147 | "symfony/phpunit-bridge": "^4.2 || ^5.0 || ^6.0" 148 | }, 149 | "type": "library", 150 | "autoload": { 151 | "psr-4": { 152 | "Composer\\XdebugHandler\\": "src" 153 | } 154 | }, 155 | "notification-url": "https://packagist.org/downloads/", 156 | "license": [ 157 | "MIT" 158 | ], 159 | "authors": [ 160 | { 161 | "name": "John Stevenson", 162 | "email": "john-stevenson@blueyonder.co.uk" 163 | } 164 | ], 165 | "description": "Restarts a process without Xdebug.", 166 | "keywords": [ 167 | "Xdebug", 168 | "performance" 169 | ], 170 | "time": "2022-02-24T20:20:32+00:00" 171 | }, 172 | { 173 | "name": "doctrine/annotations", 174 | "version": "v1.4.0", 175 | "source": { 176 | "type": "git", 177 | "url": "https://github.com/doctrine/annotations.git", 178 | "reference": "54cacc9b81758b14e3ce750f205a393d52339e97" 179 | }, 180 | "dist": { 181 | "type": "zip", 182 | "url": "https://api.github.com/repos/doctrine/annotations/zipball/54cacc9b81758b14e3ce750f205a393d52339e97", 183 | "reference": "54cacc9b81758b14e3ce750f205a393d52339e97", 184 | "shasum": "" 185 | }, 186 | "require": { 187 | "doctrine/lexer": "1.*", 188 | "php": "^5.6 || ^7.0" 189 | }, 190 | "require-dev": { 191 | "doctrine/cache": "1.*", 192 | "phpunit/phpunit": "^5.7" 193 | }, 194 | "type": "library", 195 | "extra": { 196 | "branch-alias": { 197 | "dev-master": "1.4.x-dev" 198 | } 199 | }, 200 | "autoload": { 201 | "psr-4": { 202 | "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" 203 | } 204 | }, 205 | "notification-url": "https://packagist.org/downloads/", 206 | "license": [ 207 | "MIT" 208 | ], 209 | "authors": [ 210 | { 211 | "name": "Roman Borschel", 212 | "email": "roman@code-factory.org" 213 | }, 214 | { 215 | "name": "Benjamin Eberlei", 216 | "email": "kontakt@beberlei.de" 217 | }, 218 | { 219 | "name": "Guilherme Blanco", 220 | "email": "guilhermeblanco@gmail.com" 221 | }, 222 | { 223 | "name": "Jonathan Wage", 224 | "email": "jonwage@gmail.com" 225 | }, 226 | { 227 | "name": "Johannes Schmitt", 228 | "email": "schmittjoh@gmail.com" 229 | } 230 | ], 231 | "description": "Docblock Annotations Parser", 232 | "homepage": "http://www.doctrine-project.org", 233 | "keywords": [ 234 | "annotations", 235 | "docblock", 236 | "parser" 237 | ], 238 | "time": "2017-02-24T16:22:25+00:00" 239 | }, 240 | { 241 | "name": "doctrine/lexer", 242 | "version": "1.0.2", 243 | "source": { 244 | "type": "git", 245 | "url": "https://github.com/doctrine/lexer.git", 246 | "reference": "1febd6c3ef84253d7c815bed85fc622ad207a9f8" 247 | }, 248 | "dist": { 249 | "type": "zip", 250 | "url": "https://api.github.com/repos/doctrine/lexer/zipball/1febd6c3ef84253d7c815bed85fc622ad207a9f8", 251 | "reference": "1febd6c3ef84253d7c815bed85fc622ad207a9f8", 252 | "shasum": "" 253 | }, 254 | "require": { 255 | "php": ">=5.3.2" 256 | }, 257 | "require-dev": { 258 | "phpunit/phpunit": "^4.5" 259 | }, 260 | "type": "library", 261 | "extra": { 262 | "branch-alias": { 263 | "dev-master": "1.0.x-dev" 264 | } 265 | }, 266 | "autoload": { 267 | "psr-4": { 268 | "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer" 269 | } 270 | }, 271 | "notification-url": "https://packagist.org/downloads/", 272 | "license": [ 273 | "MIT" 274 | ], 275 | "authors": [ 276 | { 277 | "name": "Roman Borschel", 278 | "email": "roman@code-factory.org" 279 | }, 280 | { 281 | "name": "Guilherme Blanco", 282 | "email": "guilhermeblanco@gmail.com" 283 | }, 284 | { 285 | "name": "Johannes Schmitt", 286 | "email": "schmittjoh@gmail.com" 287 | } 288 | ], 289 | "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", 290 | "homepage": "https://www.doctrine-project.org/projects/lexer.html", 291 | "keywords": [ 292 | "annotations", 293 | "docblock", 294 | "lexer", 295 | "parser", 296 | "php" 297 | ], 298 | "time": "2019-06-08T11:03:04+00:00" 299 | }, 300 | { 301 | "name": "friendsofphp/php-cs-fixer", 302 | "version": "v2.19.3", 303 | "source": { 304 | "type": "git", 305 | "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git", 306 | "reference": "75ac86f33fab4714ea5a39a396784d83ae3b5ed8" 307 | }, 308 | "dist": { 309 | "type": "zip", 310 | "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/75ac86f33fab4714ea5a39a396784d83ae3b5ed8", 311 | "reference": "75ac86f33fab4714ea5a39a396784d83ae3b5ed8", 312 | "shasum": "" 313 | }, 314 | "require": { 315 | "composer/semver": "^1.4 || ^2.0 || ^3.0", 316 | "composer/xdebug-handler": "^1.2 || ^2.0", 317 | "doctrine/annotations": "^1.2", 318 | "ext-json": "*", 319 | "ext-tokenizer": "*", 320 | "php": "^5.6 || ^7.0 || ^8.0", 321 | "php-cs-fixer/diff": "^1.3", 322 | "symfony/console": "^3.4.43 || ^4.1.6 || ^5.0", 323 | "symfony/event-dispatcher": "^3.0 || ^4.0 || ^5.0", 324 | "symfony/filesystem": "^3.0 || ^4.0 || ^5.0", 325 | "symfony/finder": "^3.0 || ^4.0 || ^5.0", 326 | "symfony/options-resolver": "^3.0 || ^4.0 || ^5.0", 327 | "symfony/polyfill-php70": "^1.0", 328 | "symfony/polyfill-php72": "^1.4", 329 | "symfony/process": "^3.0 || ^4.0 || ^5.0", 330 | "symfony/stopwatch": "^3.0 || ^4.0 || ^5.0" 331 | }, 332 | "require-dev": { 333 | "justinrainbow/json-schema": "^5.0", 334 | "keradus/cli-executor": "^1.4", 335 | "mikey179/vfsstream": "^1.6", 336 | "php-coveralls/php-coveralls": "^2.4.2", 337 | "php-cs-fixer/accessible-object": "^1.0", 338 | "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.2", 339 | "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.2.1", 340 | "phpspec/prophecy-phpunit": "^1.1 || ^2.0", 341 | "phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.13 || ^9.5", 342 | "phpunitgoodpractices/polyfill": "^1.5", 343 | "phpunitgoodpractices/traits": "^1.9.1", 344 | "sanmai/phpunit-legacy-adapter": "^6.4 || ^8.2.1", 345 | "symfony/phpunit-bridge": "^5.2.1", 346 | "symfony/yaml": "^3.0 || ^4.0 || ^5.0" 347 | }, 348 | "suggest": { 349 | "ext-dom": "For handling output formats in XML", 350 | "ext-mbstring": "For handling non-UTF8 characters.", 351 | "php-cs-fixer/phpunit-constraint-isidenticalstring": "For IsIdenticalString constraint.", 352 | "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "For XmlMatchesXsd constraint.", 353 | "symfony/polyfill-mbstring": "When enabling `ext-mbstring` is not possible." 354 | }, 355 | "bin": [ 356 | "php-cs-fixer" 357 | ], 358 | "type": "application", 359 | "extra": { 360 | "branch-alias": { 361 | "dev-master": "2.19-dev" 362 | } 363 | }, 364 | "autoload": { 365 | "psr-4": { 366 | "PhpCsFixer\\": "src/" 367 | }, 368 | "classmap": [ 369 | "tests/Test/AbstractFixerTestCase.php", 370 | "tests/Test/AbstractIntegrationCaseFactory.php", 371 | "tests/Test/AbstractIntegrationTestCase.php", 372 | "tests/Test/Assert/AssertTokensTrait.php", 373 | "tests/Test/IntegrationCase.php", 374 | "tests/Test/IntegrationCaseFactory.php", 375 | "tests/Test/IntegrationCaseFactoryInterface.php", 376 | "tests/Test/InternalIntegrationCaseFactory.php", 377 | "tests/Test/IsIdenticalConstraint.php", 378 | "tests/Test/TokensWithObservedTransformers.php", 379 | "tests/TestCase.php" 380 | ] 381 | }, 382 | "notification-url": "https://packagist.org/downloads/", 383 | "license": [ 384 | "MIT" 385 | ], 386 | "authors": [ 387 | { 388 | "name": "Fabien Potencier", 389 | "email": "fabien@symfony.com" 390 | }, 391 | { 392 | "name": "Dariusz Rumiński", 393 | "email": "dariusz.ruminski@gmail.com" 394 | } 395 | ], 396 | "description": "A tool to automatically fix PHP code style", 397 | "time": "2021-11-15T17:17:55+00:00" 398 | }, 399 | { 400 | "name": "nikic/php-parser", 401 | "version": "v3.1.5", 402 | "source": { 403 | "type": "git", 404 | "url": "https://github.com/nikic/PHP-Parser.git", 405 | "reference": "bb87e28e7d7b8d9a7fda231d37457c9210faf6ce" 406 | }, 407 | "dist": { 408 | "type": "zip", 409 | "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/bb87e28e7d7b8d9a7fda231d37457c9210faf6ce", 410 | "reference": "bb87e28e7d7b8d9a7fda231d37457c9210faf6ce", 411 | "shasum": "" 412 | }, 413 | "require": { 414 | "ext-tokenizer": "*", 415 | "php": ">=5.5" 416 | }, 417 | "require-dev": { 418 | "phpunit/phpunit": "~4.0|~5.0" 419 | }, 420 | "bin": [ 421 | "bin/php-parse" 422 | ], 423 | "type": "library", 424 | "extra": { 425 | "branch-alias": { 426 | "dev-master": "3.0-dev" 427 | } 428 | }, 429 | "autoload": { 430 | "psr-4": { 431 | "PhpParser\\": "lib/PhpParser" 432 | } 433 | }, 434 | "notification-url": "https://packagist.org/downloads/", 435 | "license": [ 436 | "BSD-3-Clause" 437 | ], 438 | "authors": [ 439 | { 440 | "name": "Nikita Popov" 441 | } 442 | ], 443 | "description": "A PHP parser written in PHP", 444 | "keywords": [ 445 | "parser", 446 | "php" 447 | ], 448 | "time": "2018-02-28T20:30:58+00:00" 449 | }, 450 | { 451 | "name": "paragonie/random_compat", 452 | "version": "v2.0.21", 453 | "source": { 454 | "type": "git", 455 | "url": "https://github.com/paragonie/random_compat.git", 456 | "reference": "96c132c7f2f7bc3230723b66e89f8f150b29d5ae" 457 | }, 458 | "dist": { 459 | "type": "zip", 460 | "url": "https://api.github.com/repos/paragonie/random_compat/zipball/96c132c7f2f7bc3230723b66e89f8f150b29d5ae", 461 | "reference": "96c132c7f2f7bc3230723b66e89f8f150b29d5ae", 462 | "shasum": "" 463 | }, 464 | "require": { 465 | "php": ">=5.2.0" 466 | }, 467 | "require-dev": { 468 | "phpunit/phpunit": "*" 469 | }, 470 | "suggest": { 471 | "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." 472 | }, 473 | "type": "library", 474 | "autoload": { 475 | "files": [ 476 | "lib/random.php" 477 | ] 478 | }, 479 | "notification-url": "https://packagist.org/downloads/", 480 | "license": [ 481 | "MIT" 482 | ], 483 | "authors": [ 484 | { 485 | "name": "Paragon Initiative Enterprises", 486 | "email": "security@paragonie.com", 487 | "homepage": "https://paragonie.com" 488 | } 489 | ], 490 | "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", 491 | "keywords": [ 492 | "csprng", 493 | "polyfill", 494 | "pseudorandom", 495 | "random" 496 | ], 497 | "time": "2022-02-16T17:07:03+00:00" 498 | }, 499 | { 500 | "name": "php-cs-fixer/diff", 501 | "version": "v1.3.1", 502 | "source": { 503 | "type": "git", 504 | "url": "https://github.com/PHP-CS-Fixer/diff.git", 505 | "reference": "dbd31aeb251639ac0b9e7e29405c1441907f5759" 506 | }, 507 | "dist": { 508 | "type": "zip", 509 | "url": "https://api.github.com/repos/PHP-CS-Fixer/diff/zipball/dbd31aeb251639ac0b9e7e29405c1441907f5759", 510 | "reference": "dbd31aeb251639ac0b9e7e29405c1441907f5759", 511 | "shasum": "" 512 | }, 513 | "require": { 514 | "php": "^5.6 || ^7.0 || ^8.0" 515 | }, 516 | "require-dev": { 517 | "phpunit/phpunit": "^5.7.23 || ^6.4.3 || ^7.0", 518 | "symfony/process": "^3.3" 519 | }, 520 | "type": "library", 521 | "autoload": { 522 | "classmap": [ 523 | "src/" 524 | ] 525 | }, 526 | "notification-url": "https://packagist.org/downloads/", 527 | "license": [ 528 | "BSD-3-Clause" 529 | ], 530 | "authors": [ 531 | { 532 | "name": "Sebastian Bergmann", 533 | "email": "sebastian@phpunit.de" 534 | }, 535 | { 536 | "name": "Kore Nordmann", 537 | "email": "mail@kore-nordmann.de" 538 | }, 539 | { 540 | "name": "SpacePossum" 541 | } 542 | ], 543 | "description": "sebastian/diff v2 backport support for PHP5.6", 544 | "homepage": "https://github.com/PHP-CS-Fixer", 545 | "keywords": [ 546 | "diff" 547 | ], 548 | "time": "2020-10-14T08:39:05+00:00" 549 | }, 550 | { 551 | "name": "prestashop/autoindex", 552 | "version": "v1.0.0", 553 | "source": { 554 | "type": "git", 555 | "url": "https://github.com/PrestaShopCorp/autoindex.git", 556 | "reference": "92e10242f94a99163dece280f6bd7b7c2b79c158" 557 | }, 558 | "dist": { 559 | "type": "zip", 560 | "url": "https://api.github.com/repos/PrestaShopCorp/autoindex/zipball/92e10242f94a99163dece280f6bd7b7c2b79c158", 561 | "reference": "92e10242f94a99163dece280f6bd7b7c2b79c158", 562 | "shasum": "" 563 | }, 564 | "require": { 565 | "nikic/php-parser": "^3.1", 566 | "php": ">=5.6", 567 | "symfony/console": "^3.4", 568 | "symfony/finder": "^3.4" 569 | }, 570 | "bin": [ 571 | "bin/autoindex" 572 | ], 573 | "type": "library", 574 | "autoload": { 575 | "psr-4": { 576 | "PrestaShop\\AutoIndex\\": "src/" 577 | } 578 | }, 579 | "notification-url": "https://packagist.org/downloads/", 580 | "license": [ 581 | "AFL-3.0" 582 | ], 583 | "authors": [ 584 | { 585 | "name": "PrestaShop SA", 586 | "email": "contact@prestashop.com" 587 | } 588 | ], 589 | "description": "Automatically add an 'index.php' in all the current or specified directories and all sub-directories.", 590 | "homepage": "https://github.com/PrestaShopCorp/autoindex", 591 | "time": "2020-03-11T13:37:03+00:00" 592 | }, 593 | { 594 | "name": "prestashop/header-stamp", 595 | "version": "v1.7", 596 | "source": { 597 | "type": "git", 598 | "url": "https://github.com/PrestaShopCorp/header-stamp.git", 599 | "reference": "d77ce6d0a7f066670a4774be88f05e5f07b4b6fc" 600 | }, 601 | "dist": { 602 | "type": "zip", 603 | "url": "https://api.github.com/repos/PrestaShopCorp/header-stamp/zipball/d77ce6d0a7f066670a4774be88f05e5f07b4b6fc", 604 | "reference": "d77ce6d0a7f066670a4774be88f05e5f07b4b6fc", 605 | "shasum": "" 606 | }, 607 | "require": { 608 | "nikic/php-parser": "^3.1", 609 | "php": ">=5.6", 610 | "symfony/console": "^3.4 || ~4.0 || ~5.0", 611 | "symfony/finder": "^3.4 || ~4.0 || ~5.0" 612 | }, 613 | "require-dev": { 614 | "prestashop/php-dev-tools": "1.*" 615 | }, 616 | "bin": [ 617 | "bin/header-stamp" 618 | ], 619 | "type": "library", 620 | "autoload": { 621 | "psr-4": { 622 | "PrestaShop\\HeaderStamp\\": "src/" 623 | } 624 | }, 625 | "notification-url": "https://packagist.org/downloads/", 626 | "license": [ 627 | "AFL-3.0" 628 | ], 629 | "authors": [ 630 | { 631 | "name": "PrestaShop SA", 632 | "email": "contact@prestashop.com" 633 | } 634 | ], 635 | "description": "Rewrite your file headers to add the license or to make them up-to-date", 636 | "homepage": "https://github.com/PrestaShopCorp/header-stamp", 637 | "time": "2020-12-09T16:40:38+00:00" 638 | }, 639 | { 640 | "name": "prestashop/php-dev-tools", 641 | "version": "v3.16.1", 642 | "source": { 643 | "type": "git", 644 | "url": "https://github.com/PrestaShop/php-dev-tools.git", 645 | "reference": "785108c29ef6f580930372d88b8f551740fdee98" 646 | }, 647 | "dist": { 648 | "type": "zip", 649 | "url": "https://api.github.com/repos/PrestaShop/php-dev-tools/zipball/785108c29ef6f580930372d88b8f551740fdee98", 650 | "reference": "785108c29ef6f580930372d88b8f551740fdee98", 651 | "shasum": "" 652 | }, 653 | "require": { 654 | "friendsofphp/php-cs-fixer": "^2.14", 655 | "php": ">=5.6.0", 656 | "prestashop/autoindex": "^1.0", 657 | "prestashop/header-stamp": "^1.0", 658 | "squizlabs/php_codesniffer": "^3.4", 659 | "symfony/console": "~3.2 || ~4.0 || ~5.0", 660 | "symfony/filesystem": "~3.2 || ~4.0 || ~5.0" 661 | }, 662 | "conflict": { 663 | "friendsofphp/php-cs-fixer": "2.18.3" 664 | }, 665 | "bin": [ 666 | "bin/prestashop-coding-standards" 667 | ], 668 | "type": "library", 669 | "autoload": { 670 | "psr-4": { 671 | "PrestaShop\\CodingStandards\\": "src/" 672 | } 673 | }, 674 | "notification-url": "https://packagist.org/downloads/", 675 | "license": [ 676 | "MIT" 677 | ], 678 | "description": "PrestaShop coding standards", 679 | "time": "2021-10-18T07:48:21+00:00" 680 | }, 681 | { 682 | "name": "psr/log", 683 | "version": "1.1.4", 684 | "source": { 685 | "type": "git", 686 | "url": "https://github.com/php-fig/log.git", 687 | "reference": "d49695b909c3b7628b6289db5479a1c204601f11" 688 | }, 689 | "dist": { 690 | "type": "zip", 691 | "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", 692 | "reference": "d49695b909c3b7628b6289db5479a1c204601f11", 693 | "shasum": "" 694 | }, 695 | "require": { 696 | "php": ">=5.3.0" 697 | }, 698 | "type": "library", 699 | "extra": { 700 | "branch-alias": { 701 | "dev-master": "1.1.x-dev" 702 | } 703 | }, 704 | "autoload": { 705 | "psr-4": { 706 | "Psr\\Log\\": "Psr/Log/" 707 | } 708 | }, 709 | "notification-url": "https://packagist.org/downloads/", 710 | "license": [ 711 | "MIT" 712 | ], 713 | "authors": [ 714 | { 715 | "name": "PHP-FIG", 716 | "homepage": "https://www.php-fig.org/" 717 | } 718 | ], 719 | "description": "Common interface for logging libraries", 720 | "homepage": "https://github.com/php-fig/log", 721 | "keywords": [ 722 | "log", 723 | "psr", 724 | "psr-3" 725 | ], 726 | "time": "2021-05-03T11:20:27+00:00" 727 | }, 728 | { 729 | "name": "squizlabs/php_codesniffer", 730 | "version": "3.6.2", 731 | "source": { 732 | "type": "git", 733 | "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", 734 | "reference": "5e4e71592f69da17871dba6e80dd51bce74a351a" 735 | }, 736 | "dist": { 737 | "type": "zip", 738 | "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/5e4e71592f69da17871dba6e80dd51bce74a351a", 739 | "reference": "5e4e71592f69da17871dba6e80dd51bce74a351a", 740 | "shasum": "" 741 | }, 742 | "require": { 743 | "ext-simplexml": "*", 744 | "ext-tokenizer": "*", 745 | "ext-xmlwriter": "*", 746 | "php": ">=5.4.0" 747 | }, 748 | "require-dev": { 749 | "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" 750 | }, 751 | "bin": [ 752 | "bin/phpcs", 753 | "bin/phpcbf" 754 | ], 755 | "type": "library", 756 | "extra": { 757 | "branch-alias": { 758 | "dev-master": "3.x-dev" 759 | } 760 | }, 761 | "notification-url": "https://packagist.org/downloads/", 762 | "license": [ 763 | "BSD-3-Clause" 764 | ], 765 | "authors": [ 766 | { 767 | "name": "Greg Sherwood", 768 | "role": "lead" 769 | } 770 | ], 771 | "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", 772 | "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", 773 | "keywords": [ 774 | "phpcs", 775 | "standards" 776 | ], 777 | "time": "2021-12-12T21:44:58+00:00" 778 | }, 779 | { 780 | "name": "symfony/console", 781 | "version": "v3.4.47", 782 | "source": { 783 | "type": "git", 784 | "url": "https://github.com/symfony/console.git", 785 | "reference": "a10b1da6fc93080c180bba7219b5ff5b7518fe81" 786 | }, 787 | "dist": { 788 | "type": "zip", 789 | "url": "https://api.github.com/repos/symfony/console/zipball/a10b1da6fc93080c180bba7219b5ff5b7518fe81", 790 | "reference": "a10b1da6fc93080c180bba7219b5ff5b7518fe81", 791 | "shasum": "" 792 | }, 793 | "require": { 794 | "php": "^5.5.9|>=7.0.8", 795 | "symfony/debug": "~2.8|~3.0|~4.0", 796 | "symfony/polyfill-mbstring": "~1.0" 797 | }, 798 | "conflict": { 799 | "symfony/dependency-injection": "<3.4", 800 | "symfony/process": "<3.3" 801 | }, 802 | "provide": { 803 | "psr/log-implementation": "1.0" 804 | }, 805 | "require-dev": { 806 | "psr/log": "~1.0", 807 | "symfony/config": "~3.3|~4.0", 808 | "symfony/dependency-injection": "~3.4|~4.0", 809 | "symfony/event-dispatcher": "~2.8|~3.0|~4.0", 810 | "symfony/lock": "~3.4|~4.0", 811 | "symfony/process": "~3.3|~4.0" 812 | }, 813 | "suggest": { 814 | "psr/log": "For using the console logger", 815 | "symfony/event-dispatcher": "", 816 | "symfony/lock": "", 817 | "symfony/process": "" 818 | }, 819 | "type": "library", 820 | "autoload": { 821 | "psr-4": { 822 | "Symfony\\Component\\Console\\": "" 823 | }, 824 | "exclude-from-classmap": [ 825 | "/Tests/" 826 | ] 827 | }, 828 | "notification-url": "https://packagist.org/downloads/", 829 | "license": [ 830 | "MIT" 831 | ], 832 | "authors": [ 833 | { 834 | "name": "Fabien Potencier", 835 | "email": "fabien@symfony.com" 836 | }, 837 | { 838 | "name": "Symfony Community", 839 | "homepage": "https://symfony.com/contributors" 840 | } 841 | ], 842 | "description": "Symfony Console Component", 843 | "homepage": "https://symfony.com", 844 | "time": "2020-10-24T10:57:07+00:00" 845 | }, 846 | { 847 | "name": "symfony/debug", 848 | "version": "v3.4.47", 849 | "source": { 850 | "type": "git", 851 | "url": "https://github.com/symfony/debug.git", 852 | "reference": "ab42889de57fdfcfcc0759ab102e2fd4ea72dcae" 853 | }, 854 | "dist": { 855 | "type": "zip", 856 | "url": "https://api.github.com/repos/symfony/debug/zipball/ab42889de57fdfcfcc0759ab102e2fd4ea72dcae", 857 | "reference": "ab42889de57fdfcfcc0759ab102e2fd4ea72dcae", 858 | "shasum": "" 859 | }, 860 | "require": { 861 | "php": "^5.5.9|>=7.0.8", 862 | "psr/log": "~1.0" 863 | }, 864 | "conflict": { 865 | "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" 866 | }, 867 | "require-dev": { 868 | "symfony/http-kernel": "~2.8|~3.0|~4.0" 869 | }, 870 | "type": "library", 871 | "autoload": { 872 | "psr-4": { 873 | "Symfony\\Component\\Debug\\": "" 874 | }, 875 | "exclude-from-classmap": [ 876 | "/Tests/" 877 | ] 878 | }, 879 | "notification-url": "https://packagist.org/downloads/", 880 | "license": [ 881 | "MIT" 882 | ], 883 | "authors": [ 884 | { 885 | "name": "Fabien Potencier", 886 | "email": "fabien@symfony.com" 887 | }, 888 | { 889 | "name": "Symfony Community", 890 | "homepage": "https://symfony.com/contributors" 891 | } 892 | ], 893 | "description": "Symfony Debug Component", 894 | "homepage": "https://symfony.com", 895 | "time": "2020-10-24T10:57:07+00:00" 896 | }, 897 | { 898 | "name": "symfony/event-dispatcher", 899 | "version": "v3.4.47", 900 | "source": { 901 | "type": "git", 902 | "url": "https://github.com/symfony/event-dispatcher.git", 903 | "reference": "31fde73757b6bad247c54597beef974919ec6860" 904 | }, 905 | "dist": { 906 | "type": "zip", 907 | "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/31fde73757b6bad247c54597beef974919ec6860", 908 | "reference": "31fde73757b6bad247c54597beef974919ec6860", 909 | "shasum": "" 910 | }, 911 | "require": { 912 | "php": "^5.5.9|>=7.0.8" 913 | }, 914 | "conflict": { 915 | "symfony/dependency-injection": "<3.3" 916 | }, 917 | "require-dev": { 918 | "psr/log": "~1.0", 919 | "symfony/config": "~2.8|~3.0|~4.0", 920 | "symfony/debug": "~3.4|~4.4", 921 | "symfony/dependency-injection": "~3.3|~4.0", 922 | "symfony/expression-language": "~2.8|~3.0|~4.0", 923 | "symfony/stopwatch": "~2.8|~3.0|~4.0" 924 | }, 925 | "suggest": { 926 | "symfony/dependency-injection": "", 927 | "symfony/http-kernel": "" 928 | }, 929 | "type": "library", 930 | "autoload": { 931 | "psr-4": { 932 | "Symfony\\Component\\EventDispatcher\\": "" 933 | }, 934 | "exclude-from-classmap": [ 935 | "/Tests/" 936 | ] 937 | }, 938 | "notification-url": "https://packagist.org/downloads/", 939 | "license": [ 940 | "MIT" 941 | ], 942 | "authors": [ 943 | { 944 | "name": "Fabien Potencier", 945 | "email": "fabien@symfony.com" 946 | }, 947 | { 948 | "name": "Symfony Community", 949 | "homepage": "https://symfony.com/contributors" 950 | } 951 | ], 952 | "description": "Symfony EventDispatcher Component", 953 | "homepage": "https://symfony.com", 954 | "time": "2020-10-24T10:57:07+00:00" 955 | }, 956 | { 957 | "name": "symfony/filesystem", 958 | "version": "v3.4.47", 959 | "source": { 960 | "type": "git", 961 | "url": "https://github.com/symfony/filesystem.git", 962 | "reference": "e58d7841cddfed6e846829040dca2cca0ebbbbb3" 963 | }, 964 | "dist": { 965 | "type": "zip", 966 | "url": "https://api.github.com/repos/symfony/filesystem/zipball/e58d7841cddfed6e846829040dca2cca0ebbbbb3", 967 | "reference": "e58d7841cddfed6e846829040dca2cca0ebbbbb3", 968 | "shasum": "" 969 | }, 970 | "require": { 971 | "php": "^5.5.9|>=7.0.8", 972 | "symfony/polyfill-ctype": "~1.8" 973 | }, 974 | "type": "library", 975 | "autoload": { 976 | "psr-4": { 977 | "Symfony\\Component\\Filesystem\\": "" 978 | }, 979 | "exclude-from-classmap": [ 980 | "/Tests/" 981 | ] 982 | }, 983 | "notification-url": "https://packagist.org/downloads/", 984 | "license": [ 985 | "MIT" 986 | ], 987 | "authors": [ 988 | { 989 | "name": "Fabien Potencier", 990 | "email": "fabien@symfony.com" 991 | }, 992 | { 993 | "name": "Symfony Community", 994 | "homepage": "https://symfony.com/contributors" 995 | } 996 | ], 997 | "description": "Symfony Filesystem Component", 998 | "homepage": "https://symfony.com", 999 | "time": "2020-10-24T10:57:07+00:00" 1000 | }, 1001 | { 1002 | "name": "symfony/finder", 1003 | "version": "v3.4.47", 1004 | "source": { 1005 | "type": "git", 1006 | "url": "https://github.com/symfony/finder.git", 1007 | "reference": "b6b6ad3db3edb1b4b1c1896b1975fb684994de6e" 1008 | }, 1009 | "dist": { 1010 | "type": "zip", 1011 | "url": "https://api.github.com/repos/symfony/finder/zipball/b6b6ad3db3edb1b4b1c1896b1975fb684994de6e", 1012 | "reference": "b6b6ad3db3edb1b4b1c1896b1975fb684994de6e", 1013 | "shasum": "" 1014 | }, 1015 | "require": { 1016 | "php": "^5.5.9|>=7.0.8" 1017 | }, 1018 | "type": "library", 1019 | "autoload": { 1020 | "psr-4": { 1021 | "Symfony\\Component\\Finder\\": "" 1022 | }, 1023 | "exclude-from-classmap": [ 1024 | "/Tests/" 1025 | ] 1026 | }, 1027 | "notification-url": "https://packagist.org/downloads/", 1028 | "license": [ 1029 | "MIT" 1030 | ], 1031 | "authors": [ 1032 | { 1033 | "name": "Fabien Potencier", 1034 | "email": "fabien@symfony.com" 1035 | }, 1036 | { 1037 | "name": "Symfony Community", 1038 | "homepage": "https://symfony.com/contributors" 1039 | } 1040 | ], 1041 | "description": "Symfony Finder Component", 1042 | "homepage": "https://symfony.com", 1043 | "time": "2020-11-16T17:02:08+00:00" 1044 | }, 1045 | { 1046 | "name": "symfony/options-resolver", 1047 | "version": "v3.4.47", 1048 | "source": { 1049 | "type": "git", 1050 | "url": "https://github.com/symfony/options-resolver.git", 1051 | "reference": "c7efc97a47b2ebaabc19d5b6c6b50f5c37c92744" 1052 | }, 1053 | "dist": { 1054 | "type": "zip", 1055 | "url": "https://api.github.com/repos/symfony/options-resolver/zipball/c7efc97a47b2ebaabc19d5b6c6b50f5c37c92744", 1056 | "reference": "c7efc97a47b2ebaabc19d5b6c6b50f5c37c92744", 1057 | "shasum": "" 1058 | }, 1059 | "require": { 1060 | "php": "^5.5.9|>=7.0.8" 1061 | }, 1062 | "type": "library", 1063 | "autoload": { 1064 | "psr-4": { 1065 | "Symfony\\Component\\OptionsResolver\\": "" 1066 | }, 1067 | "exclude-from-classmap": [ 1068 | "/Tests/" 1069 | ] 1070 | }, 1071 | "notification-url": "https://packagist.org/downloads/", 1072 | "license": [ 1073 | "MIT" 1074 | ], 1075 | "authors": [ 1076 | { 1077 | "name": "Fabien Potencier", 1078 | "email": "fabien@symfony.com" 1079 | }, 1080 | { 1081 | "name": "Symfony Community", 1082 | "homepage": "https://symfony.com/contributors" 1083 | } 1084 | ], 1085 | "description": "Symfony OptionsResolver Component", 1086 | "homepage": "https://symfony.com", 1087 | "keywords": [ 1088 | "config", 1089 | "configuration", 1090 | "options" 1091 | ], 1092 | "time": "2020-10-24T10:57:07+00:00" 1093 | }, 1094 | { 1095 | "name": "symfony/polyfill-ctype", 1096 | "version": "v1.19.0", 1097 | "source": { 1098 | "type": "git", 1099 | "url": "https://github.com/symfony/polyfill-ctype.git", 1100 | "reference": "aed596913b70fae57be53d86faa2e9ef85a2297b" 1101 | }, 1102 | "dist": { 1103 | "type": "zip", 1104 | "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/aed596913b70fae57be53d86faa2e9ef85a2297b", 1105 | "reference": "aed596913b70fae57be53d86faa2e9ef85a2297b", 1106 | "shasum": "" 1107 | }, 1108 | "require": { 1109 | "php": ">=5.3.3" 1110 | }, 1111 | "suggest": { 1112 | "ext-ctype": "For best performance" 1113 | }, 1114 | "type": "library", 1115 | "extra": { 1116 | "branch-alias": { 1117 | "dev-main": "1.19-dev" 1118 | }, 1119 | "thanks": { 1120 | "name": "symfony/polyfill", 1121 | "url": "https://github.com/symfony/polyfill" 1122 | } 1123 | }, 1124 | "autoload": { 1125 | "psr-4": { 1126 | "Symfony\\Polyfill\\Ctype\\": "" 1127 | }, 1128 | "files": [ 1129 | "bootstrap.php" 1130 | ] 1131 | }, 1132 | "notification-url": "https://packagist.org/downloads/", 1133 | "license": [ 1134 | "MIT" 1135 | ], 1136 | "authors": [ 1137 | { 1138 | "name": "Gert de Pagter", 1139 | "email": "BackEndTea@gmail.com" 1140 | }, 1141 | { 1142 | "name": "Symfony Community", 1143 | "homepage": "https://symfony.com/contributors" 1144 | } 1145 | ], 1146 | "description": "Symfony polyfill for ctype functions", 1147 | "homepage": "https://symfony.com", 1148 | "keywords": [ 1149 | "compatibility", 1150 | "ctype", 1151 | "polyfill", 1152 | "portable" 1153 | ], 1154 | "time": "2020-10-23T09:01:57+00:00" 1155 | }, 1156 | { 1157 | "name": "symfony/polyfill-mbstring", 1158 | "version": "v1.19.0", 1159 | "source": { 1160 | "type": "git", 1161 | "url": "https://github.com/symfony/polyfill-mbstring.git", 1162 | "reference": "b5f7b932ee6fa802fc792eabd77c4c88084517ce" 1163 | }, 1164 | "dist": { 1165 | "type": "zip", 1166 | "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/b5f7b932ee6fa802fc792eabd77c4c88084517ce", 1167 | "reference": "b5f7b932ee6fa802fc792eabd77c4c88084517ce", 1168 | "shasum": "" 1169 | }, 1170 | "require": { 1171 | "php": ">=5.3.3" 1172 | }, 1173 | "suggest": { 1174 | "ext-mbstring": "For best performance" 1175 | }, 1176 | "type": "library", 1177 | "extra": { 1178 | "branch-alias": { 1179 | "dev-main": "1.19-dev" 1180 | }, 1181 | "thanks": { 1182 | "name": "symfony/polyfill", 1183 | "url": "https://github.com/symfony/polyfill" 1184 | } 1185 | }, 1186 | "autoload": { 1187 | "psr-4": { 1188 | "Symfony\\Polyfill\\Mbstring\\": "" 1189 | }, 1190 | "files": [ 1191 | "bootstrap.php" 1192 | ] 1193 | }, 1194 | "notification-url": "https://packagist.org/downloads/", 1195 | "license": [ 1196 | "MIT" 1197 | ], 1198 | "authors": [ 1199 | { 1200 | "name": "Nicolas Grekas", 1201 | "email": "p@tchwork.com" 1202 | }, 1203 | { 1204 | "name": "Symfony Community", 1205 | "homepage": "https://symfony.com/contributors" 1206 | } 1207 | ], 1208 | "description": "Symfony polyfill for the Mbstring extension", 1209 | "homepage": "https://symfony.com", 1210 | "keywords": [ 1211 | "compatibility", 1212 | "mbstring", 1213 | "polyfill", 1214 | "portable", 1215 | "shim" 1216 | ], 1217 | "time": "2020-10-23T09:01:57+00:00" 1218 | }, 1219 | { 1220 | "name": "symfony/polyfill-php70", 1221 | "version": "v1.19.0", 1222 | "source": { 1223 | "type": "git", 1224 | "url": "https://github.com/symfony/polyfill-php70.git", 1225 | "reference": "3fe414077251a81a1b15b1c709faf5c2fbae3d4e" 1226 | }, 1227 | "dist": { 1228 | "type": "zip", 1229 | "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/3fe414077251a81a1b15b1c709faf5c2fbae3d4e", 1230 | "reference": "3fe414077251a81a1b15b1c709faf5c2fbae3d4e", 1231 | "shasum": "" 1232 | }, 1233 | "require": { 1234 | "paragonie/random_compat": "~1.0|~2.0|~9.99", 1235 | "php": ">=5.3.3" 1236 | }, 1237 | "type": "library", 1238 | "extra": { 1239 | "branch-alias": { 1240 | "dev-main": "1.19-dev" 1241 | }, 1242 | "thanks": { 1243 | "name": "symfony/polyfill", 1244 | "url": "https://github.com/symfony/polyfill" 1245 | } 1246 | }, 1247 | "autoload": { 1248 | "psr-4": { 1249 | "Symfony\\Polyfill\\Php70\\": "" 1250 | }, 1251 | "files": [ 1252 | "bootstrap.php" 1253 | ], 1254 | "classmap": [ 1255 | "Resources/stubs" 1256 | ] 1257 | }, 1258 | "notification-url": "https://packagist.org/downloads/", 1259 | "license": [ 1260 | "MIT" 1261 | ], 1262 | "authors": [ 1263 | { 1264 | "name": "Nicolas Grekas", 1265 | "email": "p@tchwork.com" 1266 | }, 1267 | { 1268 | "name": "Symfony Community", 1269 | "homepage": "https://symfony.com/contributors" 1270 | } 1271 | ], 1272 | "description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions", 1273 | "homepage": "https://symfony.com", 1274 | "keywords": [ 1275 | "compatibility", 1276 | "polyfill", 1277 | "portable", 1278 | "shim" 1279 | ], 1280 | "time": "2020-10-23T09:01:57+00:00" 1281 | }, 1282 | { 1283 | "name": "symfony/polyfill-php72", 1284 | "version": "v1.19.0", 1285 | "source": { 1286 | "type": "git", 1287 | "url": "https://github.com/symfony/polyfill-php72.git", 1288 | "reference": "beecef6b463b06954638f02378f52496cb84bacc" 1289 | }, 1290 | "dist": { 1291 | "type": "zip", 1292 | "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/beecef6b463b06954638f02378f52496cb84bacc", 1293 | "reference": "beecef6b463b06954638f02378f52496cb84bacc", 1294 | "shasum": "" 1295 | }, 1296 | "require": { 1297 | "php": ">=5.3.3" 1298 | }, 1299 | "type": "library", 1300 | "extra": { 1301 | "branch-alias": { 1302 | "dev-main": "1.19-dev" 1303 | }, 1304 | "thanks": { 1305 | "name": "symfony/polyfill", 1306 | "url": "https://github.com/symfony/polyfill" 1307 | } 1308 | }, 1309 | "autoload": { 1310 | "psr-4": { 1311 | "Symfony\\Polyfill\\Php72\\": "" 1312 | }, 1313 | "files": [ 1314 | "bootstrap.php" 1315 | ] 1316 | }, 1317 | "notification-url": "https://packagist.org/downloads/", 1318 | "license": [ 1319 | "MIT" 1320 | ], 1321 | "authors": [ 1322 | { 1323 | "name": "Nicolas Grekas", 1324 | "email": "p@tchwork.com" 1325 | }, 1326 | { 1327 | "name": "Symfony Community", 1328 | "homepage": "https://symfony.com/contributors" 1329 | } 1330 | ], 1331 | "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", 1332 | "homepage": "https://symfony.com", 1333 | "keywords": [ 1334 | "compatibility", 1335 | "polyfill", 1336 | "portable", 1337 | "shim" 1338 | ], 1339 | "time": "2020-10-23T09:01:57+00:00" 1340 | }, 1341 | { 1342 | "name": "symfony/process", 1343 | "version": "v3.4.47", 1344 | "source": { 1345 | "type": "git", 1346 | "url": "https://github.com/symfony/process.git", 1347 | "reference": "b8648cf1d5af12a44a51d07ef9bf980921f15fca" 1348 | }, 1349 | "dist": { 1350 | "type": "zip", 1351 | "url": "https://api.github.com/repos/symfony/process/zipball/b8648cf1d5af12a44a51d07ef9bf980921f15fca", 1352 | "reference": "b8648cf1d5af12a44a51d07ef9bf980921f15fca", 1353 | "shasum": "" 1354 | }, 1355 | "require": { 1356 | "php": "^5.5.9|>=7.0.8" 1357 | }, 1358 | "type": "library", 1359 | "autoload": { 1360 | "psr-4": { 1361 | "Symfony\\Component\\Process\\": "" 1362 | }, 1363 | "exclude-from-classmap": [ 1364 | "/Tests/" 1365 | ] 1366 | }, 1367 | "notification-url": "https://packagist.org/downloads/", 1368 | "license": [ 1369 | "MIT" 1370 | ], 1371 | "authors": [ 1372 | { 1373 | "name": "Fabien Potencier", 1374 | "email": "fabien@symfony.com" 1375 | }, 1376 | { 1377 | "name": "Symfony Community", 1378 | "homepage": "https://symfony.com/contributors" 1379 | } 1380 | ], 1381 | "description": "Symfony Process Component", 1382 | "homepage": "https://symfony.com", 1383 | "time": "2020-10-24T10:57:07+00:00" 1384 | }, 1385 | { 1386 | "name": "symfony/stopwatch", 1387 | "version": "v3.4.47", 1388 | "source": { 1389 | "type": "git", 1390 | "url": "https://github.com/symfony/stopwatch.git", 1391 | "reference": "298b81faad4ce60e94466226b2abbb8c9bca7462" 1392 | }, 1393 | "dist": { 1394 | "type": "zip", 1395 | "url": "https://api.github.com/repos/symfony/stopwatch/zipball/298b81faad4ce60e94466226b2abbb8c9bca7462", 1396 | "reference": "298b81faad4ce60e94466226b2abbb8c9bca7462", 1397 | "shasum": "" 1398 | }, 1399 | "require": { 1400 | "php": "^5.5.9|>=7.0.8" 1401 | }, 1402 | "type": "library", 1403 | "autoload": { 1404 | "psr-4": { 1405 | "Symfony\\Component\\Stopwatch\\": "" 1406 | }, 1407 | "exclude-from-classmap": [ 1408 | "/Tests/" 1409 | ] 1410 | }, 1411 | "notification-url": "https://packagist.org/downloads/", 1412 | "license": [ 1413 | "MIT" 1414 | ], 1415 | "authors": [ 1416 | { 1417 | "name": "Fabien Potencier", 1418 | "email": "fabien@symfony.com" 1419 | }, 1420 | { 1421 | "name": "Symfony Community", 1422 | "homepage": "https://symfony.com/contributors" 1423 | } 1424 | ], 1425 | "description": "Symfony Stopwatch Component", 1426 | "homepage": "https://symfony.com", 1427 | "time": "2020-10-24T10:57:07+00:00" 1428 | } 1429 | ], 1430 | "aliases": [], 1431 | "minimum-stability": "stable", 1432 | "stability-flags": [], 1433 | "prefer-stable": false, 1434 | "prefer-lowest": false, 1435 | "platform": { 1436 | "php": ">=5.6" 1437 | }, 1438 | "platform-dev": [], 1439 | "platform-overrides": { 1440 | "php": "5.6.0" 1441 | } 1442 | } 1443 | --------------------------------------------------------------------------------