Skip to content

Commit f4b209b

Browse files
Added default create date parameter on abstract request
1 parent 8ef9772 commit f4b209b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Message/AbstractRequest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ public function initialize(array $parameters = [])
3333
$this->setVnpIpAddr(
3434
$this->getVnpIpAddr() ?? $this->httpRequest->getClientIp()
3535
);
36+
$this->setVnpCreateDate(
37+
$this->getVnpCreateDate() ?? date('Ymdhis')
38+
);
3639

3740
return $this;
3841
}
@@ -93,6 +96,7 @@ public function getVnpCreateDate(): ?string
9396

9497
/**
9598
* Thiết lập thời gian khởi tạo truy vấn đến VNPay.
99+
* Mặc định sẽ là thời gian hiện tại.
96100
*
97101
* @param null|string $date
98102
* @return $this

0 commit comments

Comments
 (0)