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

Saferpay Laravel Package

digital-link/saferpay

Laravel package for integrating Saferpay payments: create and manage transactions, handle redirects and callbacks, and verify payment status. Provides a clean PHP API to connect your app to Saferpay’s gateway with configurable credentials and endpoints.

View on GitHub
Deep Wiki
Context7

Saferpay API, an unofficial implementation

Frequently asked questions about Saferpay
What Laravel versions does this Saferpay package support?
The package is designed for Laravel 8.x and 9.x, but always verify compatibility with your specific version by checking the package’s documentation or testing in a staging environment. Since it’s unofficial, ensure no breaking changes exist for your Laravel version. For Laravel 10.x, check for updates or compatibility patches.
How do I install and configure the Saferpay package in Laravel?
Install via Composer with either Guzzle or Buzz HTTP client (`payment/saferpay` and `payment/httpclient-buzz` or `payment/httpclient-guzzle`). Publish the config file using `php artisan vendor:publish` and set your Saferpay credentials (account ID, API keys) in `.env`. The package provides a facade (`Saferpay::`) for easy integration.
Does this package support Saferpay’s sandbox environment for testing?
Yes, the package allows testing in Saferpay’s sandbox by configuring test credentials (e.g., `SAFERPAYTESTACCOUNT_ACCOUNTID`). Use the sandbox for development and staging to verify transactions, refunds, and callbacks before going live. Always validate responses against expected amounts and currencies.
Can I handle Saferpay callbacks (webhooks) with this package?
The package supports callback verification via `verifyPayConfirm()` and `payCompleteV2()` methods, but it does not natively include webhook routing. You’ll need to manually route callbacks to a Laravel controller and validate signatures using the package’s tools. Consider using Laravel’s `HasApiTokens` or middleware for secure endpoint handling.
What happens if Saferpay’s API changes or deprecates endpoints?
Since this is an unofficial package, there’s a risk of breaking changes if Saferpay updates their API. Monitor the package’s issue tracker or GitHub for updates, and test thoroughly in sandbox before production. For critical applications, consider contributing to the package or maintaining a fork to adapt to API changes.
How do I securely store and manage Saferpay API credentials?
Store credentials in Laravel’s `.env` file (e.g., `SAFERPAY_ACCOUNT_ID`, `SAFERPAY_API_KEY`) and restrict access via environment variable validation. Avoid hardcoding keys in config files or version control. Use Laravel’s `config()` helper to retrieve credentials securely in your application logic.
Does this package support subscription-based payments or recurring billing?
The package primarily focuses on one-time transactions and basic refunds. For subscriptions, you’ll need to implement recurring logic manually (e.g., using Laravel queues to trigger payments on a schedule). Check Saferpay’s API docs for subscription-specific endpoints and integrate them via the package’s HTTP client.
Are there any known security risks or PCI compliance considerations?
As an unofficial package, PCI compliance isn’t guaranteed. Ensure sensitive data (e.g., card tokens, signatures) is handled securely—use HTTPS, avoid logging raw payment data, and validate all inputs. For high-risk applications, audit the package’s cryptographic handling (e.g., 3D Secure) or consult Saferpay’s official PCI guidelines.
How do I integrate this package with Laravel’s queue system for async operations?
Offload non-critical operations (e.g., refunds, subscription updates) by dispatching jobs (e.g., `SaferpayRefundJob`) to Laravel’s queue. Use the package’s methods within job handlers, ensuring HTTP clients are stateless. For high-throughput scenarios, consider rate-limiting or batching requests.
What alternatives exist for Saferpay integration in Laravel?
Compare with the official Saferpay PHP SDK (if available) or Laravel-specific packages like `spatie/laravel-saferpay` (if it exists). Official SDKs may offer broader feature support and updates, but unofficial packages like this one provide Laravel-native convenience. Evaluate trade-offs between stability and ease of integration.
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