Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Festival payment: a failed Mollie call logs warnings and sends the participant on as if paid

未关闭
#550 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
45/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
php
领域
payments

调研方向

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 内容生成。

描述

Impact: Medium Level: Moderate Pagetype: Festival Type: Bug Value: Users

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,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

PlanBCode/hypha 的其他 Issue

查看 PlanBCode/hypha 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。