<?php
// paypal-config.js.php - Exposes PayPal configuration to JavaScript
header('Content-Type: application/javascript');
require_once 'gateway-config.php';
?>

// PayPal Configuration for JavaScript
window.PAYPAL_SANDBOX = <?php echo PAYPAL_SANDBOX ? 'true' : 'false'; ?>;
window.PAYPAL_URL = '<?php echo PAYPAL_URL; ?>';
window.PAYPAL_BUSINESS_EMAIL = '<?php echo PAYPAL_BUSINESS_EMAIL; ?>';

console.log('PayPal Config Loaded:', {
    sandbox: window.PAYPAL_SANDBOX,
    url: window.PAYPAL_URL,
    businessEmail: window.PAYPAL_BUSINESS_EMAIL
});
