Download the PHP package stefan-ghivi/php-test without Composer

On this page you can find all versions of the php package stefan-ghivi/php-test. 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-test

MANGOPAY PHP SDK Latest Stable Version Total Downloads License

MangopaySDK is a PHP client library to work with Mangopay REST API.

Compatibility Notes

Requirements

To use this SDK, you will need (as a minimum):

Installation with Composer

You can use Mangopay 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 Mangopay SDK as a dependency by executing the following command:

you@yourhost:/path/to/your-project$ composer require mangopay/php-sdk-v2:^2.3

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

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

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

Alternatively you can download the package in its entirety (ie with all required dependencies) from the Releases page (look for the mangopay2-php-sdk-[RELEASE_NAME].zip file). Uncompress the zip file you download, and include the autoloader in your project:

License

MangopaySDK is distributed under MIT license, see the LICENSE file.

Unit Tests

Tests are placed under /path/to/your-project/tests/. The /tests/suites/all.php suite runs ALL tests. You can also use any of /tests/cases/*.php to run a single test case.

Contacts

Report bugs or suggest features using issue tracker on GitHub.

Account creation

You can get yourself a free sandbox account or sign up for a production account (note that validation of your production account can take a few days, so think about doing it in advance of when you actually want to go live).

Configuration

Using the credential info from the signup process above, you should then set $api->Config->ClientId to your Mangopay ClientId and $api->Config->ClientPassword to your Mangopay passphrase.

You also need to set a folder path in $api->Config->TemporaryFolder that SDK needs to store temporary files. This path should be outside your www folder. It could be /tmp/ or /var/tmp/ or any other location that PHP can write to. You must use different folders for your sandbox and production environments.

$api->Config->BaseUrl is set to sandbox environment by default. To enable production environment, set it to https://api.mangopay.com.

Sample usage

Sample usage with Composer in a Symfony project

You can integrate Mangopay features in a Service in your Symfony project.

MangoPayService.php :

Logging

MangoPay uses the PSR3 LoggerInterface. You can provide your own logger to the API. Here is a sample showing Monolog integration :


All versions of php-test with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
ext-curl Version *
ext-openssl Version *
psr/log Version ^1.0
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 stefan-ghivi/php-test contains the following files

Loading the files please wait ....