Skip to content

Commit

Permalink
fix: carbon time
Browse files Browse the repository at this point in the history
  • Loading branch information
brokeyourbike committed Feb 26, 2024
1 parent c0be37c commit e370eaf
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
2 changes: 1 addition & 1 deletion src/Interfaces/TransactionInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

0 comments on commit e370eaf

Please sign in to comment.