1.1.1
π UPC 1.1.1
Corrective release making submerchantExternalId optional across the payment-creation and refund
paths, and adding an optional currency to refunds β non-EUR configurations can now be paid and
refunded, which 1.1.0 made impossible.
π Fixed
- π¬
submerchantExternalIdis no longer required β it belongs to the UDV/MID configuration for
the payment's currency, not to a payment method: the EUR configurations own a submerchant,
the ones used for other currencies own none. 1.1.0 required it everywhere, so a non-EUR payment
or refund was rejected with400 "Invalid parameter."and had no way through.
CommonFieldsDto::__construct()'s 5th parameter is now?string = null, and
UnifiedApiPaymentService::createRefund()'s 5th is too β both still in place, so existing
5-argument positional callers are unaffected. - π³οΈ An empty submerchant is treated as "none" β
BuildsCommonPayloadBodyandcreateRefund()
omit the key entirely when it isnullor'', since a CMS reading an unset value out of
its own settings storage yields''far more often than a realnull, and''is rejected by
the API just like a submerchant the configuration does not own. When present, the key keeps its
original position in the body.
β¨ Added
- π±
currencyon refunds βUnifiedApiPaymentService::createRefund()takes an optional
trailing?string $currency = null, sent only when non-null and non-empty. Until now no currency
was sent at all, so$amount's minor units travelled bare for the platform to interpret β
unambiguous only while every payment used the account's default currency, and a real gap for a
multi-currency merchant.
β»οΈ Changed
createRefund()no longer rejects an emptysubmerchantExternalIdlocally with
InvalidRefundRequestExceptionβorderIdanddescriptionkeep that fail-fast guard.BuildsCommonPayloadBody::buildRedirectBody()extracted frombuildPayloadBody(); no behavior
change.- Design rationale in
CLAUDE.mdand.env.examplecorrected in place rather than deleted,
including the caveat that the staging run which confirmed the fix changed both
submerchantExternalIdandcurrencyat once.
β Quality
PHPStan level 8, PHP-CS-Fixer, PHPUnit, and CI verifying PHP 7.1β8.2 compatibility β all clean on
this release branch. Seven unit tests added or reworked around the new omission rules, plus the
refund integration test reworked to run on a configuration that owns no submerchant.
π Requirements
- PHP β₯7.4 to install/develop (build-tooling floor only β shipped source runs on PHP 7.1)
- Runtime dependency:
giggsey/libphonenumber-for-php
π Full Changelog: 1.1.0...1.2.0