You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A helper method is provided to download the PDF of a quote ($quote->pdf()), but not for an invoice.
Unfortunately, doing file_get_contents($invoice->invoice_pdf) to download the PDF doesn't work anymore because PHP doesn't handle the redirection to S3 properly.
Sorry for the late response. Thank you for the suggestion. I'm convinced this would be useful to add. Quote PDF is a special case because the API contains /v1/quotes/:quote/pdf which contains the PDF, but /v1/invoices/:invoice/pdf does not exist (yet?) so the implementation would have to be different. I'm imagining something like \Stripe\Util::download_file($invoice_pdf) which would be provided for convenience but would just use curl.
A helper method is provided to download the PDF of a quote (
$quote->pdf()
), but not for an invoice.Unfortunately, doing
file_get_contents($invoice->invoice_pdf)
to download the PDF doesn't work anymore because PHP doesn't handle the redirection to S3 properly.Using
curl
is a working workaround (see dunglas/stripe-invoice-exporter#1), but a dedicated helper method could be convenient.Best regards,
The text was updated successfully, but these errors were encountered: