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,65 @@
<?php
/**
* Class Przelewy24ServiceAdminForm
*
* @author Przelewy24
* @copyright Przelewy24
* @license https://www.gnu.org/licenses/lgpl-3.0.en.html
*
*/
/**
* One of factories for Przelewy24 plugin.
*
* The class is aware of the whole configuration.
*
*/
class Przelewy24BlikSoapFactory
{
/**
* Create instance of Przelewy24BlikSoapInterface for suffix.
*
* @param string $suffix Money suffix.
* @return Przelewy24BlikSoap
* @throws Exception
*/
public static function buildForSuffix($suffix)
{
$apiKey = Configuration::get('P24_API_KEY' . $suffix);
$merchantId = (int)Configuration::get('P24_MERCHANT_ID' . $suffix);
$posId = (int)Configuration::get('P24_SHOP_ID' . $suffix);
$salt = Configuration::get('P24_SALT' . $suffix);
$testMode = (bool)Configuration::get('P24_TEST_MODE' . $suffix);
return self::buildFromParams($apiKey, $merchantId, $posId, $salt, $testMode);
}
/**
* Create instance of Przelewy24BlikSoap
*
* @return Przelewy24BlikSoap
* @throws Exception
*/
public static function buildDefault()
{
return self::buildForSuffix('');
}
/**
* Create instance of Przelewy24BlikSoap
*
* @param string $apiKey
* @param int $merchantId
* @param int $posId
* @param string $salt
* @param bool $testMode
* @return Przelewy24BlikSoap
* @throws Exception
*/
public static function buildFromParams($apiKey, $merchantId, $posId, $salt, $testMode)
{
$p24Class = Przelewy24ClassFactory::buildFromParams($merchantId, $posId, $salt, $testMode);
return new Przelewy24BlikSoap($apiKey, $p24Class, $merchantId, $posId, $salt, $testMode);
}
}

View File

@@ -0,0 +1,38 @@
<?php
/**
* Class Przelewy24ClassStaticInterfaceFactory
*
* @author Przelewy24
* @copyright Przelewy24
* @license https://www.gnu.org/licenses/gpl.html
*
*/
/**
* One of factories for Przelewy24 plugin.
*/
class Przelewy24BlikSoapInterfaceFactory
{
/**
* Create instance of Przelewy24BlikSoapInterface for suffix.
*
* @param string $suffix Money suffix.
* @return Przelewy24BlikSoapInterface
* @throws Exception
*/
public static function getForSuffix($suffix)
{
return Przelewy24BlikSoapFactory::buildForSuffix($suffix);
}
/**
* Create default instance of Przelewy24BlikSoapInterface.
*
* @return Przelewy24BlikSoapInterface
* @throws Exception
*/
public static function getDefault()
{
return Przelewy24BlikSoapFactory::buildDefault();
}
}

View File

@@ -0,0 +1,27 @@
<?php
/**
* Class Przelewy24ClassBlikInterfaceFactory
*
* @author Przelewy24
* @copyright Przelewy24
* @license https://www.gnu.org/licenses/gpl.html
*
*/
/**
* One of factories for Przelewy24 plugin.
*
*/
class Przelewy24ClassBlikInterfaceFactory
{
/**
* Create instance of Przelewy24ClassBlikInterface.
*
* @return Przelewy24ClassBlikInterface
* @throws Exception
*/
public static function getDefault()
{
return Przelewy24ClassFactory::buildDefault();
}
}

View File

@@ -0,0 +1,67 @@
<?php
/**
* Class Przelewy24ClassFactory
*
* @author Przelewy24
* @copyright Przelewy24
* @license https://www.gnu.org/licenses/gpl.html
*
*/
/**
* One of factories for Przelewy24 plugin.
*
* The class is aware of the whole configuration.
*
*/
class Przelewy24ClassFactory
{
/**
* Create instance of Przelewy24Class.
*
* @param string $suffix Money suffix.
* @return Przelewy24Class
* @throws Exception
*/
public static function buildForSuffix($suffix)
{
$merchantId = (int)Configuration::get('P24_MERCHANT_ID' . $suffix);
$posId = (int)Configuration::get('P24_SHOP_ID' . $suffix);
$salt = Configuration::get('P24_SALT' . $suffix);
$testMode = (bool)Configuration::get('P24_TEST_MODE' . $suffix);
return self::buildFromParams($merchantId, $posId, $salt, $testMode);
}
/**
* Create instance of Przelewy24Class.
*
* @return Przelewy24Class
* @throws Exception
*/
public static function buildDefault()
{
return self::buildForSuffix('');
}
/**
* Create instance of Przelewy24Class.
*
* @param int $merchantId
* @param int $posId
* @param string $salt
* @param bool $testMode
* @return Przelewy24Class
* @throws Exception
*/
public static function buildFromParams($merchantId, $posId, $salt, $testMode)
{
$merchantId = (int)$merchantId;
$posId = (int)$posId;
$salt = (string)$salt;
$testMode = (bool)$testMode;
return new Przelewy24Class($merchantId, $posId, $salt, $testMode);
}
}

