Skip to content

PRE-3867: Move the plugin docs to the GitHub wiki - #344

Open
ilajili wants to merge 1 commit into
developfrom
feature/PRE-3867_docs-to-wiki
Open

ilajili wants to merge 1 commit into
developfrom
feature/PRE-3867_docs-to-wiki

Conversation

@ilajili

@ilajili ilajili commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

Description

Description

Moves the documentation of the plugin from the doc/ folder to the GitHub wiki, as asked in the
review of #342 (PRE-3606): the Scalapay documentation should live in the wiki, not in the repo.
The scope is the whole doc/ folder.

  • doc/ is removed (authorized_payment.md and its image, development.md, oney_enhancement.md,
    ppro_display_eligibility.md, scalapay_widget.md).

  • The wiki is already published: https://github.com/payplug/SyliusPayPlugPlugin/wiki

  • completed: Deferred capture
    now holds the Winzou and Symfony Workflow examples and the image of authorized_payment.md
    (it linked to doc/authorized_payment.md), and the sidebar and Payment-Methods link to the
    new pages.

  • README.md: the doc sections link to the wiki pages, no link to doc/ is left.

  • UPGRADE.md: the Scalapay section keeps only what a merchant must do on upgrade
    (payplug:ppro:refresh, off by default and custom-theme amount selectors, PAYPLUG_OAUTH_BASE_URL)
    and the BC table. The script loading note (head hook, CSP) moved to the wiki page.

  • AuthorizedPaymentOperationProcessor.php: two comments cited doc/authorized_payment.md, they now
    cite the wiki page. No code change.

    Related issue(s): PRE-3867


Motivation: review feedback on #342 (Medium).

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue) [ ]

  • ✨ New feature (non-breaking change that adds functionality) [ ]

  • 💥 Breaking change (fix or feature that causes existing functionality to change and that could impact other libs) [ ]

  • 🔧 Refactor (no functional changes, code improvement only) [ ]

  • 📦 Dependency update [ ]

  • 🔒 Security fix [ ]

  • 📝 Documentation update [x]

    No functional change and no BC break.


    Checklist

    Code Quality

    • Code is linted and formatted (the only PHP file changed passes ECS and the PHP lint; comments only)
    • No unnecessary commented-out code or debug logs
    • No hardcoded values (use env variables or config)

Testing

  • Unit tests added / updated — not applicable, documentation only
  • New/changed code is covered by tests — not applicable, no new code

Security & Ops

  • No sensitive data or secrets introduced
  • Logging and error handling are appropriate

Testing notes

The wiki pages are published and served (checked: Scalapay-Widget, PPRO-Display-Eligibility,
Oney-Enhancement, Development and Deferred-Capture answer 200)

@ilajili ilajili self-assigned this Nov 24, 2026

@jhoaraupp jhoaraupp left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docs-only change, no code or payment-flow risk. I diffed every removed doc/ file against its wiki page (wiki commit c4927ee): Development, Oney-Enhancement and PPRO-Display-Eligibility are identical, Scalapay-Widget is identical plus the new "Script loading" section, and Deferred-Capture is reworded with the Winzou/Workflow examples and the image kept. No link to doc/ is left in the repo.

Verdict: approve after the two Medium points (M1 inline, M2 below).

Not anchorable (wiki content, outside the diff):

  • Medium (M2) — the wiki is not versioned and documents unreleased features. CHANGELOG.md lists PPRO eligibility, the Scalapay widget and Hosted Fields deferred capture under [2.0.0] - Unreleased, and the latest tag (2.3.0) has neither doc/scalapay_widget.md nor doc/ppro_display_eligibility.md. The wiki sidebar shows these pages to everyone with no version: a merchant on 2.3.0 reads Deferred-Capture / Scalapay-Widget and looks for an admin block or payplug:ppro:refresh that their version does not have. Before, doc/ was frozen with each tag. Suggested fix: an "Available from 2.0.0" (or "not released yet") banner at the top of Scalapay-Widget, PPRO-Display-Eligibility and the Hosted Fields section of Deferred-Capture, or publish those pages at release time.
  • Low (L2) — wiki Deferred-Capture lost two operational details of the old doc/authorized_payment.md: the critical log entry written when PayPlug accepted an operation but Sylius failed to save it (the hint used for reconciliation), and the fact that operations on a same payment are serialized by a lock, the operation being saved before the lock is released. The PHP comment at AuthorizedPaymentOperationProcessor.php:66 now sends readers there. Suggested fix: add back "…and a critical entry is written to the payplug log channel" in "When Payplug refuses".
  • Low (L3) — lost everywhere: "a warning is logged on the payplug channel at each refresh" (when PayPlug returns no Scalapay merchant token) is neither in UPGRADE.md nor on the Scalapay-Widget wiki page any more. Suggested fix: add it to Scalapay-Widget › "When it is shown".
  • Low (L5) — process: all the information this PR moves lives in a wiki commit the PR does not show. Mention the wiki commit (c4927ee) in the description so reviewers know to read it.

