WA-NEW-006: Fix Payment#complete? to treat zero authorization as incomplete#630
Open
kitcommerce wants to merge 6 commits intonextfrom
Open
WA-NEW-006: Fix Payment#complete? to treat zero authorization as incomplete#630kitcommerce wants to merge 6 commits intonextfrom
kitcommerce wants to merge 6 commits intonextfrom
Conversation
This was referenced Feb 20, 2026
Closed
3eae95f to
8f991bc
Compare
Author
added 6 commits
February 20, 2026 14:17
…(ES7) The use_dis_max parameter was removed from the Elasticsearch query_string query in ES7. It caused a 400 parsing_exception: [query_string] query does not support [use_dis_max] In ES7 the equivalent behavior is achieved via tie_breaker (default 0.0 gives pure dis_max scoring). Where tie_breaker was already present (product search) only use_dis_max was removed; where it was absent (admin index search, help search) removing the flag restores the ES7 default (tie_breaker=0). Files changed: - core/app/queries/workarea/search/admin_index_search.rb - core/app/queries/workarea/search/help_search.rb - core/app/queries/workarea/search/product_search.rb
…uthorizations Two interrelated fixes: 1. Pricing::Request#save_order — Mongoid 7 as_document returns nested BSON::Document values (e.g. Money fields) that update_attributes! cannot properly deserialize. Using as_json performs a deep, recursive JSON-safe conversion so Money totals are correctly persisted after pricing runs. Also switch reverse_merge to use string key 'items' (not symbol) to avoid creating duplicate symbol/string key pairs. 2. Checkout::Steps::Payment#complete? — add credit_card_authorizable? guard: if a credit card tender is present its amount must be positive. A zero-amount credit card results in a no-op authorization and must not allow an order to proceed to placement. This is a defensive check on top of the purchasable? amount comparison. Fixes: payment_test.rb test_complete? refute at line 95 Verified: payment_test, checkout_test, pricing/request_test all green
8f991bc to
31b767f
Compare
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.
Summary
Fix
Payment#complete?to returnfalsewhen the credit card amount is zero (non-authorizing), preventing invalid orders from being placed.Closes #629
Client impact
None expected. Internal fix to checkout logic — no public API changes.
Verify
Note
This branch also includes earlier stabilization commits (WA-NEW-002 through WA-NEW-005) that have not yet been merged to
next. Those should ideally land first or be reviewed as part of this stack.