Festival payment: a failed Mollie call logs warnings and sends the participant on as if paid
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 45/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- JavaScript
- Stelle
- 5
- Fork
- 9
- Merge medio
- 18h 7m
- PR unite (30g)
- 11
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di PlanBCode/hypha
-
Component: User interface Impact: Low Level: Easy Pagetype: Peer reviewed article Type: Bug Value: Visitors
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
Impact: Medium Level: Easy Type: Bug Value: Users
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
Impact: Low Level: Easy Pagetype: Festival Type: Bug Value: Coders
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Impact: Medium Level: Easy Pagetype: Mailinglist Type: Bug Value: Users
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
I maintainer di solito rispondono entro 1 giorno
-
Impact: Low Level: Easy Type: Bug Value: Coders
Difficoltà 1/5 1-3 ore Idoneità per principianti 85/100
PlanBCode/hypha#586 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di PlanBCode/hypha
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
wazuh/wazuh-documentation#10584 ·
I maintainer di solito rispondono entro 1 giorno
-
documentation good first issue
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 94/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
InukaAsith/TwinDesk#84 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
Graphify-Labs/graphify#4860 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
CommandCodeAI/command-code#1088 ·
I maintainer di solito rispondono entro 2 giorni