PHPackages                             lemonway-ogust/php-sdk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. lemonway-ogust/php-sdk

ActiveLibrary[API Development](/categories/api)

lemonway-ogust/php-sdk
======================

PHP SDK for Lemon Way API

1.7(8y ago)0197MITPHPPHP &gt;=5.4.0

Since Apr 21Pushed 8y ago2 watchersCompare

[ Source](https://github.com/ogust-projects/php-client-directkit-xml)[ Packagist](https://packagist.org/packages/lemonway-ogust/php-sdk)[ Docs](https://github.com/ogust-projects/php-client-directkit-xml)[ RSS](/packages/lemonway-ogust-php-sdk/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (1)DependenciesVersions (20)Used By (0)

The LemonWay API (called Directkit) has two implementations: Directkit**Json2** and Directkit**Xml**. There are different ways to call the service depends on the implementation you chose.

The best way to access to directkit**Json2** is to use the [`curl_init`](http://php.net/manual/en/function.curl-init.php) function to send POST request to the Directkit**Json2** service.

[See the example here](https://github.com/lemonwaysas/php-client-directkit-json2)

It is the simplest (for you) and the most network-efficient way. So we recommend Json over the SOAP (XML) protocole.

If you don't like the json format, you can also send SOAP (XML) requests to Directkit**Xml**, you can do it in 3 different ways:

1. **[SoapClient](https://github.com/lemonwaysas/php-client-directkit-xml-soap)**: the casual method in PHP to consume any Web Service. It is the simplest way to access to Directkit**Xml**.
2. **[SoapClient SDK](https://github.com/lemonwaysas/php-client-directkit-xml-soap-sdk)**: same with the first method, but all the structure of requests / responses are generated overhead with [`wsdl2phpgenerator`](http://wsdl2phpgenerator.github.io/wsdl2phpgenerator/)
3. **[LemonWay SDK](https://github.com/lemonwaysas/php-client-directkit-xml)**: call the web service as a normal http request [`curl_init`](http://php.net/manual/en/function.curl-init.php). The SDK will help you to parse the SOAP response.

This example demonstrates the third method. It doesn't really have any advantages over other ones. It is just less verbose than **[SoapClient](https://github.com/lemonwaysas/php-client-directkit-xml-soap)**. [see an opinionated comparisons](https://github.com/lemonwaysas/php-client-directkit-xml/commit/4e083a104a402c041d341bfbba9afa6aaeb02225)

Lemon Way PHP SDK (This SDK is only used with Direckit XML)
===========================================================

[](#lemon-way-php-sdk-this-sdk-is-only-used-with-direckit-xml)

Lemon Way SDK is a PHP client library to work with [Lemon Way API](http://documentation.lemonway.fr/api-en).

Installation with Composer
--------------------------

[](#installation-with-composer)

You can use Lemon Way SDK library as a dependency in your project with [Composer](https://getcomposer.org/) (which is the preferred technique). Follow [these installation instructions](https://getcomposer.org/doc/00-intro.md) if you do not already have Composer installed. A composer.json file is available in the repository and it has been referenced from [Packagist](https://packagist.org/packages/lemonway/php-sdk).

The installation with Composer is easy and reliable:

Step 1 - Add the Lemon Way SDK as a dependency by executing the following command:

```
you@yourhost:/path/to/your-project$ composer require lemonway/php-sdk:^1.0

```

Step 2 - Update your dependencies with Composer

```
you@yourhost:/path/to/your-project$ composer update

```

Step 3 - Finally, be sure to include the autoloader in your project

```
require_once '/path/to/your-project/vendor/autoload.php';

```

The Library has been added into your dependencies and is ready to be used.

Installation without Composer
-----------------------------

[](#installation-without-composer)

SDK has been written in PHP 5.4. You should ensure that curl and openssl extensions (that are part of standard PHP distribution) are enabled in your PHP installation.

The project attempts to comply with PSR-4 specification for autoloading classes from file paths. As a namespace prefix is `LemonWay\` with base directory `/path/to/your-project/`.

But if you're not using PSR-4 or Composer, the installation is as easy as downloading the library and storing it under any location that will be available for including in your project (don't forget to include the required library dependencies though):

```
    require_once '/path/to/your-project/LemonWay/Autoloader.php';
```

Contacts
--------

[](#contacts)

Report bugs or suggest features using [issue tracker on GitHub](https://github.com/lemonway/php-sdk).

Account creation
----------------

[](#account-creation)

You need a sandbox to run Examples.

Configuration
-------------

[](#configuration)

Using the credentials information from Lemon Way support, you should then set `$api->config->wlLogin` to your Lemon Way login and `$api->config->wlPass` to your Lemon Way password.

```
require_once '/path/to/your-project/vendor/autoload.php';
$api = new LemonWayAPI();

$api->config->dkUrl = 'Your DirectKitXML url';
$api->config->wkUrl = 'Your WebKit url';
$api->config->wlLogin = 'Your login';
$api->config->wlPass = 'Your password';
$api->config->lang = 'Your language';
//$api->config->isDebugEnabled = true; //Uncomment to turn on debug mode

// call some API methods...
$result = $api->RegisterWallet(...);
```

Response Object
---------------

[](#response-object)

All `LemonWayAPI` methods are returning `\LemonWay\ApiResponse` object. It is a dynamic object with variable properties.

\###**Fixed properties :**

PropertyTypeDescriptionlwError[LemonWay\\Models\\LwError](LemonWay/Models/LwError.php)LwError ObjectlwXmlSimpleXMLElementRaw xml return as SimpleXMLElement object. Details in [Lemon Way API](http://documentation.lemonway.fr/api-en)\###**Variable properties:**

Those properties depends of which method was called.

PropertyTypeDescriptionwalletsarray of [LemonWay\\Models\\Wallet](LemonWay/Models/Wallet.php)Filled when the API returns multiple Walletsoperationsarray of [LemonWay\\Models\\Operation](LemonWay/Models/Operation.php)Filled when the API returns multiple Operationswallet[LemonWay\\Models\\Wallet](LemonWay/Models/Wallet.php)Filled when the API returns only one Walletoperation[LemonWay\\Models\\Operation](LemonWay/Models/Operation.php)Filled when the API returns only one OperationkycDoc[LemonWay\\Models\\KycDoc](LemonWay/Models/KycDoc.php)Filled when the API returns a KycDociban[LemonWay\\Models\\Iban](LemonWay/Models/Iban.php)Filled when the API returns an IbansddMandate[LemonWay\\Models\\SddMandate](LemonWay/Models/SddMandate.php)Filled when the API returns a SDD MandateSample usage
------------

[](#sample-usage)

```
require_once '/path/to/your-project/vendor/autoload.php';
$api = new LemonWayAPI();

$api->config->dkUrl = 'Your DirectKitXML url';
$api->config->wkUrl = 'Your WebKit url';
$api->config->wlLogin = 'Your login';
$api->config->wlPass = 'Your password';
$api->config->lang = 'Your language';

// call some API methods...
$walletID = 'Fill in with a unique id';
$response = $api->RegisterWallet(array('wallet' => $walletID,
                                        'clientMail' => $walletID.'@mail.fr',
                                        'clientTitle' => Wallet::UNKNOWN,
                                        'clientFirstName' => 'Paul',
                                        'clientLastName' => 'Atreides'));
if (isset($response->lwError)) {
    print 'Error, code '.$response->lwError->CODE.' : '.$response->lwError->MSG;
} else {
    print 'Wallet created : ' . $response->wallet->ID;

    // OR BY USING lwXml :
    print 'Wallet created : ' . $response->lwXml->WALLET->ID;
}
```

Get started with our examples
-----------------------------

[](#get-started-with-our-examples)

In the [examples folder](examples), you can find **an example for each API method**.

*You need to run the examples in a web server with php configured and a **hostname different from localhost**.*

*You also need a sandbox if you want to run examples (contact Lemon Way to create a sandbox)*

An **API method / example match table** could be find in the [Index of examples folder](examples/index.php) in HTML format and also in MarkDown in the [examples folder README.md](examples).

\###**Configuration**By default, the examples run with our sandbox demo. If you need your own sandbox, please contact Lemon Way then do these configurations. There's two files that handles the examples configuration:

FileDescription[ExamplesDatas](examples/ExamplesDatas.php)Random ID generator, Test card number, Test Iban ...[ExamplesBootstrap](examples/ExamplesBootstrap.php)API configuration (login, urls ...), API factory, Host configuration

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~23 days

Recently: every ~34 days

Total

19

Last Release

3256d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c7e0754070208940de632d15ea095c2ffde2911da13b1332c24b4055b409252b?d=identicon)[siadminsykio](/maintainers/siadminsykio)

---

Top Contributors

[![duongphuhiep](https://avatars.githubusercontent.com/u/1638594?v=4)](https://github.com/duongphuhiep "duongphuhiep (19 commits)")[![pham-dat](https://avatars.githubusercontent.com/u/13848893?v=4)](https://github.com/pham-dat "pham-dat (10 commits)")[![Happyrain67](https://avatars.githubusercontent.com/u/18757217?v=4)](https://github.com/Happyrain67 "Happyrain67 (4 commits)")[![jjamet](https://avatars.githubusercontent.com/u/9111072?v=4)](https://github.com/jjamet "jjamet (4 commits)")[![vdechenaux](https://avatars.githubusercontent.com/u/1501825?v=4)](https://github.com/vdechenaux "vdechenaux (2 commits)")[![scarl555](https://avatars.githubusercontent.com/u/10863832?v=4)](https://github.com/scarl555 "scarl555 (1 commits)")

---

Tags

ogust

### Embed Badge

![Health badge](/badges/lemonway-ogust-php-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/lemonway-ogust-php-sdk/health.svg)](https://phpackages.com/packages/lemonway-ogust-php-sdk)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
