xmartogo adlı üyeden alıntı: mesajı görüntüle
//basic example

$PayTR = (new PayTR())->configure($config['paytr']);


//configure method

namespace Mirarus\VirtualPos\Providers;
class PayTR
{
    public function configure(array $config): self
    {
        $this->setApiId($config['api_id']);
        $this->setApiKey($config['api_key']);
        $this->setApiSecret($config['api_secret']);
        $this->setApiSandbox($config['sandbox']);
        $this->setApiDebug($config['debug']);
        $this->setApiSuccessfulUrl($config['success_url']);
        $this->setApiFailedUrl($config['failed_url']);
        return $this;
    }
}
Paytr alt class oluşturup set methodlari cagrilabilir, en kısa sürede options sınıfı yazıp onu çağırıp islem yapmayı planlıyorum.