Skip to content

Releases: comfino/php-api-client

2.1.0-beta1

01 Jun 15:31

Choose a tag to compare

Added

  • Product-level filtering on financial products queries — new optional allowedProductsConfig parameter on GetFinancialProducts and order endpoints (createOrder(), validateOrder()) allows per-product term constraints (min/max term, specific allowed terms). Fully backward-compatible.
  • MessagePack serialization support — new optional Comfino\Api\Serializer\MsgPack class for MessagePack request/response payloads. Requires the optional ext-msgpack PHP extension. Content negotiation automatically selects the serializer based on server response headers.
  • Shop environment reporting — new reportShopEnvironment() method sends structured shop environment data (plugin version, platform, theme, capabilities) server-to-server to the Comfino API for fingerprinting, auto-detection recommendations, and version tracking. Uses ShopEnvironmentReport and ShopTheme DTOs with comprehensive validation (max string lengths, theme parent depth limits, capability matrix bounds).
  • Creditors map endpoint — new getCreditors() method returns a map of financial product type codes to arrays of creditor codes (array<string, string[]>) for the authenticated shop account. Used to pass the creditors option to the Comfino Paywall SDK so it can render creditor logos next to each payment method.

Changed

  • Automatic Content-Type negotiation — client now automatically negotiates request and response serialization formats based on Content-Type headers. JSON remains the default; MessagePack is automatically selected if configured. Fully backward-compatible.

2.0.0

15 Apr 20:56

Choose a tag to compare

Added

  • Initial release of a redesigned PSR-compliant PHP client for the Comfino payment gateway REST API.
  • PSR-7 / PSR-17 / PSR-18 compliant HTTP layer with no framework dependencies.
  • Client class with full Comfino REST API coverage: createOrder(), validateOrder(), getOrder(), cancelOrder(), getFinancialProducts(), getFinancialProductDetails(), getProductTypes(), getWidgetKey(), getWidgetTypes(), isShopAccountActive().
  • Fire-and-forget notification methods: sendLoggedError(), notifyPluginRemoval(), notifyAbandonedCart().
  • RetryExecutor with ExponentialBackoffRetryPolicy for automatic retry with exponential backoff on transient network errors.
  • TimeoutAwareClientInterface support for per-attempt timeout escalation during retries.
  • Typed exception hierarchy mapped to HTTP status codes: RequestValidationError (400), AuthorizationError (401), Forbidden (403), NotFound (404), MethodNotAllowed (405), Conflict (409), ServiceUnavailable (5xx), ConnectionTimeout (retry exhausted).
  • SHA3-256 request signing for order creation (Comfino-Cart-Hash, Comfino-Customer-Hash, Comfino-Order-Signature headers).
  • WebhookSignatureVerifier for timing-safe CR-Signature verification of incoming webhook requests.
  • PaywallAuthKeyGenerator for time-limited HMAC-SHA3-256 auth token generation for the Paywall V3 iframe.
  • Forward-compatible enum handling via LoanType::fromApiValue() and Unknown* flyweights for unrecognized API values.
  • Shop domain integration interfaces: OrderInterface, CartInterface, CustomerInterface, LoanParametersInterface, SellerInterface.
  • Docker development environment (PHP 8.1-cli-alpine) and bin/ wrapper scripts.
  • PHPUnit 10.5 test suite with unit and integration test suites.
  • GitHub Actions CI matrix across PHP 8.1–8.4 with Codecov coverage upload.