https://github.com/webgriffe/payumlockrequestextension
A Payum extension providing the ability to lock concurrent requests.
https://github.com/webgriffe/payumlockrequestextension
Last synced: over 1 year ago
JSON representation
A Payum extension providing the ability to lock concurrent requests.
- Host: GitHub
- URL: https://github.com/webgriffe/payumlockrequestextension
- Owner: webgriffe
- License: mit
- Created: 2023-10-12T13:12:07.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-10-27T14:57:07.000Z (over 2 years ago)
- Last Synced: 2025-03-01T18:07:36.622Z (over 1 year ago)
- Language: PHP
- Size: 16.6 KB
- Stars: 1
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# Payum Lock Request Extension
### A Payum extension providing the ability to lock concurrent requests
[](https://github.com/webgriffe/PayumLockRequestExtension/actions/workflows/test.yml)
This extension provides the ability to lock concurrent requests to a Payum gateway (for example when the PSP send both a
notify action and a traditional capture action in the same moment). It
uses [Symfony Lock Component](https://symfony.com/doc/current/components/lock.html) to provide a simple and reliable
locking mechanism.
## Installation
```bash
composer require webgriffe/payum-lock-request-extension
```
## Usage
```php
addExtension($lockRequestExtension);
// here the extension will be called to wrap the execute acton in a lock
$gateway->execute(new FooRequest);
```
## Configuration
The extension can be configured with the following options:
- Lock prefix: to ensure lock key is unique, default is `webgriffe_payum_lock_request_extension`.
- Lock TTL: the maximum time in seconds that a lock can be hold, default is `30`.
- Lock autorelease: release the lock or not when the lock instance is destroyed, default is `true`.