{"id":24780449,"url":"https://github.com/webgriffe/SyliusHeyLightPlugin","last_synced_at":"2025-10-12T05:30:37.481Z","repository":{"id":219085056,"uuid":"746778939","full_name":"webgriffe/SyliusHeyLightPlugin","owner":"webgriffe","description":null,"archived":false,"fork":false,"pushed_at":"2025-05-20T09:21:00.000Z","size":235,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-10-09T04:09:27.281Z","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-01-22T16:54:12.000Z","updated_at":"2025-02-04T16:49:37.000Z","dependencies_parsed_at":"2025-10-09T04:09:23.350Z","dependency_job_id":"0a6bab53-4e01-45d5-bbe1-de69ff2391aa","html_url":"https://github.com/webgriffe/SyliusHeyLightPlugin","commit_stats":null,"previous_names":["webgriffe/syliuspagolightplugin","webgriffe/syliusheylightplugin"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/webgriffe/SyliusHeyLightPlugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webgriffe%2FSyliusHeyLightPlugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webgriffe%2FSyliusHeyLightPlugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webgriffe%2FSyliusHeyLightPlugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webgriffe%2FSyliusHeyLightPlugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/webgriffe","download_url":"https://codeload.github.com/webgriffe/SyliusHeyLightPlugin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webgriffe%2FSyliusHeyLightPlugin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279010327,"owners_count":26084738,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-12T02:00:06.719Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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:52.266Z","updated_at":"2025-10-12T05:30:37.475Z","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://heylight.com/\" target=\"_blank\"\u003eHeyLight\u003c/a\u003e Plugin\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003eSylius plugin for HeyLight payment gateway (ex PagoLight BNPL and PagoLight PRO).\u003c/p\u003e\n\n## Installation\n\n1. Run:\n    ```bash\n    composer require webgriffe/sylius-heylight-plugin\n   ```\n\n2. Add `Webgriffe\\SyliusHeylightPlugin\\WebgriffeSyliusHeylightPlugin::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_heylight_plugin.yaml:\n   ```yaml\n   imports:\n       - { resource: \"@WebgriffeSyliusHeylightPlugin/config/config.php\" }\n   ```\n\n4. Import the routes needed for cancelling the payments. Add the following to your config/routes.yaml file:\n   ```yaml\n   webgriffe_sylius_heylight_plugin_shop:\n       resource: \"@WebgriffeSyliusHeylightPlugin/config/shop_routing.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_heylight_plugin_ajax:\n       resource: \"@WebgriffeSyliusHeylightPlugin/config/shop_ajax_routing.php\"\n\n   sylius_shop_payum_cancel:\n       resource: \"@PayumBundle/Resources/config/routing/cancel.xml\"\n\n   ```\n   **NB:** The file shop_routing needs to be after the prefix _locale, so that messages can be displayed in the right\n   language. You should also include the cancel routes from the Payum bundle if you do not have it already!\n\n5. Add the WebhookToken entity. Create a new file `src/Entity/Payment/WebhookToken.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\\SyliusHeylightPlugin\\Entity\\WebhookToken as BaseWebhookToken;\n    \n    /**\n     * @ORM\\Entity\n     * @ORM\\Table(name=\"webgriffe_sylius_heylight_webhook_token\")\n     */\n    class WebhookToken extends BaseWebhookToken\n    {\n    }\n    ```\n6. Run:\n    ```bash\n    php bin/console doctrine:migrations:diff\n    php bin/console doctrine:migrations:migrate\n    ```\n\n7. 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-heylight-entry',\n        './vendor/webgriffe/sylius-heylight-plugin/public/poll_payment.js'\n    )\n    ```\n   And then override the template `WebgriffeSyliusHeylightPlugin/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-heylight-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 `HeyLight BNPL`\nor `HeyLight Financing` as the gateway. Then, configure the payment method with the required parameters.\n\nAutomatically, the plugin will hide the payment method if the currency is not EUR, GBP or CH or if the country is not\nItaly or Switzerland. HeyLight Financing will also be visible only if the order total amount is greater than 100 EUR.\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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebgriffe%2FSyliusHeyLightPlugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebgriffe%2FSyliusHeyLightPlugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebgriffe%2FSyliusHeyLightPlugin/lists"}