v1.1.0
The developer-experience release. π§°
v1.0.0 got a top-to-bottom review through a first-time consumer's eyes (#10); this release ships the follow-ups. Everything is additive β no changes to existing signatures for callers β and every API-facing claim was verified against the live Quickpay API.
composer require setono/quickpay-php-sdk:^1.1Highlights
- Find the payment for an order.
$client->payments()->findByOrderId($orderId)β exact match,nullwhen absent. Together withcreate()it makes checkout find-or-create a one-liner (Quickpay enforcesorder_iduniqueness per account, so a retried checkout used to explode with "already exists on another payment"). Listing gained a typedPaymentsQuery(state,accepted,minTime/maxTime,acquirer,sortBy/sortDir, β¦) forgetPage()/paginate(). (#12) - Read what happened without hand-rolling it.
Operation::isApproved(), and onPayment:authorizedAmount(),capturedAmount(),refundedAmount(),isCancelled(),hasPendingOperation(),latestOperation(),operation($id),operationsOfType(). Only approved operations count β the exact place integrations used to get subtly wrong. (#13) - The whole API within reach.
Client::delete(), plain-array bodies onpost()/put()/patch()(sent as given, so unmodeled endpoints β renew, subscriptions, β¦ β are a one-liner),PaymentsEndpoint::deleteLink(), and a README section on calling endpoints the SDK doesn't model. Bodies arePayload|array $body = [], never null; an empty body goes out as{}. (#14) catch (QuickpayException $e)now really nets everything. Transport failures (DNS, refused connection, timeout) are wrapped inTransportException, which is also a PSR-18ClientExceptionInterface, so existing catches keep working; the original isgetPrevious(),isNetworkError()tells network from request errors. (#18)- Callbacks from any stack.
handleGlobals()for plain PHP (php://input+$_SERVER),handleRaw()now takes the optionalaccountId/apiVersionheaders, and the README has Symfony / Laravel / plain-PHP snippets. (#17) - Production cache in one argument.
new Client('β¦', cache: new FileSystemCache($dir))(and the same onCallbackHandler) β no more hand-wiring Valinor builders and forgetting the SDK's configuration. (#16) - Small things that add up.
Payment::variables()(your keys, verbatim),Payment::$deadlineAt/$acquirer,CreatePaymentRequest::$shopsystemso a plugin can identify itself, a memoizedCallback::payment(), and the SDK version in theUser-Agent. (#19) - Docs that teach the model, not just the SDK. Table of contents; a "Concepts" section (the two keys, minor units, a payment as a ledger of operations, async operations, the redirect is not proof of payment); "Handling callbacks robustly" (retries β idempotency on operation ids, per-payment ordering, respond fast, why 403/400); an end-to-end checkout recipe and Symfony wiring; accurate install text; a
CHANGELOG.md; docs shipped in the dist again. (#20, #21) - Safety and hygiene.
Client::request()now runs the same host-pinning guard as every other method (a consumer-built request could previously carry the API key to another host β #11). PRs are now gated by a Roave BC check (#23).
BC notes
Nothing changes for code that calls the SDK. Two things could touch unusual code:
ClientInterfacegaineddelete(), andpost()/put()/patch()takePayload|array $body = []instead of?Payload $body = nullβ relevant only if you implement the interface (a mock-only interface) or passed an explicitnullbody (pass nothing, or[]). (#14)- Code that caught
Psr\Http\Client\NetworkExceptionInterface/RequestExceptionInterfacespecifically (rather thanClientExceptionInterface) should catchTransportExceptionand inspectgetPrevious()/isNetworkError(). (#18) CollectionRequestOptionsis no longerfinal, and itspage/pageSizeare plain public properties (a readonly property cannot be reinitialized duringclonebefore PHP 8.3) β the withers still validate. (#12)
Won't do
- A shipped test double (#15): the seam is the PSR-18 client, and every stack already has a mock for it β the README now shows how to plug it in.
Quality
166 tests (was 109), PHPStan level max, MSI gate unchanged, CI across PHP 8.1β8.5 Γ lowest/highest, plus the new backwards-compatibility check on every PR β and a live smoke run (create β link β get) against the real API on the merged branch.
Full changelog: v1.0.0...v1.1.0 Β· CHANGELOG.md