From 254c1540e4b87559e0ab796f4b3e7ba16c6fc985 Mon Sep 17 00:00:00 2001 From: JhaoDa Date: Mon, 24 Dec 2018 09:10:29 +0700 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=BE=D0=B4=D0=B4=D0=B5=D1=80=D0=B6?= =?UTF-8?q?=D0=BA=D0=B0=20=D0=A4=D0=A4=D0=94=201.05?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Contracts/YaKassaOrderItem54FZ.php | 42 +++++++++++++++++++++++++- src/YaKassaPaymentForm.php | 2 ++ 2 files changed, 43 insertions(+), 1 deletion(-) diff --git a/src/Contracts/YaKassaOrderItem54FZ.php b/src/Contracts/YaKassaOrderItem54FZ.php index 3bea3c1..c00a71b 100644 --- a/src/Contracts/YaKassaOrderItem54FZ.php +++ b/src/Contracts/YaKassaOrderItem54FZ.php @@ -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'; + /** * Цена товара с учётом всех скидок и наценок. * @@ -40,7 +62,7 @@ public function getQuantity(): float; /** * Ставка НДС. * - * См. константы VAT_*. + * @see константы VAT_* * * @return int */ @@ -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; } diff --git a/src/YaKassaPaymentForm.php b/src/YaKassaPaymentForm.php index 887a9b1..79df026 100644 --- a/src/YaKassaPaymentForm.php +++ b/src/YaKassaPaymentForm.php @@ -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(), ]); }