first commit

This commit is contained in:
2025-01-06 20:47:25 +01:00
commit 3bdbd78c2f
25591 changed files with 3586440 additions and 0 deletions

View File

@@ -0,0 +1,54 @@
<?php
/**
* Class Przelewy24OneClickHelper
*
* @author Przelewy24
* @copyright Przelewy24
* @license https://www.gnu.org/licenses/lgpl-3.0.en.html
*
*/
/**
* Class Przelewy24OneClickHelper
*/
class Przelewy24OneClickHelper
{
/**
* Get card payment ids.
*
* @return array
*/
public static function getCardPaymentIds()
{
return array(140, 142, 145, 218);
}
/**
* Escape string.
*
* @param string $string
*
* @return string
*/
public static function escape($string)
{
$string = trim($string);
return htmlspecialchars($string);
}
/**
* Is one click enabled.
*
* @param string $suffix
*
* @return bool
* @throws Exception
*/
public static function isOneClickEnable($suffix = "")
{
$soap = Przelewy24SoapInterfaceFactory::getForSuffix($suffix);
return ($soap->checkCardRecurrency() && 1 === (int)Configuration::get('P24_ONECLICK_ENABLE' . $suffix));
}
}