Download the PHP package clanmax/tinkoff-autopay without Composer

On this page you can find all versions of the php package clanmax/tinkoff-autopay. 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 tinkoff-autopay

Tinkoff Autopay

Small library which help you to use methods from Tinkoff API Documentation.

It was made for Laravel 7.0, but basically it working on Laravel 11 and almost all others PHP applications.

It use some of Laravel-Tinkoff functions inside.

What it's doing

Just basic things. For example, we can:

You have to be sure you already have permission to use this kind of function. You could ask your own manager in Tinkoff bank.

Which methods supported

To be more clear it's work with:

This library not implement Init method in version 0.01. But it's implemented in 0.02.

Probably in some close future I will add FinishAuthorize method, but not sure right now.

What in plans

  1. FinishAuthorize probably will work
  2. Right now library not return additional values of users (email, IP, etc). Will fix it.

How does it work

Install library from composer

Connect library with you controller by using use

Logic

Step by step how to use Charge

Preparing

  1. Add customer (it will be added automatically in Init method, btw)
  2. Request Init (not included in 0.01) with CustomerKey and Recurrent parameters
  3. Redirect user to payment form from PaymentURL value

Charging

  1. Request Init without CustomerKey and Recurrent parameters
  2. Save PaymentID
  3. Request GetCardList and take from card which you want to use RebillId
  4. Request Charge with PaymentID, RebillId, and OperationInitiatorType

In this case user will be charged automatically and payment will be approved instantly.

How to use

Make sure you already have Terminal Key and Terminal Password from you bank account. For using FinishAuthorize method you can get public key when switch you terminal working mode to Mobile application.

Initial payment

Make POST request to Init with two additional parameters:

Where CustomerKey name of already added client and Recurrent just with Y

For example:

Return will look like this:

Just to be sure Tax in Items could be:

Charge money

Few steps:

  1. Make POST request to Init, but without Recurrent and CustomerKey
  2. Grab PaymentId from there

Add customer

You have to make customer always before he did pay. One customer may have lots of connected cards by Init method.

Get customer

Return existing customers. You have to have his name which you used before.

Remove customer

Just removing all data of user. Be sure you won't use RebillId of this user anymore.

Get card list

You will use this method for get RebillId. Return bunch of cards which user saved by Init method.

Remove card

If your client have tons of cards but you are not ready to use them instead of delete user you may just delete card. Just get card number from GetCardList

Find errors

I would recommend always check all request for errors by this way

Error keep some information and you may use it for show to user (but be aware).

Get token

In some moment you probably will need token for testing. You may use methods in TinkoffKey class.

How does it work:


All versions of tinkoff-autopay with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1|^8.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 clanmax/tinkoff-autopay contains the following files

Loading the files please wait ....