View File

@@ -0,0 +1,28 @@
<?php
/**
* Class Przelewy24ClassInterfaceFactory
*
* @author Przelewy24
* @copyright Przelewy24
* @license https://www.gnu.org/licenses/gpl.html
*
*/
/**
* One of factories for Przelewy24 plugin.
*
*/
class Przelewy24ClassInterfaceFactory
{
/**
* Create instance of Przelewy24ClassInterface based on suffix.
*
* @param string $suffix Money suffix.
* @return Przelewy24ClassInterface
* @throws Exception
*/
public static function getForSuffix($suffix)
{
return Przelewy24ClassFactory::buildForSuffix($suffix);
}
}

View File

@@ -0,0 +1,29 @@
<?php
/**
* Class Przelewy24ClassStaticInterfaceFactory
*
* @author Przelewy24
* @copyright Przelewy24
* @license https://www.gnu.org/licenses/gpl.html
*
*/
/**
* One of factories for Przelewy24 plugin.
*
* The class is aware of the whole configuration.
*
*/
class Przelewy24ClassStaticInterfaceFactory
{
/**
* Create instance of Przelewy24ClassStaticInterface.
*
* @return Przelewy24ClassStaticInterface
* @throws Exception
*/
public static function getDefault()
{
return Przelewy24ClassFactory::buildDefault();
}
}

View File

@@ -0,0 +1,57 @@
<?php
/**
* Class Przelewy24SoapFactory
*
* @author Przelewy24
* @copyright Przelewy24
* @license https://www.gnu.org/licenses/gpl.html
*
*/
/**
* One of factories for Przelewy24 plugin.
*
* The class is aware of the whole configuration.
*
*/
class Przelewy24SoapFactory
{
/**
* Create instance of Przelewy24Soap.
*
* @param string $suffix Money suffix.
* @return Przelewy24Soap
* @throws Exception
*/
public static function buildForSuffix($suffix)
{
$merchantId = (int)Configuration::get('P24_MERCHANT_ID' . $suffix);
$posId = (int)Configuration::get('P24_SHOP_ID' . $suffix);
$salt = Configuration::get('P24_SALT' . $suffix);
$testMode = (bool)Configuration::get('P24_TEST_MODE' . $suffix);
return self::buildFromParams($merchantId, $posId, $salt, $testMode);
}
/**
* Create instance of Przelewy24Soap.
*
* @param int $merchantId
* @param int $posId
* @param string $salt
* @param bool $testMode
* @return Przelewy24Soap
* @throws SoapFault
* @throws Exception
*/
public static function buildFromParams($merchantId, $posId, $salt, $testMode)
{
$merchantId = (int)$merchantId;
$posId = (int)$posId;
$salt = (string)$salt;
$testMode = (bool)$testMode;
$p24Class = Przelewy24ClassFactory::buildFromParams($merchantId, $posId, $salt, $testMode);
return new Przelewy24Soap($p24Class, $merchantId, $posId, $salt, $testMode);
}
}

View File

@@ -0,0 +1,27 @@
<?php
/**
* Class Przelewy24SoapInterfaceFactory
*
* @author Przelewy24
* @copyright Przelewy24
* @license https://www.gnu.org/licenses/gpl.html
*
*/
/**
* One of factories for Przelewy24 plugin.
*/
class Przelewy24SoapInterfaceFactory
{
/**
* Create instance of Przelewy24SoapInterface
*
* @param string $suffix Money suffix.
* @return Przelewy24SoapInterface
* @throws Exception
*/
public static function getForSuffix($suffix)
{
return Przelewy24SoapFactory::buildForSuffix($suffix);
}
}

View File

@@ -0,0 +1,31 @@
<?php
/**
* Class Przelewy24ValidatorSoapInterfaceFactory
*
* @author Przelewy24
* @copyright Przelewy24
* @license https://www.gnu.org/licenses/gpl.html
*
*/
/**
* One of factories for Przelewy24 plugin.
*/
class Przelewy24ValidatorSoapInterfaceFactory
{
/**
* Create instance of Przelewy24SValidatorSoapInterface
*
* @param int $merchantId
* @param int $posId
* @param string $salt
* @param bool $testMode
* @return Przelewy24ValidatorSoapInterface
* @throws Exception
* @throws SoapFault
*/
public static function getForParams($merchantId, $posId, $salt, $testMode)
{
return Przelewy24SoapFactory::buildFromParams($merchantId, $posId, $salt, $testMode);
}
}

View File

@@ -0,0 +1,36 @@
<?php
/*
* 2007-2017 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2016 PrestaShop SA
* @version Release: $Revision$
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;