lemonway/sdk-bundle
Symfony bundle for integrating Lemon Way payment services. Provides configuration and dependency injection for the Lemon Way API, helping PHP applications handle wallets, payments, and marketplace transactions through a familiar Symfony bundle setup.
Reality check first: lemonway/sdk-bundle is a Symfony bundle — it registers a Bundle subclass plus a DI Extension/Configuration tree that auto-wires the underlying Lemon Way PHP SDK client into Symfony's container. Laravel has no registerBundles(), no services.yaml, and no config-tree semantics, so you cannot composer require and activate it. There is no first-class Laravel path here.
What you actually do:
DependencyInjection/Configuration.php — tells you exactly which config keys the SDK client requires (merchant ID / login / password / API key / environment / endpoint base URL).DependencyInjection/*Extension.php and Resources/config/services.xml (or .yaml) — tells you the client's constructor signature and any injected collaborators (HTTP client, serializer, logger).Dependency.php / the bundle class — tells you the Symfony/PHP/Guzzle version constraints the underlying SDK assumes.lemonway/php-sdk or whatever the bundle wraps — check its composer.json require block) to confirm whether it targets the legacy XML v1 API or REST v2. That determines your whole design.config/lemonway.php, a LemonwayServiceProvider, and a typed client wrapper — instead of inheriting the bundle.First use case to validate: wallet creation (CreateWallet) + IBAN registration (RegisterIBAN) + a sandbox money-in, against Lemon Way's test environment. If that loop works through your own client, the rest of the API surface is incremental.
// config/lemonway.php
return [
'env' => env('LEMONWAY_ENV', 'sandbox'),
'merchant_id'=> env('LEMONWAY_MERCHANT_ID'),
'api_key' => env('LEMONWAY_API_KEY'),
'password' => env('LEMONWAY_PASSWORD'),
'wallet_ip' => env('LEMONWAY_WALLET_IP'), // required by the API for wallet ops
'base_url' => env('LEMONWAY_ENV') === 'production'
? 'https://ws.lemonway.fr/mb/{merchant}/dev/api/'
: 'https://sandbox.lemonway.fr/mb/{merchant}/dev/api/',
];
1. Bind the client as a singleton in your own service provider. The bundle's whole value is a container registration; replicate that.
$this->app->singleton(LemonwayClient::class, function ($app) {
return new LemonwayClient(
$app['config']->get('lemonway.merchant_id'),
$app['config']->get('lemonway.api_key'),
// ... whatever the extension file told you
);
});
2. Wrap the SDK behind your own interface, not a facade over theirs. The bundle is unmaintained and zero-adoption; binding your domain to it forecloses swapping to Stripe Connect, Mangopay, or a direct REST client. A PaymentProvider interface with createWallet(), registerIban(), moneyIn(), transfer(), moneyOut() methods costs an hour and buys optionality.
3. Model the Lemon Way object graph explicitly. Accounts vs. wallets, IBAN statuses, KYC states, and money-in/money-out semantics are domain concepts, not DTOs. Store wallet IDs, IBAN IDs, and KYC document IDs alongside your User/Seller models with a dedicated table — you will need to reconcile against them.
4. Route all outbound calls through Laravel's Http client if you write your own REST client (recommended), rather than inheriting the SDK's Guzzle version. You then get retries, timeouts, and logging for free — and you avoid the Guzzle 5/6 vs 7 conflict the aged SDK will bring.
5. Make non-interactive money movements queued jobs. Wallet-to-wallet transfers and payouts should go through a queue with retry/backoff, not the request/response cycle. Keep only the interactive pieces (create wallet, register IBAN) synchronous.
6. Webhook handler before go-live. Implement /webhooks/lemonway with signature/verification where Lemon Way supports it, idempotency keys on your side, and a replay-safe handler. This is where integration failures concentrate.
7. Reconciliation job on a schedule. Pull Lemon Way statements/transaction lists and diff against your local ledger. Do not assume webhooks are complete or ordered.
8. Log with PII redaction. Wallet IDs, IBANs, and KYC document contents are sensitive — the bundle won't do this for you, and neither will the raw SDK.
Configuration.php, not the structure. Laravel's config() and Symfony's Configuration differ in how they coerce types and enforce required nodes; you'll want explicit validation at boot.LEMONWAY_* envs per environment, assert at app boot, and never derive the endpoint from a string interpolation of an unvalidated config value.symfony/* components that clash with a modern Laravel (Guzzle 7, PSR-18). Don't composer require the bundle to "see what happens" — you'll end up with a broken lockfile.moneyIn after a timeout becomes a duplicate charge. Generate a request ID per logical operation and persist it before the call.composer.json/code before writing anything. The legacy XML v1 and REST v2 have different object models; mixing guidance from one into the other is a common time sink.opportunity: 6.59 reflects demand for Lemon Way integration in PHP, not quality of this artifact. Use it to scope effort, not to justify installation in a Laravel codebase.How can I help you explore Laravel packages today?