Repository navigation
Conversation
admin/settings and admin/settings/validate check paymentProvider against the provider registry and answer 400 naming the registered providers, instead of saving an id that then fails at checkout. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
moset15
added a commit
to FIKANOVA/dashcommerce
that referenced
this pull request
Nov 26, 2026
…vider) into fork main [FIK-71] fix(core): reject an unregistered payment provider in settings (fork integration of upstream emdashCommerce#92)
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.
Follow-up from your #81 review. Independent of #85 and of the other follow-ups; merge in any order.
Problem
The settings API checks only that
paymentProviderlooks like an id. A typo (paystak) or a provider whose package isn't imported on the server saves fine, then checkout fails.Change
admin/settingsandadmin/settings/validatecheck the value against the provider registry. An unregistered id gets a 400 undererrors.paymentProvider:The schema module still only checks the shape, so the admin bundle doesn't import the registry. Saves that don't include
paymentProviderare unaffected.Tested
Two route tests in
provider-credentials-settings.test.ts: the save refuses an unregistered id and stores nothing, a registered one still saves, and the single-field validator flags it too. Both fail without the change. Core: 317 pass.🤖 Generated with Claude Code