🏨 Hotel Booking Enhancements: - Implemented Eagle Booking Advanced Pricing add-on - Added Booking.com-style rate management system - Created professional calendar interface for pricing - Integrated deals and discounts functionality 💰 Advanced Pricing Features: - Dynamic pricing models (per room, per person, per adult) - Base rates, adult rates, and child rates management - Length of stay discounts and early bird deals - Mobile rates and secret deals implementation - Seasonal promotions and flash sales 📅 Availability Management: - Real-time availability tracking - Stop sell and restriction controls - Closed to arrival/departure functionality - Minimum/maximum stay requirements - Automatic sold-out management 💳 Payment Integration: - Maintained Redsys payment gateway integration - Seamless integration with existing Eagle Booking - No modifications to core Eagle Booking plugin 🛠️ Technical Implementation: - Custom database tables for advanced pricing - WordPress hooks and filters integration - AJAX-powered admin interface - Data migration from existing Eagle Booking - Professional calendar view for revenue management 📊 Admin Interface: - Booking.com-style management dashboard - Visual rate and availability calendar - Bulk operations for date ranges - Statistics and analytics dashboard - Modal dialogs for quick editing 🔧 Code Quality: - WordPress coding standards compliance - Secure database operations with prepared statements - Proper input validation and sanitization - Error handling and logging - Responsive admin interface 🤖 Generated with Claude Code (https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
277 lines
7.8 KiB
PHP
277 lines
7.8 KiB
PHP
<?php
|
|
|
|
if (!defined('SODIUM_CRYPTO_CORE_RISTRETTO255_BYTES')) {
|
|
define(
|
|
'SODIUM_CRYPTO_CORE_RISTRETTO255_BYTES',
|
|
ParagonIE_Sodium_Compat::CRYPTO_CORE_RISTRETTO255_BYTES
|
|
);
|
|
define('SODIUM_COMPAT_POLYFILLED_RISTRETTO255', true);
|
|
}
|
|
if (!defined('SODIUM_CRYPTO_CORE_RISTRETTO255_HASHBYTES')) {
|
|
define(
|
|
'SODIUM_CRYPTO_CORE_RISTRETTO255_HASHBYTES',
|
|
ParagonIE_Sodium_Compat::CRYPTO_CORE_RISTRETTO255_HASHBYTES
|
|
);
|
|
}
|
|
if (!defined('SODIUM_CRYPTO_CORE_RISTRETTO255_SCALARBYTES')) {
|
|
define(
|
|
'SODIUM_CRYPTO_CORE_RISTRETTO255_SCALARBYTES',
|
|
ParagonIE_Sodium_Compat::CRYPTO_CORE_RISTRETTO255_SCALARBYTES
|
|
);
|
|
}
|
|
if (!defined('SODIUM_CRYPTO_CORE_RISTRETTO255_NONREDUCEDSCALARBYTES')) {
|
|
define(
|
|
'SODIUM_CRYPTO_CORE_RISTRETTO255_NONREDUCEDSCALARBYTES',
|
|
ParagonIE_Sodium_Compat::CRYPTO_CORE_RISTRETTO255_NONREDUCEDSCALARBYTES
|
|
);
|
|
}
|
|
if (!defined('SODIUM_CRYPTO_SCALARMULT_RISTRETTO255_SCALARBYTES')) {
|
|
define(
|
|
'SODIUM_CRYPTO_SCALARMULT_RISTRETTO255_SCALARBYTES',
|
|
ParagonIE_Sodium_Compat::CRYPTO_SCALARMULT_RISTRETTO255_SCALARBYTES
|
|
);
|
|
}
|
|
if (!defined('SODIUM_CRYPTO_SCALARMULT_RISTRETTO255_BYTES')) {
|
|
define(
|
|
'SODIUM_CRYPTO_SCALARMULT_RISTRETTO255_BYTES',
|
|
ParagonIE_Sodium_Compat::CRYPTO_SCALARMULT_RISTRETTO255_BYTES
|
|
);
|
|
}
|
|
|
|
if (!is_callable('sodium_crypto_core_ristretto255_add')) {
|
|
/**
|
|
* @see ParagonIE_Sodium_Compat::ristretto255_add()
|
|
*
|
|
* @param string $p
|
|
* @param string $q
|
|
* @return string
|
|
* @throws SodiumException
|
|
*/
|
|
function sodium_crypto_core_ristretto255_add(
|
|
#[\SensitiveParameter]
|
|
$p,
|
|
#[\SensitiveParameter]
|
|
$q
|
|
) {
|
|
return ParagonIE_Sodium_Compat::ristretto255_add($p, $q, true);
|
|
}
|
|
}
|
|
if (!is_callable('sodium_crypto_core_ristretto255_from_hash')) {
|
|
/**
|
|
* @see ParagonIE_Sodium_Compat::ristretto255_from_hash()
|
|
*
|
|
* @param string $s
|
|
* @return string
|
|
* @throws SodiumException
|
|
*/
|
|
function sodium_crypto_core_ristretto255_from_hash(
|
|
#[\SensitiveParameter]
|
|
$s
|
|
) {
|
|
return ParagonIE_Sodium_Compat::ristretto255_from_hash($s, true);
|
|
}
|
|
}
|
|
if (!is_callable('sodium_crypto_core_ristretto255_is_valid_point')) {
|
|
/**
|
|
* @see ParagonIE_Sodium_Compat::ristretto255_is_valid_point()
|
|
*
|
|
* @param string $s
|
|
* @return bool
|
|
* @throws SodiumException
|
|
*/
|
|
function sodium_crypto_core_ristretto255_is_valid_point(
|
|
#[\SensitiveParameter]
|
|
$s
|
|
) {
|
|
return ParagonIE_Sodium_Compat::ristretto255_is_valid_point($s, true);
|
|
}
|
|
}
|
|
if (!is_callable('sodium_crypto_core_ristretto255_random')) {
|
|
/**
|
|
* @see ParagonIE_Sodium_Compat::ristretto255_random()
|
|
*
|
|
* @return string
|
|
* @throws SodiumException
|
|
*/
|
|
function sodium_crypto_core_ristretto255_random()
|
|
{
|
|
return ParagonIE_Sodium_Compat::ristretto255_random(true);
|
|
}
|
|
}
|
|
if (!is_callable('sodium_crypto_core_ristretto255_scalar_add')) {
|
|
/**
|
|
* @see ParagonIE_Sodium_Compat::ristretto255_scalar_add()
|
|
*
|
|
* @param string $x
|
|
* @param string $y
|
|
* @return string
|
|
* @throws SodiumException
|
|
*/
|
|
function sodium_crypto_core_ristretto255_scalar_add(
|
|
#[\SensitiveParameter]
|
|
$x,
|
|
#[\SensitiveParameter]
|
|
$y
|
|
) {
|
|
return ParagonIE_Sodium_Compat::ristretto255_scalar_add($x, $y, true);
|
|
}
|
|
}
|
|
if (!is_callable('sodium_crypto_core_ristretto255_scalar_complement')) {
|
|
/**
|
|
* @see ParagonIE_Sodium_Compat::ristretto255_scalar_complement()
|
|
*
|
|
* @param string $s
|
|
* @return string
|
|
* @throws SodiumException
|
|
*/
|
|
function sodium_crypto_core_ristretto255_scalar_complement(
|
|
#[\SensitiveParameter]
|
|
$s
|
|
) {
|
|
return ParagonIE_Sodium_Compat::ristretto255_scalar_complement($s, true);
|
|
}
|
|
}
|
|
if (!is_callable('sodium_crypto_core_ristretto255_scalar_invert')) {
|
|
/**
|
|
* @see ParagonIE_Sodium_Compat::ristretto255_scalar_invert()
|
|
*
|
|
* @param string $p
|
|
* @return string
|
|
* @throws SodiumException
|
|
*/
|
|
function sodium_crypto_core_ristretto255_scalar_invert(
|
|
#[\SensitiveParameter]
|
|
$p
|
|
) {
|
|
return ParagonIE_Sodium_Compat::ristretto255_scalar_invert($p, true);
|
|
}
|
|
}
|
|
if (!is_callable('sodium_crypto_core_ristretto255_scalar_mul')) {
|
|
/**
|
|
* @see ParagonIE_Sodium_Compat::ristretto255_scalar_mul()
|
|
*
|
|
* @param string $x
|
|
* @param string $y
|
|
* @return string
|
|
* @throws SodiumException
|
|
*/
|
|
function sodium_crypto_core_ristretto255_scalar_mul(
|
|
#[\SensitiveParameter]
|
|
$x,
|
|
#[\SensitiveParameter]
|
|
$y
|
|
) {
|
|
return ParagonIE_Sodium_Compat::ristretto255_scalar_mul($x, $y, true);
|
|
}
|
|
}
|
|
if (!is_callable('sodium_crypto_core_ristretto255_scalar_negate')) {
|
|
/**
|
|
* @see ParagonIE_Sodium_Compat::ristretto255_scalar_negate()
|
|
*
|
|
* @param string $s
|
|
* @return string
|
|
* @throws SodiumException
|
|
*/
|
|
function sodium_crypto_core_ristretto255_scalar_negate(
|
|
#[\SensitiveParameter]
|
|
$s
|
|
) {
|
|
return ParagonIE_Sodium_Compat::ristretto255_scalar_negate($s, true);
|
|
}
|
|
}
|
|
if (!is_callable('sodium_crypto_core_ristretto255_scalar_random')) {
|
|
/**
|
|
* @see ParagonIE_Sodium_Compat::ristretto255_scalar_random()
|
|
*
|
|
* @return string
|
|
* @throws SodiumException
|
|
*/
|
|
function sodium_crypto_core_ristretto255_scalar_random()
|
|
{
|
|
return ParagonIE_Sodium_Compat::ristretto255_scalar_random(true);
|
|
}
|
|
}
|
|
if (!is_callable('sodium_crypto_core_ristretto255_scalar_reduce')) {
|
|
/**
|
|
* @see ParagonIE_Sodium_Compat::ristretto255_scalar_reduce()
|
|
*
|
|
* @param string $s
|
|
* @return string
|
|
* @throws SodiumException
|
|
*/
|
|
function sodium_crypto_core_ristretto255_scalar_reduce(
|
|
#[\SensitiveParameter]
|
|
$s
|
|
) {
|
|
return ParagonIE_Sodium_Compat::ristretto255_scalar_reduce($s, true);
|
|
}
|
|
}
|
|
if (!is_callable('sodium_crypto_core_ristretto255_scalar_sub')) {
|
|
/**
|
|
* @see ParagonIE_Sodium_Compat::ristretto255_scalar_sub()
|
|
*
|
|
* @param string $x
|
|
* @param string $y
|
|
* @return string
|
|
* @throws SodiumException
|
|
*/
|
|
function sodium_crypto_core_ristretto255_scalar_sub(
|
|
#[\SensitiveParameter]
|
|
$x,
|
|
#[\SensitiveParameter]
|
|
$y
|
|
) {
|
|
return ParagonIE_Sodium_Compat::ristretto255_scalar_sub($x, $y, true);
|
|
}
|
|
}
|
|
if (!is_callable('sodium_crypto_core_ristretto255_sub')) {
|
|
/**
|
|
* @see ParagonIE_Sodium_Compat::ristretto255_sub()
|
|
*
|
|
* @param string $p
|
|
* @param string $q
|
|
* @return string
|
|
* @throws SodiumException
|
|
*/
|
|
function sodium_crypto_core_ristretto255_sub(
|
|
#[\SensitiveParameter]
|
|
$p,
|
|
#[\SensitiveParameter]
|
|
$q
|
|
) {
|
|
return ParagonIE_Sodium_Compat::ristretto255_sub($p, $q, true);
|
|
}
|
|
}
|
|
if (!is_callable('sodium_crypto_scalarmult_ristretto255')) {
|
|
/**
|
|
* @see ParagonIE_Sodium_Compat::crypto_scalarmult_ristretto255()
|
|
* @param string $n
|
|
* @param string $p
|
|
* @return string
|
|
* @throws SodiumException
|
|
* @throws TypeError
|
|
*/
|
|
function sodium_crypto_scalarmult_ristretto255(
|
|
#[\SensitiveParameter]
|
|
$n,
|
|
#[\SensitiveParameter]
|
|
$p
|
|
) {
|
|
return ParagonIE_Sodium_Compat::scalarmult_ristretto255($n, $p, true);
|
|
}
|
|
}
|
|
if (!is_callable('sodium_crypto_scalarmult_ristretto255_base')) {
|
|
/**
|
|
* @see ParagonIE_Sodium_Compat::crypto_scalarmult_ristretto255_base()
|
|
* @param string $n
|
|
* @return string
|
|
* @throws SodiumException
|
|
* @throws TypeError
|
|
*/
|
|
function sodium_crypto_scalarmult_ristretto255_base(
|
|
#[\SensitiveParameter]
|
|
$n
|
|
) {
|
|
return ParagonIE_Sodium_Compat::scalarmult_ristretto255_base($n, true);
|
|
}
|
|
} |