Skip to content

fix(mcp): preserve receipt method#8

Open
EfeDurmaz16 wants to merge 1 commit into
stripe:mainfrom
EfeDurmaz16:fix/mcp-receipt-core-method
Open

fix(mcp): preserve receipt method#8
EfeDurmaz16 wants to merge 1 commit into
stripe:mainfrom
EfeDurmaz16:fix/mcp-receipt-core-method

Conversation

@EfeDurmaz16
Copy link
Copy Markdown

@EfeDurmaz16 EfeDurmaz16 commented May 15, 2026

Summary

  • Preserve MCPReceipt#method when converting an MCP receipt back to a core Mpp::Receipt.
  • Add a regression test covering non-default payment method provenance during to_core.

Why

  • MCP receipts carry the payment method/rail provenance, but to_core previously constructed Mpp::Receipt without passing method, which defaulted the core receipt back to "".
  • Keeping this field intact helps downstream receipt/evidence handling distinguish rails such as Stripe, Tempo, or other MPP methods.

Verification

  • mise exec ruby@3.3.11 -- ruby -Ilib -Itest test/mpp/extensions/mcp/test_types.rb
  • mise exec ruby@3.3.11 -- ruby -c lib/mpp/extensions/mcp/types.rb
  • mise exec ruby@3.3.11 -- ruby -c test/mpp/extensions/mcp/test_types.rb
  • git diff --check

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