invoices->all(); foreach ($invoices as $invoice) { echo '
  • Invoice ' . htmlspecialchars($invoice->reference) . ': (' . htmlspecialchars($invoice->issuedAt) . ')'; echo '
    Status: ' . $invoice->status; echo ''; foreach ($invoice->lines as $line) { echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; } echo ''; echo '
    PeriodDescriptionCountVAT PercentageAmount
    ' . htmlspecialchars($line->period) . '' . htmlspecialchars($line->description) . '' . htmlspecialchars($line->count) . '' . htmlspecialchars($line->vatPercentage) . '' . htmlspecialchars($line->amount->currency . " " . $line->amount->value) . '
    Gross Total' . htmlspecialchars($invoice->grossAmount->value . " " . $invoice->grossAmount->currency) . '
    '; echo 'Click here to open PDF'; echo '
  • '; } } catch (\Mollie\Api\Exceptions\ApiException $e) { echo "API call failed: " . htmlspecialchars($e->getMessage()); }