I have created a quick fix for it
core file -> /app/models/invoices.php
public function verifyPayHash($client_id, $invoice_id, $hash) {
$h = $this->systemHash('c=' . $client_id . '|i=' . $invoice_id);
$invoice_check = $this->get($invoice_id);
if(!is_null($invoice_check) && $invoice_check->status === 'void')
return false;
return substr($h, -16) == $hash;
}
This will prevent voided invoices from using the email link
May be able to get the invoice status via the getMeta but did not test.
Function is located at the bottom of the file
It is a priority for us to include it in the version 4 release, so we can't drop it. It requires several core changes that need to be made anyway, which lets us factor out some code to be deprecated, and simplify the code base. These changes have to be made at some point, and there is a larger benefit to them happening now.
Some code needs to be refactored to support the remaining features we're including for v4, so it's taking longer than expected to update the design and integrate those changes. Good news is that it will be a better integration in the long run.
When these two tasks, CORE-1686 and CORE-1763, are complete it should be ready for beta.