andrepayone/payone-sdk-stream-client
PSR-18 stream-based HTTP client for the PAYONE Payment Integration SDK. Lightweight implementation to send requests to PAYONE APIs using PHP streams, suitable as a drop-in client for the php-payone-sdk.
GuzzleHttp\Client, Symfony\HttpClient). This aligns well with Laravel’s PSR-15/18 ecosystem (e.g., Illuminate\Http\Client).HttpClient facade) or directly via Http\Client\ClientInterface.HttpClient::withOptions().HttpClient cache work with this? Potential caching conflicts with streaming responses.Http::macro() or Http::withClient()).
use Http\Client\Common\Plugin\AddHostPlugin;
use Http\Client\Common\Plugin\HeaderSetPlugin;
use Http\Client\Common\Plugin\UrlRewritePlugin;
use Http\Client\Common\Plugin\BaseUriPlugin;
$client = new \Andrepayone\PayoneSdkStreamClient\PayoneStreamClient(
new \Http\Client\Curl\Client(),
config('payone.api_endpoint')
);
Http::macro('payone', fn () => Http::client($client));
AppServiceProvider for dependency injection.authorize, capture).Http::withOptions(['timeout' => 30])).cakasim/payone-sdk, this package may replace or extend its HTTP layer.HandleIncomingRequest).composer require andrepayone/payone-sdk-stream-client
.env and define a config file (config/payone.php).AppServiceProvider or use facades.Http::withOptions(['debug' => true])->payone()->post('/transactions', $data);
Http\Client\Curl\Client) reuse connections, reducing overhead.| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Network Timeout | Payment hangs/retries | Exponential backoff + circuit breaker (e.g., spatie/laravel-circuitbreaker). |
| PAYONE API Downtime | Failed transactions | Queue retries with dead-letter queue (DLQ). |
| Malformed Stream Response | Silent failures | Validate responses with PAYONE’s schema. |
| PHP Memory Limits | Large streams fail | Increase memory_limit or chunk processing. |
| Package Abandonment | No updates for critical bugs | Maintain a fork or switch to Guzzle. |
How can I help you explore Laravel packages today?