diff --git a/src/Encoder/PaymentRequestDecoder.php b/src/Encoder/PaymentRequestDecoder.php index 757b443..4ce4844 100644 --- a/src/Encoder/PaymentRequestDecoder.php +++ b/src/Encoder/PaymentRequestDecoder.php @@ -167,9 +167,13 @@ public function decode(string $paymentRequest): array $timeExpireDate = $timeExpireDateString = null; if ($this->tagsContainItem($tags, $this->tagNames[6])) { $timeExpireDate = $timestamp + $this->tagsItems($tags, $this->tagNames[6]); - $timeExpireDateString = date(\DateTime::ATOM, $timeExpireDate); + } else { + // Default is 3600 (1 hour) if not specified. + $timeExpireDate = $timestamp + 3600; } + $timeExpireDateString = date(\DateTime::ATOM, $timeExpireDate); + $toSign = Buffertools::concat( new Buffer($prefix), $this->wordsToBuffer($wordsWithoutSignature, false),