{"id":24780419,"url":"https://github.com/webgriffe/syliuspausepayplugin","last_synced_at":"2026-02-19T01:32:07.438Z","repository":{"id":256534215,"uuid":"849276001","full_name":"webgriffe/SyliusPausePayPlugin","owner":"webgriffe","description":"Sylius plugin for PausePay payment gateway","archived":false,"fork":false,"pushed_at":"2024-09-26T12:20:20.000Z","size":172,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-10-12T05:32:06.609Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/webgriffe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-29T09:56:18.000Z","updated_at":"2025-01-10T11:42:35.000Z","dependencies_parsed_at":"2024-09-11T13:20:21.716Z","dependency_job_id":"e7aec5cd-3f70-4e57-af7a-7b04123ee5f9","html_url":"https://github.com/webgriffe/SyliusPausePayPlugin","commit_stats":null,"previous_names":["webgriffe/syliuspausepayplugin"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/webgriffe/SyliusPausePayPlugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webgriffe%2FSyliusPausePayPlugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webgriffe%2FSyliusPausePayPlugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webgriffe%2FSyliusPausePayPlugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webgriffe%2FSyliusPausePayPlugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/webgriffe","download_url":"https://codeload.github.com/webgriffe/SyliusPausePayPlugin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webgriffe%2FSyliusPausePayPlugin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29600752,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T00:59:38.239Z","status":"ssl_error","status_checked_at":"2026-02-19T00:59:36.936Z","response_time":162,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-29T10:30:35.436Z","updated_at":"2026-02-19T01:32:07.412Z","avatar_url":"https://github.com/webgriffe.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://sylius.com\" target=\"_blank\"\u003e\n        \u003cimg src=\"https://demo.sylius.com/assets/shop/img/logo.png\" /\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003eSylius \u003ca href=\"https://pausepay.it/\" target=\"_blank\"\u003ePausePay\u003c/a\u003e Plugin\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003eSylius plugin for PausePay payment method.\u003c/p\u003e\n\n\n## Installation\n\n1. Run:\n    ```bash\n    composer require webgriffe/sylius-pausepay-plugin\n    ```\n\n2. Add `Webgriffe\\SyliusPausePayPlugin\\WebgriffeSyliusPausePayPlugin::class =\u003e ['all' =\u003e true]` to your `config/bundles.php`.\n   \n    Normally, the plugin is automatically added to the `config/bundles.php` file by the `composer require` command. If it is not, you have to add it manually.\n\n3. Create a new file config/packages/webgriffe_sylius_pausepay_plugin.yaml:\n    ```yaml\n    imports:\n      - { resource: \"@WebgriffeSyliusPausePayPlugin/config/config.php\" }\n    ```\n\n4. Create a new file config/routes/webgriffe_sylius_pausepay_plugin.yaml:\n    ```yaml\n    webgriffe_sylius_pausepay_plugin_shop:\n        resource: \"@WebgriffeSyliusPausePayPlugin/config/routes/shop.php\"\n        prefix: /{_locale}\n        requirements:\n            _locale: ^[A-Za-z]{2,4}(_([A-Za-z]{4}|[0-9]{3}))?(_([A-Za-z]{2}|[0-9]{3}))?$\n    \n    webgriffe_sylius_pausepay_plugin_index:\n        resource: \"@WebgriffeSyliusPausePayPlugin/config/routes/index.php\"\n    \n    webgriffe_sylius_pausepay_plugin_payum:\n        resource: \"@WebgriffeSyliusPausePayPlugin/config/routes/payum.php\"\n    \n    sylius_shop_payum_cancel:\n        resource: \"@PayumBundle/Resources/config/routing/cancel.xml\"\n    ```\n\n5. Add the PaymentOrder entity. Create a new file `src/Entity/Payment/PaymentOrder.php` with the following content:\n    ```php\n    \u003c?php\n\n    declare(strict_types=1);\n\n    namespace App\\Entity\\Payment;\n\n    use Doctrine\\ORM\\Mapping as ORM;\n    use Webgriffe\\SyliusPausePayPlugin\\Entity\\PaymentOrder as BasePaymentOrder;\n    \n    /**\n     * @ORM\\Entity\n     * @ORM\\Table(name=\"webgriffe_sylius_pausepay_payment_order\")\n     */\n    class PaymentOrder extends BasePaymentOrder\n    {\n    }\n\n    ```\n\n6. Add a new CompanyInfoResolver service that decorates the dummy service `webgriffe_sylius_pausepay.resolver.company_info` of the plugin. This service is used to resolve the company info \"of the order\" and will be passed to PausePay system upon payment creation.\n\n   Create a new file `src/Resolver/PausePay/CompanyInfoResolver.php` with the following content:\n    ```php\n    \u003c?php\n    \n    declare(strict_types=1);\n    \n    namespace App\\Resolver\\PausePay;\n    \n    use Sylius\\Component\\Core\\Model\\OrderInterface;\n    use Webgriffe\\SyliusPausePayPlugin\\Resolver\\CompanyInfoResolverInterface;\n    use Webgriffe\\SyliusPausePayPlugin\\ValueObject\\CompanyInfo;\n    \n    final class CompanyInfoResolver implements CompanyInfoResolverInterface\n    {\n        public function resolveFromOrder(OrderInterface $order): CompanyInfo\n        {\n            // TODO: your logic here\n        }\n    }\n    ```\n\n    and define it as the decoration/replacement of the service with alias `webgriffe_sylius_pausepay.resolver.company_info`. For example create the file `config/services/resolver.yaml` with content:\n\n    ```yaml\n    services:\n        webgriffe_sylius_pausepay.resolver.company_info:\n            class: App\\Resolver\\PausePay\\CompanyInfoResolver\n    ```\n\n    TODO: Add sandbox logic\n\n7. If you have a custom implementation of the Sylius service `PaymentMethodResolver`, you must add the logic to check the availability of PausePay payment method by using the service `PausePayAvailabilityChecker`.\n\n   TODO: Add example\n\n8. Run:\n    ```bash\n    php bin/console doctrine:migrations:migrate\n    ```\n\n9. Run:\n    ```bash\n    php bin/console sylius:install:assets\n   ```\n   Or, you can add the entry to your webpack.config.js file:\n    ```javascript\n    .addEntry(\n        'webgriffe-sylius-pausepay-entry',\n        './vendor/webgriffe/sylius-pausepay-plugin/public/poll_payment.js'\n    )\n    ```\n   And then override the template `WebgriffeSyliusPausePayPlugin/after_pay.html.twig` to include the entry:\n    ```twig\n    {% block javascripts %}\n        {{ parent() }}\n\n        \u003cscript\u003e\n            window.afterUrl = \"{{ afterUrl }}\";\n            window.paymentStatusUrl = \"{{ paymentStatusUrl }}\";\n        \u003c/script\u003e\n        {{ encore_entry_script_tags('webgriffe-sylius-pausepay-entry', null, 'sylius.shop') }}\n    {% endblock %}\n    ```\n\n## Usage\n\nAccess to the admin panel and go to the `Payment methods` section. Create a new payment method and select `PausePay`\nas gateway. Then, configure the payment method with the required parameters.\n\n## Contributing\n\nFor a comprehensive guide on Sylius Plugins development please go to Sylius documentation,\nthere you will find the \u003ca href=\"https://docs.sylius.com/en/latest/plugin-development-guide/index.html\"\u003ePlugin Development Guide\u003c/a\u003e, that is full of examples.\n\n### Quickstart Installation\n\n#### Traditional\n\n1. Run `composer create-project sylius/plugin-skeleton ProjectName`.\n\n2. From the plugin skeleton root directory, run the following commands:\n\n    ```bash\n    $ (cd tests/Application \u0026\u0026 yarn install)\n    $ (cd tests/Application \u0026\u0026 yarn build)\n    $ (cd tests/Application \u0026\u0026 APP_ENV=test bin/console assets:install public)\n    \n    $ (cd tests/Application \u0026\u0026 APP_ENV=test bin/console doctrine:database:create)\n    $ (cd tests/Application \u0026\u0026 APP_ENV=test bin/console doctrine:schema:create)\n    ```\n\nTo be able to set up a plugin's database, remember to configure you database credentials in `tests/Application/.env` and `tests/Application/.env.test`.\n\n#### Docker\n\n1. Execute `docker compose up -d`\n\n2. Initialize plugin `docker compose exec app make init`\n\n3. See your browser `open localhost`\n\n## Usage\n\n#### Running plugin tests\n\n  - PHPUnit\n\n    ```bash\n    vendor/bin/phpunit\n    ```\n\n  - PHPSpec\n\n    ```bash\n    vendor/bin/phpspec run\n    ```\n\n  - Behat (non-JS scenarios)\n\n    ```bash\n    vendor/bin/behat --strict --tags=\"~@javascript\"\n    ```\n\n  - Behat (JS scenarios)\n \n    1. [Install Symfony CLI command](https://symfony.com/download).\n \n    2. Start Headless Chrome:\n    \n      ```bash\n      google-chrome-stable --enable-automation --disable-background-networking --no-default-browser-check --no-first-run --disable-popup-blocking --disable-default-apps --allow-insecure-localhost --disable-translate --disable-extensions --no-sandbox --enable-features=Metal --headless --remote-debugging-port=9222 --window-size=2880,1800 --proxy-server='direct://' --proxy-bypass-list='*' http://127.0.0.1\n      ```\n    \n    3. Install SSL certificates (only once needed) and run test application's webserver on `127.0.0.1:8080`:\n    \n      ```bash\n      symfony server:ca:install\n      APP_ENV=test symfony server:start --port=8080 --dir=tests/Application/public --daemon\n      ```\n    \n    4. Run Behat:\n    \n      ```bash\n      vendor/bin/behat --strict --tags=\"@javascript\"\n      ```\n    \n  - Static Analysis\n  \n    - Psalm\n    \n      ```bash\n      vendor/bin/psalm\n      ```\n      \n    - PHPStan\n    \n      ```bash\n      vendor/bin/phpstan analyse -c phpstan.neon -l max src/  \n      ```\n\n  - Coding Standard\n  \n    ```bash\n    vendor/bin/ecs check\n    ```\n\n#### Opening Sylius with your plugin\n\n- Using `test` environment:\n\n    ```bash\n    (cd tests/Application \u0026\u0026 APP_ENV=test bin/console sylius:fixtures:load)\n    (cd tests/Application \u0026\u0026 APP_ENV=test bin/console server:run -d public)\n    ```\n    \n- Using `dev` environment:\n\n    ```bash\n    (cd tests/Application \u0026\u0026 APP_ENV=dev bin/console sylius:fixtures:load)\n    (cd tests/Application \u0026\u0026 APP_ENV=dev bin/console server:run -d public)\n    ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebgriffe%2Fsyliuspausepayplugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebgriffe%2Fsyliuspausepayplugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebgriffe%2Fsyliuspausepayplugin/lists"}