Skip to content

fix: useClient() base_uri bypass, getPayee() wrong data, getBaseUrl() silent fallback - #19

Merged
lepresk merged 1 commit into
mainfrom
fix/issues-10-12-15
Apr 22, 2026
Merged

fix: useClient() base_uri bypass, getPayee() wrong data, getBaseUrl() silent fallback#19
lepresk merged 1 commit into
mainfrom
fix/issues-10-12-15

Conversation

@lepresk

@lepresk lepresk commented Apr 22, 2026

Copy link
Copy Markdown
Owner

Fixes #10, #12, #15

#10useClient() followed by collection() / disbursement() / create() skipped the base_uri setup block entirely (guarded by $client === null), causing Symfony to throw Invalid URL: scheme is missing. Now applies withOptions() on the existing client.

#12Transaction::getPayee() was delegating to getPayer() (copy-paste bug). The model now stores $payer and $payee as separate fields; parse() maps them from the correct API keys.

#15getBaseUrl() fell through to PRODUCTION_URL for any unknown environment string (typo risk). Now throws InvalidArgumentException for values not matching a known constant.

…tBaseUrl() silent fallback

- useClient() followed by collection()/disbursement()/create() skipped the
  base_uri setup entirely; now applies withOptions() on the existing client
- Transaction::getPayee() delegated to getPayer(); model now stores payer
  and payee separately so each getter reads the correct field
- getBaseUrl() silently routed unknown environments to production;
  now throws InvalidArgumentException for unrecognized values
@lepresk
lepresk merged commit 6dbcb83 into main Apr 22, 2026
3 checks passed
@lepresk
lepresk deleted the fix/issues-10-12-15 branch April 22, 2026 19:52
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.

useClient() bypasses base_uri setup, causing relative URL failures

1 participant