Repository navigation
fix: read the merchant name from lunar.checkout.merchant - #1
Merged
Merged
Conversation
The package merges its config under `lunar.checkout`, but the checkout header and the root view's tab title read `checkout.merchant`, so CHECKOUT_MERCHANT and a published config value were never used. The processing page ignored the setting altogether and showed `app.name`. Both pages now resolve the name from one helper, and the tab title reads the same key. Also pins that the checkout renders, and refuses to pay, before any payment method is registered. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
alecritson
marked this pull request as ready for review
September 29, 2026 13:11
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.
Problem
CheckoutServiceProvidermergesconfig/checkout.phpunderlunar.checkout, but three places readcheckout.merchant:CheckoutController::projectCheckout)app.blade.php)So
CHECKOUT_MERCHANT, and a merchant set in a publishedconfig/lunar/checkout.php, were never used. The header always fell back toapp.name. It only worked in Edwardes because the app setsconfig(['checkout.merchant' => ...])directly. The tests set the same wrong key, so they passed anyway.The processing page was separate: it rendered
config('app.name', 'Store')and ignored the setting, so its header could show a different name from the checkout's.Change
merchant()helper on the controller:lunar.checkout.merchant, falling back toapp.name. Used by both the checkout and processing pages.lunar.checkout.merchant.Payment methods
I also checked what happens when a store installs checkout before it registers any payment method. It already behaves well: the page renders, the payment section shows "No payment methods are available." with pay disabled, and
payreturns 422. A new test covers that, since none did.Testing
lunar.checkout.merchant. On the old code, the header test fails.payrefuses with 422.🤖 Generated with Claude Code