first commit
This commit is contained in:
31
class/payments/class.TwistoPayIn3.php
Normal file
31
class/payments/class.TwistoPayIn3.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
if (!class_exists('TwistoPay')) {
|
||||
require_once 'class.TwistoPay.php';
|
||||
}
|
||||
|
||||
class TwistoPayIn3 extends TwistoPay
|
||||
{
|
||||
public static $name = 'Twisto Pay in three';
|
||||
|
||||
public $class = 'TwistoPayIn3';
|
||||
|
||||
protected ?string $defaultIcon = '../../common/static/payments/twisto_payin3.svg';
|
||||
|
||||
protected function getCheckoutType(): string
|
||||
{
|
||||
return 'pay-in-three';
|
||||
}
|
||||
|
||||
public function accept($totalPrice, $freeDelivery)
|
||||
{
|
||||
$price = $totalPrice->getPriceWithVat()->asFloat();
|
||||
if ($price <= 0 && $this->order) {
|
||||
$price = $this->order->total_price;
|
||||
}
|
||||
|
||||
return parent::accept($totalPrice, $freeDelivery) && $price >= 1500;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user