Repository navigation
PAY-005A1: prevent invalid partial refunds from becoming full - #201
Merged
Merged
Conversation
✅ Deploy Preview for luminous-fox-7c393f ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
9 tasks done
4 of 6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Outcome
Invalid partial-refund amounts now stop before Stripe or a business-record write. They can no longer lose their amount and silently become full refunds.
Both existing admin refund Functions use one non-coercing validator. Every admitted partial request sends the exact integer amount. Only an explicit full-refund action may omit it. An uncertain Stripe result returns a fixed message that says the result is unconfirmed, do not retry, and escalate.
Closes #200.
Financial-safety invariant
amount.refund_fullomitsamount.Red/green evidence
git diff --checkpasses.346df6c6726ca46ac1f46e5b36af5364865e8ff1and full diff SHA-256091ad489adec4608f451569a7af3eda24de599e2c38018432d920616ad77ca1bwith no findings.Officer impact
After the exact Functions are safely deployed, an invalid partial amount will stop instead of becoming a full refund. If Stripe's result cannot be confirmed, the page will say not to retry and to escalate to the treasurer and platform owner.
Officer documentation
docs/officers/EVENTS_SHOP_MEMBERS.mdThe procedure and diagram are marked SOURCE ONLY, NOT LIVE. They use made-up records and Stripe test mode only after protected staging and both Function readbacks exist.
Deployment evidence
346df6c6726ca46ac1f46e5b36af5364865e8ff1.29298036773, and in exact post-merge CI run29298127585.caae31ff427e91325d34a6c901faf81ad1dc49df.runmprc.comverified: not applicable; no website runtime changed and nothing was published.Remaining PAY-005 work
This is immediate containment, not a safe production refund system. Stable command identity/idempotency, current remaining-refundable Stripe truth, concurrency control, pending/event-finalized totals, reconciliation, finance capability/MFA/recent-auth, approved policy, protected deployment, provider readback, and live verification remain open. An unconfirmed provider result must be reconciled, never blindly retried.