Comment thread UPGRADE.md Outdated
Comment on lines +124 to +134
What to do on upgrade:

1. **Run `bin/console payplug:ppro:refresh` once.** A Scalapay payment method saved before the upgrade
has no merchant token until its limits are refreshed, and shows no widget until then.
2. **Nothing changes on an existing shop until the merchant turns a page on** (widget off by default),
in the **Scalapay widget** block of the Scalapay payment method page. **A custom theme that
displays the price elsewhere than the Sylius 2 default shop theme must set its own amount
selectors** there.
3. **A QA setup must set `PAYPLUG_OAUTH_BASE_URL`** to the OAuth URL of the QA platform: the widget is
rendered with `environment="integration"` whenever the plugin is connected to a PayPlug platform
other than production (its default value).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Medium (M1) — two upgrade actions left the upgrade guide. The old point 3 (a shop layout that does not render the sylius_shop.base.head hook must load the widget script itself; a Content Security Policy must allow the host of the Scalapay script) moved to the "how it works" wiki page only.

Failure scenario: an integrator with a custom layout or a strict CSP reads UPGRADE.md (versioned with the tag), sees nothing to do, and the widget never shows once turned on, or is blocked by the CSP, with nothing logged server-side.

Suggested fix, a short point 4:

+4. **A shop layout that does not render the `sylius_shop.base.head` hook must load the widget
+   script itself, and a Content Security Policy must allow the host it is served from** (see
+   [Script loading](https://github.com/payplug/SyliusPayPlugPlugin/wiki/Scalapay-Widget#script-loading)).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fondé, merci. Le point 4 est ajouté dans UPGRADE.md (layout sans le hook sylius_shop.base.head et CSP), avec le lien vers la section Script loading du wiki.

Comment thread UPGRADE.md Outdated
Comment on lines +132 to +134
3. **A QA setup must set `PAYPLUG_OAUTH_BASE_URL`** to the OAuth URL of the QA platform: the widget is
rendered with `environment="integration"` whenever the plugin is connected to a PayPlug platform
other than production (its default value).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Low (L1) — "(its default value)" is ambiguous: it is unclear whether it refers to production or to PAYPLUG_OAUTH_BASE_URL.

Suggestion:

-   other than production (its default value).
+   other than production. `PAYPLUG_OAUTH_BASE_URL` defaults to the production platform.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrigé : « PAYPLUG_OAUTH_BASE_URL defaults to the production platform. »

* refundable total is not bent to fit an operation it wasn't designed for. What was actually
* captured is tracked in the payment details (AuthorizationDetails), and RefundPaymentProcessor
* refunds that captured amount. See doc/authorized_payment.md.
* refunds that captured amount. See the "Deferred capture" page of the GitHub wiki.

@jhoaraupp jhoaraupp Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit (L4) — "See the "Deferred capture" page of the GitHub wiki" is not clickable and breaks silently if the page is renamed. Same at line 206. Suggest the full URL: https://github.com/payplug/SyliusPayPlugPlugin/wiki/Deferred-Capture.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fait : les deux commentaires portent maintenant l'URL complète de la page Deferred-Capture.

@ilajili
ilajili force-pushed the feature/PRE-3867_docs-to-wiki branch from 60cd5d2 to 0980842 Compare November 24, 2026 15:29
@ilajili

ilajili commented Nov 24, 2026

Copy link
Copy Markdown
Contributor Author

Merci pour la review. Réponse aux points qui ne sont pas rattachés à une ligne du diff (wiki : commit 008292e, qui s'ajoute à c4927ee) :

  • M2 : fondé pour Scalapay-Widget et PPRO-Display-Eligibility : ces fonctions ne sont pas dans la 2.3.0. J'ai ajouté en tête de page un encadré « Not released yet — planned for version 2.4.0 ». Pas pour la section Hosted Fields de Deferred-Capture : la capture différée Hosted Fields (PRE-3673, 403bc9b) est dans le tag 2.3.0 (le fichier AuthorizedPaymentOperationProcessor.php y est présent), c'est le CHANGELOG qui la range encore à tort sous Unreleased. Le wiki reste non versionné : figer la doc par version serait une décision d'équipe à part.
  • L2 : restauré dans Deferred-Capture (entrée critical quand PayPlug a accepté l'opération mais que Sylius n'a pas pu l'enregistrer, et verrou qui sérialise les opérations d'un même paiement).
  • L3 : restauré dans Scalapay-Widget › « When it is shown » (avertissement journalisé sur le canal payplug à chaque refresh quand PayPlug ne renvoie pas de jeton).
  • L5 : les commits du wiki sont mentionnés dans la description de la PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants