38 lines
1.0 KiB
PHP
38 lines
1.0 KiB
PHP
<?php
|
|
|
|
namespace App\Services\Payments;
|
|
|
|
use App\Models\Payment;
|
|
use App\Services\FIB\FIBClient;
|
|
use App\User\Controllers\Payment\DTO\PaymentCreateDTO;
|
|
|
|
class PaymentService
|
|
{
|
|
public $fib_client;
|
|
|
|
public function __construct()
|
|
{
|
|
$this->fib_client = new FibClient();
|
|
}
|
|
|
|
public function createPayment(PaymentCreateDTO $dto)
|
|
{
|
|
// Payment::query()->create([
|
|
// 'user_id' => $dto->user_id,
|
|
// 'username' => $dto->username,
|
|
// 'track_id' => $dto->track_id,
|
|
// 'amount' => $dto->amount,
|
|
// 'currency' => $dto->currency,
|
|
// 'callback_url' => $dto->callback_url,
|
|
// 'expires_at' => $dto->expires_at,
|
|
// 'status_id' => $dto->status_id,
|
|
// 'status_name' => $dto->status_name,
|
|
// 'ip' => $dto->ip,
|
|
// 'user_gateway_id' => $dto->user_gateway_id,
|
|
// 'created_at' => $dto->created_at,
|
|
// 'updated_at' => $dto->updated_at,
|
|
// ]);
|
|
return $this->fib_client->getAccessToken();
|
|
}
|
|
}
|