Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Liontech Php Sdk

Liontech Php Sdk Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Community-maintained PHP SDK for the LionTech Payment Gateway

Frequently asked questions about Liontech Php Sdk
How do I integrate this SDK with Laravel for FusionPayments payments?
Use the companion package `nokimaro/liontech-laravel` for seamless Laravel integration. It provides a service provider, facade, and config file. Install it via Composer, publish the config, and inject the `Liontech` facade into your controllers or services. The SDK itself is framework-agnostic but works flawlessly with Laravel’s service container.
Does this SDK support FusionPayments' sandbox environment for testing?
Yes, the SDK supports both production and sandbox environments. Set the `baseUrl` parameter in the `Client` constructor to `https://api.sandbox.fusionpayments.io` for testing. Always test webhook signatures in sandbox before deploying to production to avoid signature validation failures.
What Laravel versions are compatible with this SDK?
The SDK itself requires PHP 8.3+, but the Laravel wrapper (`nokimaro/liontech-laravel`) is designed for Laravel 9.x and above. Ensure your Laravel version supports PHP 8.3 for full compatibility. Check the Laravel wrapper’s documentation for specific version requirements.
How do I handle webhook signature verification in Laravel?
The SDK includes built-in webhook verification with RSA PKCS1v1.5 padding support. In Laravel, use the `webhookVerifier()` method to validate signatures. Log validation results for debugging and abort with a 401 status if invalid. Example: `$verifier->verify($headers, $payload)` returns a boolean. Always log failures for PCI compliance audits.
Can I use a custom HTTP client instead of Guzzle?
Yes, the SDK is PSR-18 compliant, so you can use any PSR-18 HTTP client like Symfony’s HttpClient or PHP-HTTP. Configure your preferred client when creating the `Client` instance. Guzzle is recommended due to its widespread adoption and robust features, but the SDK remains flexible for alternative implementations.
What happens if FusionPayments changes their API or webhook signature scheme?
Since this is an unofficial SDK, monitor FusionPayments’ API changelog for updates. The recent PKCS1v1.5 padding fix highlights the risk of undocumented changes. Implement a fallback mechanism, such as logging and alerting on signature failures, and test webhooks in sandbox before production deployment to mitigate risks.
How do I handle token refreshes for FusionPayments API access?
The SDK supports automatic token refresh via the `refreshToken` parameter in the `Client` constructor. If the access token expires, the SDK will attempt to refresh it using the refresh token. Ensure you store the refresh token securely and handle potential refresh failures gracefully, such as by retrying or notifying administrators.
Is this SDK PCI compliant for production use?
The SDK adheres to security best practices, including RSA encryption and webhook signature verification with PKCS1v1.5 padding. However, PCI compliance depends on your implementation. Follow FusionPayments’ PCI guidelines, secure API credentials, and use HTTPS for all communications. The recent webhook fix directly addresses a critical PCI compliance requirement.
How do I test refunds or payouts using this SDK?
Use the `refund()` and `payout()` methods provided by the SDK’s domain-oriented API. For testing, create refunds or payouts in the sandbox environment first. The SDK returns typed response objects, so you can validate the results programmatically. Example: `$liontech->refunds()->create($refundRequest)` for initiating a refund.
What alternatives exist for FusionPayments integration in Laravel?
If you prefer an official solution, check if FusionPayments provides an official SDK or API documentation for direct integration. Other unofficial options include building a custom client using their REST API or exploring Laravel cashier-like packages for payment gateways. However, this SDK is the most mature community-maintained option for FusionPayments.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
terminal42/code-quality-tools
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky