Skip to content

Commit

Permalink
Fix the nagative amount item
Browse files Browse the repository at this point in the history
  • Loading branch information
andykim committed Aug 5, 2022
1 parent 0d682c1 commit 8d1a1f8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions modules/gateways/xendit/lib/Link.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ protected function extractItems(\WHMCS\Billing\Invoice $invoice): array
{
$items = array();
foreach ($invoice->items()->get() as $item) {
if ($item->amount < 0) {
continue;
}

$items[] = [
'quantity' => 1,
'name' => $item->description,
Expand Down

0 comments on commit 8d1a1f8

Please sign in to comment.