add controllers, servoices

This commit is contained in:
root
2026-03-09 02:52:13 -04:00
parent c8de5f7edc
commit d76c871cb7
501 changed files with 34439 additions and 21843 deletions
@@ -0,0 +1,26 @@
<?php
namespace App\Http\Resources\Payments;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
class PaypalTransactionResource extends JsonResource
{
public function toArray(Request $request): array
{
return [
'id' => (int) ($this->resource['id'] ?? 0),
'transaction_id' => $this->resource['transaction_id'] ?? null,
'order_id' => $this->resource['order_id'] ?? null,
'parent_school_id' => $this->resource['parent_school_id'] ?? null,
'payer_email' => $this->resource['payer_email'] ?? null,
'amount' => (float) ($this->resource['amount'] ?? 0),
'net_amount' => (float) ($this->resource['net_amount'] ?? 0),
'currency' => $this->resource['currency'] ?? null,
'status' => $this->resource['status'] ?? null,
'event_type' => $this->resource['event_type'] ?? null,
'created_at' => $this->resource['created_at'] ?? null,
];
}
}