Closed AKurka closed 1 week ago
I investigated in the sources files and the error come from this function : customerPortalUrl
in the ManageCustomer
trait.
The customer_portal URL is null. The response come from this request :
$response = LemonSqueezy::api('GET', "customers/{$this->customer->lemon_squeezy_id}");
Heya. This is expected and in the docs:
In order to call this method your billable already needs to have a subscription or made a purchase through Lemon Squeezy.
https://github.com/lmsqueezy/laravel/tree/main?tab=readme-ov-file#customer-portal
Yes ! I’ve alerady made a payment with lemonsqueezy. I checker the order id, the customer id and everything is filled.
Actually it seems the requirement is to have a subscription. See https://docs.lemonsqueezy.com/api/customers/the-customer-object#urls
I've updated the docs.
Lemon Squeezy for Laravel Version
1.7.0
Laravel Version
11.9
PHP Version
8.3.13
Description
Hi !
I installed the lemonsqueezy laravel package to use it in an app with Inertia. I'm getting errors while trying to access the the customer portal.
I get this Laravel error :
Steps To Reproduce
Global
I added the billable trait to my User model.
I added this cast because i'm using an enum for my country value :
For the customer portal
I call a route using this method :