Festival payment: a failed Mollie call logs warnings and sends the participant on as if paid
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 45/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- JavaScript
- Star
- 5
- Fork
- 9
- Merge trung bình
- 19 giờ 10 phút
- Pull request đã merge (30 ngày)
- 12
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của PlanBCode/hypha
-
Component: User interface Impact: Low Level: Easy Pagetype: Peer reviewed article Type: Bug Value: Visitors
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Impact: Medium Level: Easy Type: Bug Value: Users
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Impact: Low Level: Easy Pagetype: Festival Type: Bug Value: Coders
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Impact: Medium Level: Easy Pagetype: Mailinglist Type: Bug Value: Users
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Impact: Low Level: Easy Type: Bug Value: Coders
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 85/100
PlanBCode/hypha#586 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của PlanBCode/hypha
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
danilogiles/enki-browser#113 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
ux
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
evcc-io/evcc#35605 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 95/100
weavefox/awesome-opc#29 ·
Maintainer thường phản hồi trong vòng 1 ngày