feat: implement Telepagos webhook handling with request validation and service integration
This commit is contained in:
43
app/Domains/Purchase/Models/TelepagosPayment.php
Normal file
43
app/Domains/Purchase/Models/TelepagosPayment.php
Normal 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');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user