Using the latest version of InvoiceNinja the creation of invoices fails with the following error message:
PHP Fatal error: Uncaught Exception: <!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta http-equiv="refresh" content="0;url=http://ninja.test" />
<title>Redirecting to http://ninja.test</title>
</head>
<body>
Redirecting to <a href="http://ninja.test">http://ninja.test</a>.
</body>
</html> in my-project/vendor/invoiceninja/sdk-php/src/InvoiceNinja/Models/AbstractModel.php:185
Stack trace:
#0 my-project/vendor/invoiceninja/sdk-php/src/InvoiceNinja/Models/AbstractModel.php(78): InvoiceNinja\Models\AbstractModel::sendRequest('http://ninja....', '{"invoice_items...', 'POST')
#1 my-project/src/Controller/NinjaController.php(58): InvoiceNinja\Models\AbstractModel->save()
#2 {main}
thrown in /usr/local/share/my-project/vendor/invoiceninja/sdk-php/src/InvoiceNinja/Models/AbstractModel.php on line 185
On the webserver I see that a HTTP code 302 is triggered:
"GET /api/v1/clients? HTTP/1.1" 200 36082 "-" "Invoice Ninja - PHP SDK"
"POST /api/v1/invoices?include=invitations HTTP/1.1" 302 420 "-" "Invoice Ninja - PHP SDK"
The Laravel error log does not show anything.
I have not been able to figure out what triggers the redirect response here. Is there any way to determine the root cause?
Thanks a lot for any helpful comments.