mirror of
https://git.yoomoney.ru/scm/sdk/yookassa-sdk-php.git
synced 2026-08-17 19:31:20 +00:00
Добавлен прием платежей через Alfa Pay. Добавлен новый тип ошибки RuleViolationError
Добавлены нулевые привязки по СБП Добавлена причина отмены возвратов `payment_expired`
This commit is contained in:
@@ -29,8 +29,9 @@ namespace YooKassa\Model\Notification;
|
||||
use YooKassa\Common\Exceptions\EmptyPropertyValueException;
|
||||
use YooKassa\Common\Exceptions\InvalidPropertyValueException;
|
||||
use YooKassa\Model\Payment\PaymentInterface;
|
||||
use YooKassa\Model\SavePaymentMethod\AbstractSavePaymentMethod;
|
||||
use YooKassa\Model\SavePaymentMethod\SavePaymentMethodFactory;
|
||||
use YooKassa\Model\SavePaymentMethod\SavePaymentMethodInterface;
|
||||
use YooKassa\Request\PaymentMethods\PaymentMethodResponse;
|
||||
use YooKassa\Validator\Constraints as Assert;
|
||||
|
||||
/**
|
||||
@@ -55,7 +56,7 @@ class NotificationPaymentMethodActive extends AbstractNotification
|
||||
* @var SavePaymentMethodInterface Объект способа оплаты
|
||||
*/
|
||||
#[Assert\NotBlank]
|
||||
#[Assert\Type(PaymentMethodResponse::class)]
|
||||
#[Assert\Type(AbstractSavePaymentMethod::class)]
|
||||
#[Assert\Valid]
|
||||
private SavePaymentMethodInterface $_object;
|
||||
|
||||
@@ -125,6 +126,9 @@ class NotificationPaymentMethodActive extends AbstractNotification
|
||||
*/
|
||||
public function setObject(mixed $object): self
|
||||
{
|
||||
if (is_array($object)) {
|
||||
$object = (new SavePaymentMethodFactory())->factoryFromArray($object);
|
||||
}
|
||||
$this->_object = $this->validatePropertyValue('_object', $object);
|
||||
return $this;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user