Skip to content

Commit

Permalink
Fix generic payments
Browse files Browse the repository at this point in the history
  • Loading branch information
s4ddly committed Feb 29, 2024
1 parent 3459e5e commit bef6737
Showing 1 changed file with 22 additions and 6 deletions.
28 changes: 22 additions & 6 deletions Model/TpayPayment.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ class TpayPayment extends Adapter implements TpayInterface
{
use FieldsValidator;

protected $_code = self::CODE;
protected $code;
protected $title;
protected $_isGateway = true;
protected $_canCapture = false;
protected $_canCapturePartial = false;
Expand Down Expand Up @@ -78,9 +79,6 @@ class TpayPayment extends Adapter implements TpayInterface
'mastercard',
];

/** @var string */
private $_title;

public function __construct(
UrlInterface $urlBuilder,
Session $checkoutSession,
Expand Down Expand Up @@ -128,12 +126,30 @@ public function getPaymentRedirectUrl(): string

public function setCode(string $code)
{
$this->_code = $code;
$this->code = $code;
}

public function getCode(): string
{
if ($this->code) {
return $this->code;
}

return parent::getCode();
}

public function getTitle(): string
{
if ($this->title) {
return $this->title;
}

return parent::getTitle();
}

public function setTitle(string $title): void
{
$this->_title = $title;
$this->title = $title;
}

public function checkBlikLevel0Settings(): bool
Expand Down

0 comments on commit bef6737

Please sign in to comment.