Fix for restoring a failed/voided payment
This commit is contained in:
parent
d691596e06
commit
deaf39d29d
1 changed files with 4 additions and 0 deletions
|
|
@ -295,6 +295,10 @@ class Payment extends EntityModel
|
|||
*/
|
||||
public function getCompletedAmount()
|
||||
{
|
||||
if ($this->isFailed() || $this->isVoided()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return $this->amount - $this->refunded;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue