Releases: comfino/php-api-client
Releases · comfino/php-api-client
2.1.0-beta1
Added
- Product-level filtering on financial products queries — new optional
allowedProductsConfigparameter onGetFinancialProductsand 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\MsgPackclass for MessagePack request/response payloads. Requires the optionalext-msgpackPHP 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. UsesShopEnvironmentReportandShopThemeDTOs 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 thecreditorsoption 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-Typeheaders. JSON remains the default; MessagePack is automatically selected if configured. Fully backward-compatible.
2.0.0
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.
Clientclass with full Comfino REST API coverage:createOrder(),validateOrder(),getOrder(),cancelOrder(),getFinancialProducts(),getFinancialProductDetails(),getProductTypes(),getWidgetKey(),getWidgetTypes(),isShopAccountActive().- Fire-and-forget notification methods:
sendLoggedError(),notifyPluginRemoval(),notifyAbandonedCart(). RetryExecutorwithExponentialBackoffRetryPolicyfor automatic retry with exponential backoff on transient network errors.TimeoutAwareClientInterfacesupport 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-Signatureheaders). WebhookSignatureVerifierfor timing-safe CR-Signature verification of incoming webhook requests.PaywallAuthKeyGeneratorfor time-limited HMAC-SHA3-256 auth token generation for the Paywall V3 iframe.- Forward-compatible enum handling via
LoanType::fromApiValue()andUnknown*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.