{"id":24780408,"url":"https://github.com/webgriffe/payumlockrequestextension","last_synced_at":"2025-03-24T04:40:26.469Z","repository":{"id":199938102,"uuid":"704063290","full_name":"webgriffe/PayumLockRequestExtension","owner":"webgriffe","description":"A Payum extension providing the ability to lock concurrent requests.","archived":false,"fork":false,"pushed_at":"2023-10-27T14:57:07.000Z","size":17,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-01T18:07:36.622Z","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":"mit","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":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-12T13:12:07.000Z","updated_at":"2023-11-02T08:30:34.000Z","dependencies_parsed_at":"2023-10-14T15:24:26.585Z","dependency_job_id":"88be81ab-b979-4c9c-bd34-53c2688c56ab","html_url":"https://github.com/webgriffe/PayumLockRequestExtension","commit_stats":null,"previous_names":["webgriffe/payumlockrequestextension"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webgriffe%2FPayumLockRequestExtension","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webgriffe%2FPayumLockRequestExtension/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webgriffe%2FPayumLockRequestExtension/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webgriffe%2FPayumLockRequestExtension/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/webgriffe","download_url":"https://codeload.github.com/webgriffe/PayumLockRequestExtension/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245212107,"owners_count":20578438,"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","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:23.976Z","updated_at":"2025-03-24T04:40:26.443Z","avatar_url":"https://github.com/webgriffe.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Payum Lock Request Extension\n\n### A Payum extension providing the ability to lock concurrent requests\n\n[![Tests](https://github.com/webgriffe/PayumLockRequestExtension/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/webgriffe/PayumLockRequestExtension/actions/workflows/test.yml)\n\nThis extension provides the ability to lock concurrent requests to a Payum gateway (for example when the PSP send both a\nnotify action and a traditional capture action in the same moment). It\nuses [Symfony Lock Component](https://symfony.com/doc/current/components/lock.html) to provide a simple and reliable\nlocking mechanism.\n\n## Installation\n\n```bash\ncomposer require webgriffe/payum-lock-request-extension\n```\n\n## Usage\n\n```php\n\u003c?php\n\n// Use your preferred \\Symfony\\Component\\Lock\\PersistingStoreInterface implementation\n$persistingStore = new Symfony\\Component\\Lock\\Store\\SemaphoreStore();\n\n$lockFactory = new \\Symfony\\Component\\Lock\\LockFactory($persistingStore);\n\n$lockRequestExtension = new \\Webgriffe\\PayumLockRequestExtension\\LockRequestExtension(\n    $lockFactory,\n    'my_lock_prefix', // Optional, default value is 'webgriffe_payum_lock_request_extension'\n    30.0, // Optional, default value is 30.0\n    true // Optional, default value is true\n);\n\n/** @var \\Payum\\Core\\Gateway $gateway */\n$gateway-\u003eaddExtension($lockRequestExtension);\n\n// here the extension will be called to wrap the execute acton in a lock\n$gateway-\u003eexecute(new FooRequest);\n\n```\n\n## Configuration\n\nThe extension can be configured with the following options:\n\n- Lock prefix: to ensure lock key is unique, default is `webgriffe_payum_lock_request_extension`.\n- Lock TTL: the maximum time in seconds that a lock can be hold, default is `30`.\n- Lock autorelease: release the lock or not when the lock instance is destroyed, default is `true`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebgriffe%2Fpayumlockrequestextension","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebgriffe%2Fpayumlockrequestextension","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebgriffe%2Fpayumlockrequestextension/lists"}