Repository navigation
Conversation
jhoaraupp
left a comment
There was a problem hiding this comment.
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.mdlists PPRO eligibility, the Scalapay widget and Hosted Fields deferred capture under[2.0.0] - Unreleased, and the latest tag (2.3.0) has neitherdoc/scalapay_widget.mdnordoc/ppro_display_eligibility.md. The wiki sidebar shows these pages to everyone with no version: a merchant on 2.3.0 readsDeferred-Capture/Scalapay-Widgetand looks for an admin block orpayplug:ppro:refreshthat 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 ofScalapay-Widget,PPRO-Display-Eligibilityand the Hosted Fields section ofDeferred-Capture, or publish those pages at release time. - Low (L2) — wiki
Deferred-Capturelost two operational details of the olddoc/authorized_payment.md: thecriticallog 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 atAuthorizedPaymentOperationProcessor.php:66now sends readers there. Suggested fix: add back "…and acriticalentry is written to thepaypluglog channel" in "When Payplug refuses". - Low (L3) — lost everywhere: "a warning is logged on the
payplugchannel at each refresh" (when PayPlug returns no Scalapay merchant token) is neither inUPGRADE.mdnor on theScalapay-Widgetwiki page any more. Suggested fix: add it toScalapay-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.
| 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). |
There was a problem hiding this comment.
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)).There was a problem hiding this comment.
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.
| 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). |
There was a problem hiding this comment.
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.There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Fait : les deux commentaires portent maintenant l'URL complète de la page Deferred-Capture.
60cd5d2 to
0980842
Compare
|
Merci pour la review. Réponse aux points qui ne sont pas rattachés à une ligne du diff (wiki : commit
|
Description
Description
Moves the documentation of the plugin from the
doc/folder to the GitHub wiki, as asked in thereview 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.mdand 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
PPRO display eligibility,
Oney enhancement,
Development;
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 andPayment-Methodslink to thenew pages.
README.md: the doc sections link to the wiki pages, no link todoc/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 (
headhook, CSP) moved to the wiki page.AuthorizedPaymentOperationProcessor.php: two comments citeddoc/authorized_payment.md, they nowcite 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
Testing
Security & Ops
Testing notes
The wiki pages are published and served (checked: Scalapay-Widget, PPRO-Display-Eligibility,
Oney-Enhancement, Development and Deferred-Capture answer 200)