From e370eaf05e1c6e33bd7d914c0e25524772152cad Mon Sep 17 00:00:00 2001 From: Ivan Stasiuk Date: Mon, 26 Feb 2024 10:29:48 +0000 Subject: [PATCH] fix: carbon time --- composer.json | 3 ++- src/Client.php | 2 +- src/Interfaces/TransactionInterface.php | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 07eadf9..e2c0a8a 100644 --- a/composer.json +++ b/composer.json @@ -34,7 +34,8 @@ "guzzlehttp/psr7": "^2", "guzzlehttp/guzzle": "^7", "php-http/guzzle7-adapter": "^1", - "php-http/message": "^1" + "php-http/message": "^1", + "nesbot/carbon": "^2 || ^3" }, "require-dev": { "bamarni/composer-bin-plugin": "^1.4", diff --git a/src/Client.php b/src/Client.php index 7549036..87ca976 100644 --- a/src/Client.php +++ b/src/Client.php @@ -93,7 +93,7 @@ public function send(TransactionInterface $transaction): ?Response ->withBeneficiaryName($transaction->getRecipientName()) ->withDebitAccount($this->config->getDebitAccount()) ->withTransactionRef($transaction->getReference()) - ->withPaymentDueDate($transaction->getDueDate()->format(''))) + ->withPaymentDueDate($transaction->getDueDate()->format('Y-m-d'))) ) ))->getSendRequestResult(); } diff --git a/src/Interfaces/TransactionInterface.php b/src/Interfaces/TransactionInterface.php index 1510ba9..4577eb2 100644 --- a/src/Interfaces/TransactionInterface.php +++ b/src/Interfaces/TransactionInterface.php @@ -16,5 +16,5 @@ public function getAmount(): float; public function getRecipientName(): string; public function getRecipientBankCode(): string; public function getRecipientBankAccount(): string; - public function getDueDate(): \DateTime; + public function getDueDate(): \Carbon\Carbon; }