{"id":15045105,"url":"https://github.com/alcalyn/payplug-bundle","last_synced_at":"2025-09-02T13:08:37.099Z","repository":{"id":20045494,"uuid":"23313815","full_name":"alcalyn/payplug-bundle","owner":"alcalyn","description":"Symfony2 bundle for Payplug","archived":false,"fork":false,"pushed_at":"2017-08-25T15:34:28.000Z","size":85,"stargazers_count":7,"open_issues_count":0,"forks_count":6,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-07-22T17:50:02.126Z","etag":null,"topics":["github-evacuee","payplug","symfony"],"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/alcalyn.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":null,"security":null,"support":null}},"created_at":"2014-08-25T13:01:27.000Z","updated_at":"2018-07-11T11:41:21.000Z","dependencies_parsed_at":"2022-08-21T07:50:41.036Z","dependency_job_id":null,"html_url":"https://github.com/alcalyn/payplug-bundle","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/alcalyn/payplug-bundle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alcalyn%2Fpayplug-bundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alcalyn%2Fpayplug-bundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alcalyn%2Fpayplug-bundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alcalyn%2Fpayplug-bundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alcalyn","download_url":"https://codeload.github.com/alcalyn/payplug-bundle/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alcalyn%2Fpayplug-bundle/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273287680,"owners_count":25078575,"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-09-02T02:00:09.530Z","response_time":77,"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":["github-evacuee","payplug","symfony"],"created_at":"2024-09-24T20:51:27.809Z","updated_at":"2025-09-02T13:08:37.074Z","avatar_url":"https://github.com/alcalyn.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"AlcalynPayplugBundle\n====================\n\n[Payplug](https://www.payplug.fr/) integration to symfony2.\n\n[![Latest Stable Version](https://poser.pugx.org/alcalyn/payplug-bundle/v/stable.svg)](https://packagist.org/packages/alcalyn/payplug-bundle)\n[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/alcalyn/payplug-bundle/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/alcalyn/payplug-bundle/?branch=master)\n[![SensioLabsInsight](https://insight.sensiolabs.com/projects/5db1af60-63e4-40a6-bb5a-671725d9ac73/mini.png)](https://insight.sensiolabs.com/projects/5db1af60-63e4-40a6-bb5a-671725d9ac73)\n[![Build Status](https://travis-ci.org/alcalyn/payplug-bundle.svg?branch=master)](https://travis-ci.org/alcalyn/payplug-bundle)\n[![License](https://poser.pugx.org/alcalyn/payplug-bundle/license.svg)](https://packagist.org/packages/alcalyn/payplug-bundle)\n\n## Installation\n\n\n### Step 1: Download using composer\n\n``` js\n{\n    \"require\": {\n        \"alcalyn/payplug-bundle\": \"1.x\"\n    }\n}\n```\n\nUpdate your composer.\n\n``` bash\nphp composer.phar update\n```\n\n\n### Step 2: Register the Bundle\n\n``` php\n\u003c?php\n// app/AppKernel.php\n\n    public function registerBundles()\n    {\n        $bundles = array(\n            // ...\n            new Alcalyn\\PayplugBundle\\AlcalynPayplugBundle(),\n        );\n    }\n```\n\n\n### Step 3: Import Payplug IPN route\n\nTo create payments and process IPNs, the bundle need to have its routes enabled.\n\nAdd this to **app/config/routing.yml**:\n\n``` yml\n# Payplug routing\nalcalyn_payplug:\n    resource: \"@AlcalynPayplugBundle/Resources/config/routing.yml\"\n    prefix:   /\n```\n\n\n### Step 4: Configure the bundle and your account settings\n\nAdd these lines to your **config.yml**:\n\n``` yaml\n# Payplug configuration\nalcalyn_payplug:\n    account:\n        url:                %payplug_account_url%\n        amount_min:         %payplug_account_amount_min%\n        amount_max:         %payplug_account_amount_max%\n        currencies:         %payplug_account_currencies%\n        payplugPublicKey:   %payplug_account_payplugPublicKey%\n        yourPrivateKey:     %payplug_account_yourPrivateKey%\n```\n\nAnd these lines into **parameters.yml**, and optionally into **parameters.yml.dist**:\n\n``` yaml\n    payplug_account_url:                ~\n    payplug_account_amount_min:         ~\n    payplug_account_amount_max:         ~\n    payplug_account_currencies:         ~\n    payplug_account_payplugPublicKey:   ~\n    payplug_account_yourPrivateKey:     ~\n```\n\nThen run this command to load your Payplug account settings:\n\n``` bash\nphp app/console payplug:account:update\n```\n\n(*Your Payplug email and password will be prompted*)\n\n\n\u003e **Warning**:\n\u003e\n\u003e Be sure to never commit your account settings by commiting your **parameters.yml**\n\nSee [Payplug documentation](http://payplug-developer-documentation.readthedocs.org/en/latest/#configuration)\nfor more informations about account configuration.\n\n\u003e **Note**:\n\u003e\n\u003e This command uses curl to load your account parameters from https://www.payplug.fr/portal/ecommerce/autoconfig\n\u003e\n\u003e **If the command fails**, go to https://www.payplug.fr/portal/ecommerce/autoconfig\n\u003e and copy/paste your parameters manually.\n\u003e\n\u003e Your parameters.yml should looks like this:\n\u003e [parameters.yml.example](https://github.com/alcalyn/payplug-bundle/blob/master/Resources/doc/parameters.yml.example)\n\nYou can also [configure your TEST mode](https://github.com/alcalyn/payplug-bundle/blob/master/Resources/doc/test_mode.md).\n\n\n## Basic usage:\n\n### Generating payment url:\n\n``` php\n\u003c?php\nuse Alcalyn\\PayplugBundle\\Model\\Payment;\n\n// ...\n\n    public function wtfAction()\n    {\n        // Create a payment of 16 €\n        $payment = new Payment(1600, Payment::EUROS);\n\n        // Get Payplug payment service\n        $payplugPayment = $this-\u003eget('payplug.payment');\n\n        // Generate url\n        $payplugPayment-\u003egenerateUrl($payment); // returns \"https://www.payplug.fr/p/aca8...ef?data=...\u0026sign=...\"\n    }\n```\n\n\n### Treat IPNs\n\nAlcalynPayplugBundle dispatches\n[PayplugIPNEvent](https://github.com/alcalyn/payplug-bundle/blob/master/Event/PayplugIPNEvent.php)\nwhen an IPN is received.\n\nThis event contains an instance of [IPN](https://github.com/alcalyn/payplug-bundle/blob/master/Model/IPN.php)\nthat you can access by calling **PayplugIPNEvent::getIPN()**.\n\nSo listen it like that:\n\n - Create the listener class:\n\n``` php\n\u003c?php\n// src/Acme/AcmeBundle/EventListener/PaymentListener.php\n\nnamespace Acme\\AcmeBundle\\EventListener;\n\nuse Alcalyn\\PayplugBundle\\Event\\PayplugIPNEvent;\n\nclass PaymentListener\n{\n    /**\n     * @param PayplugIPNEvent $event\n     */\n    public function onPayment(PayplugIPNEvent $event)\n    {\n        $ipn = $event-\u003egetIPN();\n\n        // treat $ipn\n    }\n}\n```\n\n - Register your listener:\n\n``` yaml\n# src/Acme/AcmeBundle/Resources/services.yml\nservices:\n    acme.listeners.payment:\n        class: Acme\\AcmeBundle\\EventListener\\PaymentListener\n        tags:\n            - { name: kernel.event_listener, event: event.payplug.ipn, method: onPayment }\n```\n\n\n## Advanced usage:\n\n - [Use TEST mode](https://github.com/alcalyn/payplug-bundle/blob/master/Resources/doc/test_mode.md)\n - [Extend IPN class](https://github.com/alcalyn/payplug-bundle/blob/master/Resources/doc/extend_ipn.md)\n - [Listen to malformed IPN](https://github.com/alcalyn/payplug-bundle/blob/master/Resources/doc/malformed_ipn.md)\n - [Generate payment Url from command](https://github.com/alcalyn/payplug-bundle/blob/master/Resources/doc/generate_url_command.md)\n - [Simulate an IPN from command](https://github.com/alcalyn/payplug-bundle/blob/master/Resources/doc/simulate_ipn_command.md)\n\n\n## License\n\nThis bundle is under the MIT license. See the complete license:\n\n[Resources/meta/LICENSE](https://github.com/alcalyn/payplug-bundle/blob/master/Resources/meta/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falcalyn%2Fpayplug-bundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falcalyn%2Fpayplug-bundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falcalyn%2Fpayplug-bundle/lists"}