Migrate billing from Paddle to Lemon Squeezy
This commit is contained in:
@@ -35,16 +35,16 @@ class CheckoutSessionConfirmRequest extends FormRequest
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'transaction_id' => ['nullable', 'string', 'required_without:checkout_id'],
|
||||
'checkout_id' => ['nullable', 'string', 'required_without:transaction_id'],
|
||||
'order_id' => ['nullable', 'string', 'required_without:checkout_id'],
|
||||
'checkout_id' => ['nullable', 'string', 'required_without:order_id'],
|
||||
];
|
||||
}
|
||||
|
||||
public function messages(): array
|
||||
{
|
||||
return [
|
||||
'transaction_id.required_without' => 'Transaction ID oder Checkout ID fehlt.',
|
||||
'checkout_id.required_without' => 'Checkout ID oder Transaction ID fehlt.',
|
||||
'order_id.required_without' => 'Order ID oder Checkout ID fehlt.',
|
||||
'checkout_id.required_without' => 'Checkout ID oder Order ID fehlt.',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Paddle;
|
||||
namespace App\Http\Requests\LemonSqueezy;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class PaddleCheckoutRequest extends FormRequest
|
||||
class LemonSqueezyCheckoutRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*/
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
return (bool) $this->user();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -25,15 +25,11 @@ class PaddleCheckoutRequest extends FormRequest
|
||||
'package_id' => ['required', 'exists:packages,id'],
|
||||
'success_url' => ['nullable', 'url'],
|
||||
'return_url' => ['nullable', 'url'],
|
||||
'inline' => ['sometimes', 'boolean'],
|
||||
'coupon_code' => ['nullable', 'string', 'max:64'],
|
||||
'accepted_terms' => ['required', 'boolean', 'accepted'],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get custom validation messages.
|
||||
*/
|
||||
public function messages(): array
|
||||
{
|
||||
return [
|
||||
@@ -19,7 +19,7 @@ class SupportTenantResourceRequest extends SupportResourceFormRequest
|
||||
Rule::unique('tenants', 'slug')->ignore($tenantId),
|
||||
],
|
||||
'contact_email' => ['sometimes', 'email', 'max:255'],
|
||||
'paddle_customer_id' => ['sometimes', 'nullable', 'string', 'max:191'],
|
||||
'lemonsqueezy_customer_id' => ['sometimes', 'nullable', 'string', 'max:191'],
|
||||
'is_active' => ['sometimes', 'boolean'],
|
||||
'is_suspended' => ['sometimes', 'boolean'],
|
||||
'features' => ['sometimes', 'array'],
|
||||
@@ -31,7 +31,7 @@ class SupportTenantResourceRequest extends SupportResourceFormRequest
|
||||
return [
|
||||
'slug',
|
||||
'contact_email',
|
||||
'paddle_customer_id',
|
||||
'lemonsqueezy_customer_id',
|
||||
'is_active',
|
||||
'is_suspended',
|
||||
'features',
|
||||
|
||||
Reference in New Issue
Block a user