Skip to content

Commit

Permalink
fix: Доки
Browse files Browse the repository at this point in the history
  • Loading branch information
remils committed Oct 7, 2021
1 parent c0152b3 commit c4f34c7
Showing 1 changed file with 17 additions and 21 deletions.
38 changes: 17 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,13 @@ $client->resend($data);
##### 3.2.1.2 Example

```php
use SergeyZatulivetrov\TinkoffAcquiring\InitData;
use SergeyZatulivetrov\TinkoffAcquiring\Constants\PaymentMethod;
use SergeyZatulivetrov\TinkoffAcquiring\Constants\PaymentObject;
use SergeyZatulivetrov\TinkoffAcquiring\Constants\Taxation;
use SergeyZatulivetrov\TinkoffAcquiring\Constants\Vat;
use SergeyZatulivetrov\TinkoffAcquiring\ItemData;
use SergeyZatulivetrov\TinkoffAcquiring\ReceiptData;
use SergeyZatulivetrov\TinkoffAcquiring\Data\InitData;
use SergeyZatulivetrov\TinkoffAcquiring\Data\ItemData;
use SergeyZatulivetrov\TinkoffAcquiring\Data\ReceiptData;

$data = new InitData();
$data->TerminalKey = "TestB";
Expand All @@ -130,38 +130,34 @@ $item1->Name = "Наименование товара 1";
$item1->Price = 10000;
$item1->Quantity = 1.00;
$item1->Amount = 10000;
$item1->PaymentMethod = PaymentMethod::full_prepayment;
$item1->PaymentObject = PaymentObject::commodity;
$item1->Tax = Vat::vat10;
$item1->PaymentMethod = PaymentMethod::FULL_PREPAYMENT;
$item1->PaymentObject = PaymentObject::COMMODITY;
$item1->Tax = Vat::VAT10;
$item1->Ean13 = "0123456789";

$item2 = new ItemData();
$item2->Name = "Наименование товара 2";
$item2->Price = 20000;
$item2->Quantity = 2.00;
$item2->Amount = 40000;
$item2->PaymentMethod = PaymentMethod::prepayment;
$item2->PaymentObject = PaymentObject::service;
$item2->Tax = Vat::vat20;
$item2->PaymentMethod = PaymentMethod::PREPAYMENT;
$item2->PaymentObject = PaymentObject::SERVICE;
$item2->Tax = Vat::VAT20;

$item3 = new ItemData();
$item3->Name = "Наименование товара 3";
$item3->Price = 30000;
$item3->Quantity = 3.00;
$item3->Amount = 90000;
$item3->Tax = Vat::vat10;
$item3->Tax = Vat::VAT10;

$receipt = new ReceiptData();
$receipt->Email = "[email protected]";
$receipt->Phone = "+79031234567";
$receipt->EmailCompany = "[email protected]";
$receipt->Taxation = Taxation::osn;
$receipt->Items = [
$item1->toArray(),
$item2->toArray(),
$item3->toArray(),
];
$data->Receipt = $receipt->toArray();
$receipt->Taxation = Taxation::OSN;
$receipt->Items = [$item1, $item2, $item3];
$data->Receipt = $receipt;
```

#### 3.2.2 Confirm data
Expand All @@ -184,7 +180,7 @@ $data->Receipt = $receipt->toArray();
##### 3.2.2.2 Example

```php
use SergeyZatulivetrov\TinkoffAcquiring\ConfirmData;
use SergeyZatulivetrov\TinkoffAcquiring\Data\ConfirmData;

$data = new ConfirmData();
$data->TerminalKey = "TinkoffBankTest";
Expand Down Expand Up @@ -212,7 +208,7 @@ $data->generateToken("password");
##### 3.2.3.2 Example

```php
use SergeyZatulivetrov\TinkoffAcquiring\CancelData;
use SergeyZatulivetrov\TinkoffAcquiring\Data\CancelData;

$data = new CancelData();
$data->TerminalKey = "TinkoffBankTest";
Expand All @@ -239,7 +235,7 @@ $data->generateToken("password");
##### 3.2.4.2 Example

```php
use SergeyZatulivetrov\TinkoffAcquiring\GetStateData;
use SergeyZatulivetrov\TinkoffAcquiring\Data\GetStateData;

$data = new GetStateData();
$data->TerminalKey = "TinkoffBankTest";
Expand All @@ -263,7 +259,7 @@ $data->generateToken("password");
##### 3.2.5.2 Example

```php
use SergeyZatulivetrov\TinkoffAcquiring\ResendData;
use SergeyZatulivetrov\TinkoffAcquiring\Data\ResendData;

$data = new ResendData();
$data->TerminalKey = "TinkoffBankTest";
Expand Down

0 comments on commit c4f34c7

Please sign in to comment.