Download the PHP package mikefinch/yii2-yandex-kassa-api without Composer

On this page you can find all versions of the php package mikefinch/yii2-yandex-kassa-api. 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 yii2-yandex-kassa-api

Yandex.Kassa API extension for Yii2

This extension allows you to obtain money from users by new Yandex.Kassa's API.
It was designed to be pretty simple to use so you don't have to deep down into Yandex.Kassa's workflow.

This extension strongly in beta, so feel free to send pull requests and fix bugs

Installation

The preferred way to install this extension is through composer.

Either run

or add

to the require section of your composer.json file.

Usage

Once the extension is installed, you have to follow next few steps:

1. Add extension into your configuration file

returnUrl - User will get there after payment has got succeeded
shopId - Your shop id (from Yandex)
key - Your secret key (from Yandex)
currency - Currency obviously (RUB by default)

2. Implement OrderInterface in your Order model

3. Add new actions to your controller

Here we have two callbacks.

beforePayment checks is our order okay. You can provide some logic there and return false if something went wrong and you wanna cancel your payment.

The second one is beforeConfirm. It executes when user successfully paid your payment and now you have to confirm this order, send sms notification, etc. Be careful, if you return false is this callback, payment won't be confirmed and user will receive his money back in a few hours.

4. Config your Yandex.Kassa notification page

Settings page

Set your notification page Url as same as you used in your controller.
For example, if you added your actions to SiteController, it would be https://yoursite.com/site/notify
Don't forget about SSL - Yandex sends notifications only through it.

5. Redirect user to payment action afterwards

You have to pass $id to the action so it could find your model by findById method.


All versions of yii2-yandex-kassa-api with dependencies

PHP Build Version
Package Version
Requires yiisoft/yii2 Version ~2.0.0
yandex-money/yandex-checkout-sdk-php 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 mikefinch/yii2-yandex-kassa-api contains the following files

Loading the files please wait ....