lmsqueezy / laravel

A package to easily integrate your Laravel application with Lemon Squeezy.
https://lemonsqueezy.com
MIT License
468 stars 47 forks source link

Issue with Subscription Data Storage in Lemon Squeezy #64

Closed ianclemence closed 7 months ago

ianclemence commented 7 months ago

Hello,

I recently installed the Lemon Squeezy package and attempted to use the subscription feature. While the subscription process was successful, I encountered an issue where data is not being stored in the Lemon Squeezy tables in my database after running the migrations. Upon inspecting the webhooks logs on my Lemon Squeezy dashboard, I observed that the 'order_created' and 'subscription_created' webhooks were skipped. The error message for both webhooks is as follows:

SQLSTATE[01000]: Warning: 1265 Data truncated for column 'billable_id' at row 1

I would appreciate guidance on how to resolve this issue.

Note: The migration files for Lemon Squeezy have not been altered.

driesvints commented 7 months ago

Heya that's odd. Can you share the payload of one of these webhooks as well as a screenshot of how the columns look like in your database scheme?

ianclemence commented 7 months ago

Thanks for reaching out. I have fixed it already. I noticed it was an issue on my side since I am using UUID for my billable model instead of ID. Therefore, I had to publish the migrations and change the 'billable_id' column into a string for both lemon squeezy tables. Now it works like a charm!