Closed handhikadj closed 11 months ago
Hi @handhikadj,
could you parse the whole error log please?
Closing this for now, let me know if it should be reopened.
@sandervanhooft can you open this ticket?
I'm also having this issue, with 2.9.0 and 2.10.0.
I'm currently looking for the reason when stumbling on this ticket. I've tracked it down to FirstPaymentHandler::extractActions()
When my user gets a redirect to Mollie (test mode) (first payment), and then clicks on one of the banks, my application gets the following error:
Undefined property: stdClass::$actions {"exception":"[object] (ErrorException(code: 0): Undefined property: stdClass::$actions at /home/forge/app.mingleminded.nl/vendor/mollie/laravel-cashier-mollie/src/FirstPayment/FirstPaymentHandler.php:103)
Then when I click on success and get redirected back to the app, I see the following error:
Integrity constraint violation: 1048 Column 'owner_type' cannot be null (Connection: mysql, SQL: insert into `order_items` (`owner_id`, `owner_type`, `process_at`, `currency`, `unit_price`, `quantity`, `tax_percentage`, `description`, `orderable_id`, `orderable_type`, `updated_at`, `created_at`) values (2, ?, 2023-10-09 16:00:17, EUR, 75, 1, 0.0000, One day Subscription, 1, Laravel\Cashier\Subscription, 2023-10-08 16:00:17, 2023-10-08 16:00:17)) {"exception":"[object] (Illuminate\\Database\\QueryException(code: 23000): SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'owner_type' cannot be null (Connection: mysql, SQL: insert into `order_items` (`owner_id`, `owner_type`, `process_at`, `currency`, `unit_price`, `quantity`, `tax_percentage`, `description`, `orderable_id`, `orderable_type`, `updated_at`, `created_at`) values (2, ?, 2023-10-09 16:00:17, EUR, 75, 1, 0.0000, One day Subscription, 1, Laravel\\Cashier\\Subscription, 2023-10-08 16:00:17, 2023-10-08 16:00:17)) at /home/forge/app.mingleminded.nl/vendor/laravel/framework/src/Illuminate/Database/Connection.php:760)
I'm working on a new application, last week (with version 2.9.0) I didn't have this issue. Somewhere It appeared. I've rolled back the code and tested older versions but it keeps appearing.
I need to leave the office now, I'll continue looking for the issue tomorrow.
One update, not a solution though. But perhaps an answer for @handhikadj.
When \Laravel\Cashier\FirstPayment\FirstPaymentHandler::extractActions()
is called metadata
doesn't exist if the code runs due to a Mollie callback for a Payment that is removed from the database because of testing, debugging, migrate:fresh or stuff like that. That's an explanation for the "Undefined property: stdClass::$actions" message.
In my case, the Subscription model is still not created. But I guess that's an other issue/ticket. I'll create one for it.
One update, not a solution though. But perhaps an answer for @handhikadj.
When
\Laravel\Cashier\FirstPayment\FirstPaymentHandler::extractActions()
is calledmetadata
doesn't exist if the code runs due to a Mollie callback for a Payment that is removed from the database because of testing, debugging, migrate:fresh or stuff like that. That's an explanation for the "Undefined property: stdClass::$actions" message.In my case, the Subscription model is still not created. But I guess that's an other issue/ticket. I'll create one for it.
Thanks for diving in deeper here. That reads like a plausible explanation. I'll keep this ticket open for us to investigate. Perhaps we can also raise a better Exception here.
One update, not a solution though. But perhaps an answer for @handhikadj.
When
\Laravel\Cashier\FirstPayment\FirstPaymentHandler::extractActions()
is calledmetadata
doesn't exist if the code runs due to a Mollie callback for a Payment that is removed from the database because of testing, debugging, migrate:fresh or stuff like that. That's an explanation for the "Undefined property: stdClass::$actions" message.In my case, the Subscription model is still not created. But I guess that's an other issue/ticket. I'll create one for it.
Good point @jivanrij. So the error only popped up in your local env?!
Will close this for now. If anyone can offer more details to this please let me know!
I'm getting this issue using v2.9.0 on the log this happens right after/some seconds after the recurring payment runs (
Cashier::run();
) especially the recurring payments of SEPA payments