feat: add payment intent handling in PurchaseController with validation and QR generation

This commit is contained in:
2026-07-06 11:47:04 -03:00
parent 3731cd67fe
commit 6bda3bf013
6 changed files with 89 additions and 2 deletions

View File

@@ -0,0 +1,24 @@
<?php
namespace App\Domains\Purchase\Requests;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;
class PaymentIntentRequest extends FormRequest
{
public function authorize(): bool
{
return $this->user() !== null;
}
/**
* @return array<string, mixed>
*/
public function rules(): array
{
return [
'method' => ['required', 'string', Rule::in(['qr', 'transfer'])],
];
}
}