Skip to content

Keep the oneoff payload within EveryPay's field limits and reword the statement text - #10

Merged
acirtautas merged 3 commits into
mainfrom
truncate-address-fields
Aug 5, 2026
Merged

Keep the oneoff payload within EveryPay's field limits and reword the statement text#10
acirtautas merged 3 commits into
mainfrom
truncate-address-fields

Conversation

@acirtautas

@acirtautas acirtautas commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Billing/shipping address fields are capped at the character limits EveryPay enforces from 2026-10-01 (city/line1 50, postcode 16), using mb_substr so multibyte letters count as characters. A truncated address still feeds fraud scoring; an over-long one could reject the whole request.
  • order_reference is transliterated and reduced to the charset the spec allows, with the order-number prefix capped at 100 characters (the Open Banking limit is 120). Sylius' default numeric order numbers pass untouched; the -{paymentId} suffix keeps the reference unique either way.
  • The Open Banking statement text becomes {channel} ({number}) instead of {channel} order {number} - a language-neutral noun phrase that also reads naturally when the platform prefixes the refund transfer's copy of it with Refund - . The 65-character cap now trims the channel name, never the order number.

Companion to #9, which updates the distilled API reference these constraints come from.

Test plan

  • vendor/bin/phpunit - 111 tests green
  • vendor/bin/behat --strict - 15 scenarios green
  • vendor/bin/phpstan analyse (level 9) and vendor/bin/ecs check - clean

🤖 Generated with Claude Code

@acirtautas acirtautas changed the title Truncate address fields to the limits EveryPay enforces from 2026-10 Keep the oneoff payload within EveryPay's field limits and reword the statement text Aug 5, 2026
@acirtautas
acirtautas merged commit 4987d4c into main Aug 5, 2026
8 checks passed
@acirtautas
acirtautas deleted the truncate-address-fields branch August 5, 2026 14:15
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