Files
interblue.pl/modules/przelewy24/factories/Przelewy24RestRefundFactory.php
2024-10-25 14:16:28 +02:00

37 lines
911 B
PHP

<?php
/**
* @author Przelewy24
* @copyright Przelewy24
* @license https://www.gnu.org/licenses/gpl.html
*/
if (!defined('_PS_VERSION_')) {
exit;
}
/**
* Class Przelewy24RestRefundFactory
*
* One of factories for Przelewy24 plugin.
*
* The class is aware of the whole configuration.
*/
class Przelewy24RestRefundFactory
{
/**
* Create instance of Przelewy24RestCardFactory.
*
* @param string $suffix money suffix
*
* @return Przelewy24RestRefund
*/
public static function buildForSuffix($suffix)
{
$posId = (int) Configuration::get('P24_SHOP_ID' . $suffix);
$apiKey = (string) Configuration::get('P24_API_KEY' . $suffix);
$salt = Configuration::get('P24_SALT' . $suffix);
$testMode = (bool) Configuration::get('P24_TEST_MODE' . $suffix);
return new Przelewy24RestRefund($posId, $apiKey, $salt, $testMode);
}
}