Skip to content

fix: process Walmart in-store receipt charges#73

Merged
eshaffer321 merged 2 commits into
mainfrom
codex/fix-walmart-in-store-payments
Jul 17, 2026
Merged

fix: process Walmart in-store receipt charges#73
eshaffer321 merged 2 commits into
mainfrom
codex/fix-walmart-in-store-payments

Conversation

@eshaffer321

Copy link
Copy Markdown
Owner

What changed

  • fall back to the receipt total when a completed Walmart IN_STORE order has exactly one CREDITCARD payment and its ledger is empty
  • preserve payment-pending behavior for online, split-tender, gift-card, and non-positive-total orders
  • document the root cause and live verification

Root cause

Walmart returns complete payment metadata and totals for in-store receipts on the order payload, but its separate order-ledger endpoint returns no payment methods. Itemize treated every empty ledger as an uncharged order, so completed in-store purchases were skipped indefinitely.

Validation

  • regression test proved the pre-fix payment-pending failure and now passes
  • go test ./... -race
  • golangci-lint and go vet ./...
  • live dry-run against all three affected receipts matched $9.88, $32.10, and $10.69 Monarch transactions and finished Processed=3 Skipped=0 Errors=0
  • dry-run made no Monarch writes

@codecov

codecov Bot commented Jul 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 61.89%. Comparing base (b01acb1) to head (5eb422b).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #73      +/-   ##
==========================================
+ Coverage   61.81%   61.89%   +0.08%     
==========================================
  Files          46       46              
  Lines        6021     6034      +13     
==========================================
+ Hits         3722     3735      +13     
  Misses       2046     2046              
  Partials      253      253              
Flag Coverage Δ
unittests 61.89% <100.00%> (+0.08%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
internal/adapters/providers/walmart/order.go 72.54% <100.00%> (+2.54%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@eshaffer321
eshaffer321 merged commit 5b3e06b into main Jul 17, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant