Download the PHP package yandex-money/yandex-money-sdk-php without Composer

On this page you can find all versions of the php package yandex-money/yandex-money-sdk-php. 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 yandex-money-sdk-php

Build Status

PHP Yandex.Money API SDK

Requirements

PHP 5.3 or above

Links

  1. Yandex.Money API page: Ru, En
  2. sample app

Getting started

Installation

  1. Add "yandex-money/yandex-money-sdk-php": "3.0.*" to composer.json of your application. Or clone repo to your project.
  2. If you are using composer - simply use require_once 'vendor/autoload.php'; otherwise paste following code

Payments from the Yandex.Money wallet

Using Yandex.Money API requires following steps

  1. Obtain token URL and redirect user's browser to Yandex.Money service. Note: client_id, redirect_uri, client_secret are constants that you get, when register app in Yandex.Money API.

  2. After that, user fills Yandex.Money HTML form and user is redirected back to REDIRECT_URI?code=CODE.

  3. You should immediately exchange CODE with ACCESS_TOKEN.

  4. Now you can use Yandex.Money API.

Payments from bank cards without authorization

  1. Fetch instantce-id(ussually only once for every client. You can store result in DB).

  2. Make request payment

  3. Process the request with process-payment.

Side notes

  1. Library throws exceptions in case of
    • response status isn't equal 2**
    • I/O error(see requests)
  2. If you register app and fill CLIENT_SECRET entry then you should provide $client_secret explicitly where $client_secret=NULL
  3. You should wrap all passed boolean values in quotes(because php converts them to numbers otherwise). For example:

Running tests

  1. Clone this repo.
  2. Install composer
  3. Run composer install
  4. Make sure phpunit executable is present in your $PATH
  5. Create tests/constants.php with CLIENT_ID, CLIENT_SECRET and ACCESS_TOKEN constants.
  6. Run tests phpunit --bootstrap vendor/autoload.php tests/

All versions of yandex-money-sdk-php with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.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 yandex-money/yandex-money-sdk-php contains the following files

Loading the files please wait ....