Festival payment: a failed Mollie call logs warnings and sends the participant on as if paid
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
Start in system/datatypes/festival.php at festivalpage::checkPayment(), payAction(), and the payment hook around line 636; trace how MollieAPI::createPayment() and getPayment() failures reach the pay redirect. Reproduce with a missing or unreachable Mollie key and follow the registration status and digest handling. Done means failed calls show an error, do not send participants to the contribution form, and leave organisers informed; the issue also raises how festivals should configure the Mollie key.
由索引模型根据 Issue 内容生成。
描述
A sign-up with an amount creates a payment at Mollie with the key from the festival's XML (getConfig('mollie-key')). When that call fails (no key configured, a wrong or revoked key, Mollie unreachable), MollieAPI::createPayment() and getPayment() return false, and festivalpage::checkPayment() reads properties of that false:
PHP Warning: Attempt to read property "status" on false in system/datatypes/festival.php on line 1152
PHP Warning: Attempt to read property "isPaid" on false in system/datatypes/festival.php on line 1158
PHP Warning: Attempt to read property "isOpen" on false in system/datatypes/festival.php on line 1161
Worse than the warnings: after pay on …/pay/<id>/<key>, payAction() gets no checkout URL and therefore redirects the participant to the contribution form, which is the path for a completed payment. The participant gets no error, the registration stays unpaid (no payment-id, no payment-status), and the organisers are not told. The participants list then shows the amount with an empty status.
The festival settings screen has only a title and a description, so on a new festival there is no way to enter the Mollie key other than editing the XML; every paid sign-up then takes this path. The payment hook also reads $_REQUEST['id'] without a check (Undefined array key "id", line 636).
Steps to reproduce. Fictional site in a container where api.mollie.com cannot be reached (or a festival without mollie-key): sign up with amount 10, open the pay link, press pay. Result: redirect to …/contribute/<id>/<key> without payment, and the warnings above. Expected: a message that the payment could not be started, and the registration marked as such.
Tested on main (d97ab7b) on PHP 8.2, 8.4 and 8.5, with a configured sign-up form (the default form fails earlier, #548). Suggested direction: let checkPayment()/payAction() handle false (notify an error, stay on the pay page, note it in the digest), and add the Mollie key to the festival settings or document where it goes. No pull request, since the wanted behaviour is a choice for the maintainers.
- 主要语言
- JavaScript
- 星标
- 5
- 派生
- 9
- 平均合并
- 19 小时 10 分钟
- 30 天内合并 PR
- 12
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
PlanBCode/hypha 的其他 Issue
-
Component: User interface Impact: Low Level: Easy Pagetype: Peer reviewed article Type: Bug Value: Visitors
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
-
Impact: Medium Level: Easy Type: Bug Value: Users
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
Impact: Low Level: Easy Pagetype: Festival Type: Bug Value: Coders
难度 1/5 1 小时以内 新手友好度 82/100
维护者通常 1 天内回复
-
Impact: Medium Level: Easy Pagetype: Mailinglist Type: Bug Value: Users
难度 2/5 1-3 小时 新手友好度 79/100
维护者通常 1 天内回复
-
Impact: Low Level: Easy Type: Bug Value: Coders
难度 1/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 92/100
danilogiles/enki-browser#113 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
ux
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
bug triage
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 95/100
weavefox/awesome-opc#29 ·
维护者通常 1 天内回复