nokimaro/liontech-php-sdk
Community-maintained PHP 8.3+ SDK for FusionPayments (formerly LionTech). Type-safe, domain-oriented API covering orders, payments, refunds, payouts, tokens, transfers, balances; PSR-18 compatible, supports token refresh, webhook verification, and RSA card encryption.
Full Changelog: https://github.com/nokimaro/liontech-php-sdk/compare/v1.1.4...v1.2.0
Full Changelog: https://github.com/nokimaro/liontech-php-sdk/compare/v1.1.3...v1.1.4
WebhookPayload usage exampleexamples/04_webhook_verification.php with isSuccessful() / isDeclined() / error handlingFull Changelog: https://github.com/nokimaro/liontech-php-sdk/compare/v1.1.2...v1.1.3
WebhookPayload DTO for parsing incoming webhook notifications via WebhookPayload::fromJson($json)WebhookError DTO with hasError() helperWebhookEventType enum$webhook = WebhookPayload::fromJson(file_get_contents('php://input'));
if ($webhook->payment->isSuccessful()) {
// fulfil the order
}
if ($webhook->error?->hasError()) {
// log $webhook->error->description
}
Full Changelog: https://github.com/nokimaro/liontech-php-sdk/compare/v1.1.1...v1.1.2
paymentData.object serialization — was sending [] (array), now correctly sends {} (empty object) as required by the APIerror.details[].description values for richer diagnostics (e.g. Invalid input parameters. Payment method is not enabled for this merchant site.)SbpData class removed — replace PaymentData::sbp(new SbpData(...)) with PaymentData::sbp() (no arguments)Full Changelog: https://github.com/nokimaro/liontech-php-sdk/compare/v1.1.0...v1.1.1
CreateOrderRequest: description is now a required constructor parameter. The API was returning HTTP 400 when this field was absent, despite the OpenAPI spec marking it as optional.
CreateRefundRequest: webhookUrl is now a required constructor parameter. The API requires this field — previously the SDK silently omitted it when null, causing silent 400 errors at runtime.
ApiExceptionMapper: Fixed error extraction to unwrap the API response envelope {type, object, error} before reading error details. Previously error messages were lost on non-2xx responses.
Transport: Fixed GET requests to apply authentication headers (were missing).
Client / EncryptionKeyClient: Moved encryption key retrieval to a dedicated EncryptionKeyClient using the correct endpoint. The previous implementation used SignatureClient with the wrong endpoint.
Json::decodeObject() helper for envelope-wrapped single-object responses.CreateOrderRequest::__construct() — description is now the 2nd positional argument and is required (no default). Code using named arguments is unaffected if description was already passed; code omitting it will get a compile-time error.CreateRefundRequest::__construct() — webhookUrl is now the 3rd positional argument and is required (no default).// Before
new CreateOrderRequest(amount: $amount);
new CreateRefundRequest(amount: $amount, paymentId: $id);
// After
new CreateOrderRequest(amount: $amount, description: 'Your description');
new CreateRefundRequest(amount: $amount, paymentId: $id, webhookUrl: 'https://example.com/webhook');
Full Changelog: https://github.com/nokimaro/liontech-php-sdk/compare/v1.0.1...v1.1.0
ResponseStatus value object — status field now exposes value, changedAt, and description instead of discarding the latter twoPaymentResponse::$paymentMethod type: was PaymentData|null (request VO), now ?string per specPayoutResponse::$paymentMethod type: was array|null (silently returned null for string values), now ?string per specFull Changelog: https://github.com/nokimaro/liontech-php-sdk/compare/v1.0.0...v1.0.1
Full Changelog: https://github.com/nokimaro/liontech-php-sdk/compare/v1.0.0...v1.0.1
Full Changelog: https://github.com/nokimaro/liontech-php-sdk/commits/v1.0.0
Full Changelog: https://github.com/nokimaro/liontech-php-sdk/commits/v1.0.0
How can I help you explore Laravel packages today?