Skip to content

1.1.1

Choose a tag to compare

@github-actions github-actions released this 07 Sep 13:09
· 4 commits to master since this release

πŸš€ 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

  • 🏬 submerchantExternalId is 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 with 400 "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" β€” BuildsCommonPayloadBody and createRefund()
    omit the key entirely when it is null or '', since a CMS reading an unset value out of
    its own settings storage yields '' far more often than a real null, 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

  • πŸ’± currency on 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 empty submerchantExternalId locally with
    InvalidRefundRequestException β€” orderId and description keep that fail-fast guard.
  • BuildsCommonPayloadBody::buildRedirectBody() extracted from buildPayloadBody(); no behavior
    change.
  • Design rationale in CLAUDE.md and .env.example corrected in place rather than deleted,
    including the caveat that the staging run which confirmed the fix changed both
    submerchantExternalId and currency at 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