✨ server: show friendly decline reasons#1141
Conversation
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (9)
WalkthroughThis PR expands Panda decline-reason handling with normalized friendly mappings, merchant fallback behavior, conditional notifications, localized server and client translations, parameterized tests, and patch changesets for the affected packages. ChangesFriendly Decline Reasons
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant PandaWebhook
participant Reject
participant TransactionStore
participant DeclinedNotification
PandaWebhook->>Reject: declineReason
Reject->>Reject: normalize and resolve reason
Reject->>TransactionStore: upsert declined transaction
TransactionStore-->>Reject: isNew
Reject->>DeclinedNotification: send mapped push reason when eligible
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
✨ Simplify code
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request expands the transaction decline reasons in the Panda webhook hook, normalizing the reasons to lowercase and introducing a pushReason property for customized push notifications. It also adds corresponding translations in Spanish and Portuguese, along with comprehensive test coverage. The review feedback suggests sorting the newly added translation keys alphabetically across all modified translation files to maintain consistency and avoid future merge conflicts.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
There was a problem hiding this comment.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 6291fb3f-2f5c-4a79-a30a-64e1f0121a1c
📒 Files selected for processing (7)
.changeset/tall-geese-share.mdserver/hooks/panda.tsserver/i18n/es.jsonserver/i18n/pt.jsonserver/test/hooks/panda.test.tssrc/i18n/es.jsonsrc/i18n/pt.json
🦋 Changeset detectedLatest commit: 5e2e44a The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Summary by CodeRabbit