Issues (8)

src/Payvessel.php (1 issue)

Labels
Severity
1
<?php
2
3
namespace HopekellDev\Payvessel;
4
5
use HopekellDev\Payvessel\Helpers\VirtualAccount;
6
7
class Payvessel
8
{
9
    protected string $baseUrl;
10
    protected string $apiKey;
11
    protected string $apiSecret;
12
    protected string $businessId;
13
14
    public function __construct()
15
    {
16
        $this->baseUrl = rtrim(config('payvessel.base_url'), '/');
0 ignored issues
show
The function config was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

16
        $this->baseUrl = rtrim(/** @scrutinizer ignore-call */ config('payvessel.base_url'), '/');
Loading history...
17
        $this->apiKey = config('payvessel.api_key');
18
        $this->apiSecret = config('payvessel.api_secret');
19
        $this->businessId = config('payvessel.business_id');
20
    }
21
22
    public function virtualAccounts(): VirtualAccount
23
    {
24
        return new VirtualAccount($this->apiKey,$this->apiSecret, $this->baseUrl, $this->businessId);
25
    }
26
}
27