承接 webgriffe/payum-lock-request-extension 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

webgriffe/payum-lock-request-extension

最新稳定版本:0.1.0

Composer 安装命令:

composer require webgriffe/payum-lock-request-extension

包简介

A Payum extension providing the ability to lock concurrent requests.

README 文档

README

A Payum extension providing the ability to lock concurrent requests

Tests

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 to provide a simple and reliable locking mechanism.

Installation

composer require webgriffe/payum-lock-request-extension

Usage

<?php // Use your preferred \Symfony\Component\Lock\PersistingStoreInterface implementation $persistingStore = new Symfony\Component\Lock\Store\SemaphoreStore(); $lockFactory = new \Symfony\Component\Lock\LockFactory($persistingStore); $lockRequestExtension = new \Webgriffe\PayumLockRequestExtension\LockRequestExtension( $lockFactory, 'my_lock_prefix', // Optional, default value is 'webgriffe_payum_lock_request_extension' 30.0, // Optional, default value is 30.0 true // Optional, default value is true ); /** @var \Payum\Core\Gateway $gateway */ $gateway->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.

统计信息

  • 总下载量: 15.82k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 1
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 5
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04