Skip to content

Commit

Permalink
Поддержка ФФД 1.05
Browse files Browse the repository at this point in the history
  • Loading branch information
jhaoda committed Dec 24, 2018
1 parent 5f0caa9 commit 254c154
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 1 deletion.
42 changes: 41 additions & 1 deletion src/Contracts/YaKassaOrderItem54FZ.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,28 @@ interface YaKassaOrderItem54FZ
public const VAT_10_110 = 5;
public const VAT_18_118 = 6;

public const PM_CREDIT = 'credit';
public const PM_ADVANCE = 'advance';
public const PM_FULL_PAYMENT = 'full_payment';
public const PM_CREDIT_PAYMENT = 'credit_payment';
public const PM_PARTIAL_PAYMENT = 'partial_payment';
public const PM_FULL_PREPAYMENT = 'full_prepayment';
public const PM_PARTIAL_PREPAYMENT = 'partial_prepayment';

public const PS_JOB = 'job';
public const PS_EXCISE = 'excise';
public const PS_SERVICE = 'service';
public const PS_ANOTHER = 'another';
public const PS_PAYMENT = 'payment';
public const PS_LOTTERY = 'lottery';
public const PS_COMMODITY = 'commodity';
public const PS_COMPOSITE = 'composite';
public const PS_GAMBLING_BET = 'gambling_bet';
public const PS_LOTTERY_PRIZE = 'lottery_prize';
public const PS_GAMBLING_PRIZE = 'gambling_prize';
public const PS_AGENT_COMMISSION = 'agent_commission';
public const PS_INTELLECTUAL_ACTIVITY = 'intellectual_activity';

/**
* Цена товара с учётом всех скидок и наценок.
*
Expand All @@ -40,7 +62,7 @@ public function getQuantity(): float;
/**
* Ставка НДС.
*
* См. константы VAT_*.
* @see константы VAT_*
*
* @return int
*/
Expand All @@ -59,4 +81,22 @@ public function getCurrency(): ?string;
* @return string
*/
public function getTitle(): string;

/**
* Признак способа расчёта.
*
* @see константы PM_*
*
* @return string
*/
public function getPaymentMethodType(): string;

/**
* Признак предмета расчёта.
*
* @see константы PS_*
*
* @return string
*/
public function getPaymentSubjectType(): string;
}
2 changes: 2 additions & 0 deletions src/YaKassaPaymentForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ private function convertItemToArray(YaKassaOrderItem54FZ $item): array
'currency' => $item->getCurrency(),
'text' => $this->formatTitle($item->getTitle()),
'quantity' => $this->formatQuantity($item->getQuantity()),
'paymentMethodType' => $item->getPaymentMethodType(),
'paymentSubjectType' => $item->getPaymentSubjectType(),
]);
}

Expand Down

0 comments on commit 254c154

Please sign in to comment.