Download the PHP package orkhanahmadov/yandex-checkout without Composer

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

Latest Stable Version Latest Unstable Version Total Downloads GitHub license

Build Status Test Coverage Maintainability Quality Score StyleCI

Easy and complete YooKassa (previously Yandex Checkout) integration for Laravel

Todo

Table of Contents

  1. Requirements
  2. Installation
  3. Usage
  4. Models
  5. Commands
  6. Events
  7. Configuration

Requirements

Installation

You can install the package via composer:

Run this command to publish required migration file:

Usage

First, set Yandex Checkout shop ID and secret key in .env file. You can get these from YooMoney merchant page.

To use Yandex Checkout service you need instance of Orkhanahmadov\YandexCheckout\YandexCheckoutService. You can instantiate this class using Laravel's service container, for example by injecting to your controller

Or you can use Laravel's service resolver to create instance of the class:

Available methods:

createPayment()

Creates new payment based on passed credentials and accepts 2 arguments:

Method returns created instance of Orkhanahmadov\YandexCheckout\Models\YandexCheckout model.

You should use $confirmation_url property to get unique payment URL and redirect user to this URL to start payment.

paymentInfo()

Gets information on previously created payment. Accepts single argument:

Method returns updated instance of Orkhanahmadov\YandexCheckout\Models\YandexCheckout model with Yandex Checkout's response.

Models

Package ships with Orkhanahmadov\YandexCheckout\Models\YandexCheckout Eloquent model. Model stores following information for each payment:

Besides usual Eloquent functionality this model also has specific accessors, scopes and relationship abilities which you can utilize.

Accessors

Scopes

Relationship

You can make any existing Eloquent model "payable" and attach Yandex Checkouts to it. Use Orkhanahmadov\YandexCheckout\Traits\HandlesYandexCheckout trait in your existing model to establish direct model relationship.

Now Product model has direct relationship with Yandex Checkouts. By using HandlesYandexCheckout your model also gets access to payment related relationships and payment methods.

createPayment()

yandexCheckouts()

Eloquent relationship method. Return all related Yandex Checkouts.

Commands

Package ships with artisan command for checking payment results.

Executing above command will loop through all "pending" checkouts and update their models.

Command also accepts payment ID as an argument to check single checkout result.

You can set up a Cron job schedule to frequently check all "pending" checkout.

Events

Package ships with Laravel events which gets fired on specific conditions.

Available event classes:

Each event receives instance of Orkhanahmadov\YandexCheckout\Models\YandexCheckout Eloquent model as public $yandexCheckout property.

You can set up event listeners to trigger when specific payment event gets fired.

Configuration

Run this command to publish package config file:

Config file contains following settings:

If you want to use your own event class for specific payment event you can replace class namespace with your class namespace. Each checkout event receives instance of Orkhanahmadov\YandexCheckout\Models\YandexCheckout Eloquent model. Because of this, make sure you add payment model as dependency to your event class constructor signature or you can extend Orkhanahmadov\YandexCheckout\Events\CheckoutEvent class which already has payment model as dependency.

Setting specific payment event to null disables that event.

Testing

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of yandex-checkout with dependencies

PHP Build Version
Package Version
Requires php Version ^7.3|^8.0
illuminate/container Version ^6.0|^7.0|^8.0|^9.0
illuminate/contracts Version ^6.0|^7.0|^8.0|^9.0
illuminate/database Version ^6.0|^7.0|^8.0|^9.0
illuminate/queue Version ^6.0|^7.0|^8.0|^9.0
illuminate/support Version ^6.0|^7.0|^8.0|^9.0
yoomoney/yookassa-sdk-php Version ^2.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 orkhanahmadov/yandex-checkout contains the following files

Loading the files please wait ....