Skip to content

fix: correct getPayee() and silent env fallback - #18

Closed
lepresk wants to merge 3 commits into
mainfrom
fix/multiple-bugs-12-14-15
Closed

fix: correct getPayee() and silent env fallback#18
lepresk wants to merge 3 commits into
mainfrom
fix/multiple-bugs-12-14-15

Conversation

@lepresk

@lepresk lepresk commented Apr 22, 2026

Copy link
Copy Markdown
Owner

Summary

Two bugs fixed:

Test plan

  • All 76 existing tests pass (composer test)
  • Verify getPayee() returns correct beneficiary on a disbursement transaction
  • Verify passing 'Sandbox' (wrong case) throws instead of routing to production

🤖 Generated with Claude Code

lepresk and others added 3 commits April 22, 2026 19:43
When useClient() was called before collection(), disbursement(), or create(),
the base_uri setup was skipped entirely, causing Symfony to throw
"Invalid URL: scheme is missing" on relative paths.

Closes #10

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Transaction::getPayee() was delegating to getPayer(); model now stores
  payer and payee separately so each getter reads the right data (#12)
- AirtelDisbursementApi was casting amounts via intval(), silently
  truncating fractional values like 100.50 to 100 (#14)
- MomoApi::getBaseUrl() was falling through to PRODUCTION_URL for any
  unknown environment string; now throws InvalidArgumentException (#15)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@lepresk lepresk changed the title fix: correct getPayee(), amount truncation, and silent env fallback fix: correct getPayee() and silent env fallback Apr 22, 2026
@lepresk lepresk closed this Apr 22, 2026
@lepresk
lepresk deleted the fix/multiple-bugs-12-14-15 branch April 22, 2026 18:58
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.

getBaseUrl() silently falls back to production for unknown environments Transaction::getPayee() returns payer data instead of payee

1 participant