Skip to content

Commit

Permalink
Merge pull request #25 from xendit/TPI-7863/whmcs-api-validation-erro…
Browse files Browse the repository at this point in the history
…r-discount

Remove the negative item
  • Loading branch information
andykim authored Aug 5, 2022
2 parents 0d682c1 + 8d1a1f8 commit 4304e33
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 4304e33

Please sign in to comment.