feat: implement Telepagos webhook handling with request validation and service integration

This commit is contained in:
2026-07-06 09:57:45 -03:00
parent 403caf77f5
commit 3731cd67fe
9 changed files with 329 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
<?php
namespace App\Domains\Purchase\Models;
use Illuminate\Database\Eloquent\Attributes\Fillable;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
#[Fillable([
'compra_id',
'cuit_buyer',
'cvu_buyer',
'amount',
'concept',
'operation',
'operation_id',
'transaction_id',
'qr_order_id',
'link_id',
])]
class TelepagosPayment extends Model
{
use HasFactory;
protected $table = 'telepagos_payments';
protected function casts(): array
{
return [
'compra_id' => 'integer',
'amount' => 'decimal:2',
];
}
/**
* @return BelongsTo<Purchase, $this>
*/
public function compra(): BelongsTo
{
return $this->belongsTo(Purchase::class, 'compra_id');
}
}