Laravel Cashier DateTime::__construct(): Failed to parse time string (@) at position 0 (@):

前端 未结 2 1188
我在风中等你
我在风中等你 2021-01-23 09:19

I have this code when displaying list of invoices, this is similar or maybe exactly the same to the ones in the official Laravel Cashier documentation. I am getting this weird <

2条回答
  •  深忆病人
    2021-01-23 09:57

    Recently I had the same error. The date on the label is null.

    I was reading Stripe's docs and since March 14, 2019 they made some changes.

    Laravel Cashier will stop obtaining the invoice date because Stripe will no longer provide it.

    There are a few changes to the invoice object:

    • A status_transitions hash now contains the timestamps when an invoice was finalized, paid, marked uncollectible, or voided.
    • The date property has been renamed to created.
    • The finalized_at property has been moved into the status_transitions hash.

    Now, how did I solve it?

    1. I changed my version of Laravel Cashier by 9.3 in composer.json file.
    2. I opened my terminal and ran composer update.

    I hope my solution is useful for you. Regards!

提交回复
热议问题