28 lines
1.1 KiB
PHP
28 lines
1.1 KiB
PHP
<?php
|
|
// Przelewy24 Configuration
|
|
// IMPORTANT: Please fill in your details below. These are placeholder values.
|
|
|
|
// Environment: 'sandbox' or 'production'
|
|
define('P24_ENV', getenv('P24_ENV') ?: 'sandbox');
|
|
|
|
// Merchant Credentials from P24 Panel
|
|
define('P24_MERCHANT_ID', getenv('P24_MERCHANT_ID') ?: 0000);
|
|
define('P24_POS_ID', getenv('P24_POS_ID') ?: 0000);
|
|
define('P24_CRC', getenv('P24_CRC') ?: 'YOUR_CRC_KEY');
|
|
define('P24_API_KEY', getenv('P24_API_KEY') ?: 'YOUR_API_KEY');
|
|
|
|
// P24 API URLs
|
|
$p24_base_urls = [
|
|
'sandbox' => 'https://sandbox.przelewy24.pl',
|
|
'production' => 'https://secure.przelewy24.pl'
|
|
];
|
|
define('P24_BASE_URL', $p24_base_urls[P24_ENV]);
|
|
|
|
// Your Application URLs
|
|
// These should be full URLs accessible by P24 servers.
|
|
$protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) ? "https://" : "http://";
|
|
$host = $_SERVER['HTTP_HOST'];
|
|
|
|
define('P24_URL_RETURN', getenv('P24_URL_RETURN') ?: $protocol . $host . '/p24_return.php');
|
|
define('P24_URL_STATUS', getenv('P24_URL_STATUS') ?: $protocol . $host . '/p24_status.php');
|