Download the PHP package lemonway/php-sdk without Composer

On this page you can find all versions of the php package lemonway/php-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package php-sdk

⚠️WARNING: This client is deprecated⚠️

This repository is in Maintenance Mode

We recommend our new partners to use DirectkitJson2 following this example

We will keep supporting this repository only for old customers who couldn't migrate to DirectkitJson2 (recommended) or SoapClient:


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

The json format is usually more network-efficient, and simpler to integrate. It is the reason why the DirectkitJson2 is recommended.

Anyway, if you don't like the json format, you can also send SOAP (XML) requests to the DirectkitXml. There are 3 different ways to call the DirectkitXml:

  1. SoapClient: the casual method in PHP to consume any Web Service. It is the simplest way to access to DirectkitXml.
  2. SoapClient SDK: same with the first method, but all the structure of requests / responses are generated overhead with wsdl2phpgenerator
  3. LemonWay SDK: call the web service as a normal http request curl_init. The SDK will help you to parse the SOAP response.

We recommend the first method with SoapClient because it is the standard solution in PHP world.

This example demonstrates the third method. The LemonWay SDK doesn't really have any advantages over other methods (see an opinionated comparisons here). But we will keep maintaining the LemonWay SDK for old customers.

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.

Installation with Composer

You can use Lemon Way SDK library as a dependency in your project with Composer (which is the preferred technique). Follow these installation instructions if you do not already have Composer installed. A composer.json file is available in the repository and it has been referenced from Packagist.

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

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):

Contacts

Report bugs or suggest features using issue tracker on GitHub.

Account creation

You need a sandbox to run Examples.

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.

Response Object

All methods are returning object. It is a dynamic object with variable properties.

Fixed properties :

Property Type Description
lwError LemonWay\Models\LwError LwError Object
lwXml SimpleXMLElement Raw xml return as SimpleXMLElement object. Details in Lemon Way API

Variable properties:

Those properties depends of which method was called.

Property Type Description
wallets array of LemonWay\Models\Wallet Filled when the API returns multiple Wallets
operations array of LemonWay\Models\Operation Filled when the API returns multiple Operations
wallet LemonWay\Models\Wallet Filled when the API returns only one Wallet
operation LemonWay\Models\Operation Filled when the API returns only one Operation
kycDoc LemonWay\Models\KycDoc Filled when the API returns a KycDoc
iban LemonWay\Models\Iban Filled when the API returns an Iban
sddMandate LemonWay\Models\SddMandate Filled when the API returns a SDD Mandate

Sample usage

Get started with our examples

In the examples folder, 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 in HTML format and also in MarkDown in the examples folder README.md.

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:

File Description
ExamplesDatas Random ID generator, Test card number, Test Iban ...
ExamplesBootstrap API configuration (login, urls ...), API factory, Host configuration

All versions of php-sdk with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
ext-curl Version *
ext-openssl Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package lemonway/php-sdk contains the following files

Loading the files please wait ....